Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(behavior_velocity_speed_bump_module): use unique virtual wall namespace #3838

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions planning/behavior_velocity_speed_bump_module/src/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,9 @@ visualization_msgs::msg::MarkerArray createSpeedBumpMarkers(

visualization_msgs::msg::MarkerArray SpeedBumpModule::createVirtualWallMarkerArray()
{
const auto now = this->clock_->now();
auto id = module_id_;

visualization_msgs::msg::MarkerArray wall_marker;
for (const auto & p : debug_data_.slow_start_poses) {
const auto & p_front = calcOffsetPose(p, debug_data_.base_link2front, 0.0, 0.0);
appendMarkerArray(
createSlowDownVirtualWallMarker(p_front, "speed_bump", now, id++), &wall_marker);
}

return wall_marker;
return virtual_wall_marker_creator_.createSlowDownVirtualWallMarker(
debug_data_.slow_start_poses, "speed_bump", clock_->now(), debug_data_.base_link2front,
std::to_string(module_id_));
}

visualization_msgs::msg::MarkerArray SpeedBumpModule::createDebugMarkerArray()
Expand Down
1 change: 1 addition & 0 deletions planning/behavior_velocity_speed_bump_module/src/scene.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class SpeedBumpModule : public SceneModuleInterface

// Debug
DebugData debug_data_;
motion_utils::VirtualWallMarkerCreator virtual_wall_marker_creator_;

bool applySlowDownSpeed(
PathWithLaneId & output, const float speed_bump_speed,
Expand Down