Skip to content

Commit

Permalink
rename ahead_stopped -> side_stopped
Browse files Browse the repository at this point in the history
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
  • Loading branch information
KYabuuchi committed Mar 10, 2025
1 parent 9708f15 commit 90f6046
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The obstacles meeting the following condition are determined as obstacles for yi

- The object type is for cruising according to `obstacle_filtering.object_type.*` and it is moving with a speed greater than `obstacle_filtering.yield.stopped_obstacle_velocity_threshold`.
- The object is not crossing the ego's trajectory (\*1).
- There is another object of type `obstacle_filtering.object_type.ahead_stopped` stopped in front of the moving obstacle.
- There is another object of type `obstacle_filtering.object_type.side_stopped` stopped in front of the moving obstacle.
- The lateral distance (using the ego's trajectory as reference) between both obstacles is less than `obstacle_filtering.yield.max_lat_dist_between_obstacles`
- Both obstacles, moving and stopped, are within `obstacle_filtering.yield.lat_distance_threshold` and `obstacle_filtering.yield.lat_distance_threshold` + `obstacle_filtering.yield.max_lat_dist_between_obstacles` lateral distance from the ego's trajectory respectively.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
pedestrian: false

# If an object does not have this label, the ego vehicle does not assume that the yielded obstacle will cut in due to the object.
ahead_stopped:
side_stopped:
unknown: false
car: true
truck: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,11 +720,11 @@ std::optional<CruiseObstacle> ObstacleCruiseModule::create_yield_cruise_obstacle
return std::nullopt;
}

if (!is_ahead_stopped_obstacle(stopped_object->predicted_object.classification.at(0).label)) {
if (!is_side_stopped_obstacle(stopped_object->predicted_object.classification.at(0).label)) {
RCLCPP_DEBUG(
logger_,
"[Cruise] Ignore yield obstacle (%s) since the corresponding stopped object type is not "
"designated as ahead_stopped.",
"designated as side_stopped.",
obj_uuid_str.substr(0, 4).c_str());
return std::nullopt;
}
Expand Down Expand Up @@ -789,9 +789,9 @@ bool ObstacleCruiseModule::is_outside_cruise_obstacle(const uint8_t label) const
return std::find(types.begin(), types.end(), label) != types.end();
}

bool ObstacleCruiseModule::is_ahead_stopped_obstacle(const uint8_t label) const
bool ObstacleCruiseModule::is_side_stopped_obstacle(const uint8_t label) const
{
const auto & types = obstacle_filtering_param_.ahead_stopped_object_types;
const auto & types = obstacle_filtering_param_.side_stopped_object_types;
return std::find(types.begin(), types.end(), label) != types.end();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class ObstacleCruiseModule : public PluginModuleInterface
const rclcpp::Time & predicted_objects_stamp, const std::vector<TrajectoryPoint> & traj_points);
bool is_inside_cruise_obstacle(const uint8_t label) const;
bool is_outside_cruise_obstacle(const uint8_t label) const;
bool is_ahead_stopped_obstacle(const uint8_t label) const;
bool is_side_stopped_obstacle(const uint8_t label) const;
bool is_cruise_obstacle(const uint8_t label) const;
bool is_front_collide_obstacle(
const std::vector<TrajectoryPoint> & traj_points,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct ObstacleFilteringParam
{
std::vector<uint8_t> inside_object_types{};
std::vector<uint8_t> outside_object_types{};
std::vector<uint8_t> ahead_stopped_object_types{};
std::vector<uint8_t> side_stopped_object_types{};
// bool use_pointcloud{};

double max_lat_margin{};
Expand Down Expand Up @@ -94,8 +94,8 @@ struct ObstacleFilteringParam
utils::get_target_object_type(node, "obstacle_cruise.obstacle_filtering.object_type.inside.");
outside_object_types = utils::get_target_object_type(
node, "obstacle_cruise.obstacle_filtering.object_type.outside.");
ahead_stopped_object_types = utils::get_target_object_type(
node, "obstacle_cruise.obstacle_filtering.object_type.ahead_stopped.");
side_stopped_object_types = utils::get_target_object_type(
node, "obstacle_cruise.obstacle_filtering.object_type.side_stopped.");
// use_pointcloud = get_or_declare_parameter<bool>(
// node, "obstacle_cruise.obstacle_filtering.object_type.pointcloud");

Expand Down

0 comments on commit 90f6046

Please sign in to comment.