Skip to content

Commit

Permalink
Fix spell
Browse files Browse the repository at this point in the history
  • Loading branch information
f0reachARR committed Apr 11, 2024
1 parent 49fb3a1 commit 0592f40
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class DetectionSensor : public DetectionSensorBase

auto update(
const double, const std::vector<traffic_simulator_msgs::EntityStatus> &, const rclcpp::Time &,
const std::vector<std::string> & lidar_detected_entity) -> void override;
const std::vector<std::string> & lidar_detected_entities) -> void override;
};
} // namespace simple_sensor_simulator

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class OccupancyGridSensor : public OccupancyGridSensorBase
template <>
auto OccupancyGridSensor<nav_msgs::msg::OccupancyGrid>::getOccupancyGrid(
const std::vector<traffic_simulator_msgs::EntityStatus> & status, const rclcpp::Time & stamp,
const std::vector<std::string> & lidar_detected_entity) -> nav_msgs::msg::OccupancyGrid;
const std::vector<std::string> & lidar_detected_entities) -> nav_msgs::msg::OccupancyGrid;
} // namespace simple_sensor_simulator

#endif // SIMPLE_SENSOR_SIMULATOR__SENSOR_SIMULATION__OCCUPANCY_GRID__OCCUPANCY_GRID_SENSOR_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ geometry_msgs::Pose OccupancyGridSensorBase::getSensorPose(

const std::vector<std::string> OccupancyGridSensorBase::getDetectedObjects(
const std::vector<traffic_simulator_msgs::EntityStatus> & status,
const std::vector<std::string> & lidar_detected_entity) const
const std::vector<std::string> & lidar_detected_entities) const
{
std::vector<std::string> detected_entities;
const auto pose = getSensorPose(status);
for (const auto & s : status) {
if (const auto has_detected =
std::find(lidar_detected_entity.begin(), lidar_detected_entity.end(), s.name()) !=
lidar_detected_entity.end();
std::find(lidar_detected_entities.begin(), lidar_detected_entities.end(), s.name()) !=
lidar_detected_entities.end();
!has_detected) {
continue;
}
Expand All @@ -66,7 +66,7 @@ const std::vector<std::string> OccupancyGridSensorBase::getDetectedObjects(
template <>
auto OccupancyGridSensor<nav_msgs::msg::OccupancyGrid>::getOccupancyGrid(
const std::vector<traffic_simulator_msgs::EntityStatus> & status, const rclcpp::Time & stamp,
const std::vector<std::string> & lidar_detected_entity) -> nav_msgs::msg::OccupancyGrid
const std::vector<std::string> & lidar_detected_entities) -> nav_msgs::msg::OccupancyGrid
{
// check if entities in `status` have unique names
{
Expand Down Expand Up @@ -105,10 +105,10 @@ auto OccupancyGridSensor<nav_msgs::msg::OccupancyGrid>::getOccupancyGrid(
auto detected_entities = std::set<std::string>();
{
if (configuration_.filter_by_range()) {
auto v = getDetectedObjects(status, lidar_detected_entity);
auto v = getDetectedObjects(status, lidar_detected_entities);
detected_entities.insert(v.begin(), v.end());
} else {
detected_entities.insert(lidar_detected_entity.begin(), lidar_detected_entity.end());
detected_entities.insert(lidar_detected_entities.begin(), lidar_detected_entities.end());
}
}

Expand Down

0 comments on commit 0592f40

Please sign in to comment.