Skip to content

Commit

Permalink
fix(behavior_velocity_virtual_traffic_light_module): properly use the…
Browse files Browse the repository at this point in the history
… VirtualWallMarkerCreator and set unique namespace (#3839)

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
  • Loading branch information
maxime-clem authored May 26, 2023
1 parent 8d9fa4c commit 6b1370b
Showing 1 changed file with 5 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,15 @@ namespace

visualization_msgs::msg::MarkerArray VirtualTrafficLightModule::createVirtualWallMarkerArray()
{
visualization_msgs::msg::MarkerArray wall_marker;

const auto & d = module_data_;
const auto now = clock_->now();

// virtual_wall_stop_line
if (d.stop_head_pose_at_stop_line) {
appendMarkerArray(
virtual_wall_marker_creator_->createStopVirtualWallMarker(
{*d.stop_head_pose_at_stop_line}, "virtual_traffic_light", now),
&wall_marker, now);
}

std::vector<geometry_msgs::msg::Pose> wall_poses;
if (d.stop_head_pose_at_stop_line) wall_poses.push_back(*d.stop_head_pose_at_stop_line);
// virtual_wall_end_line
if (d.stop_head_pose_at_end_line) {
appendMarkerArray(
virtual_wall_marker_creator_->createStopVirtualWallMarker(
{*d.stop_head_pose_at_end_line}, "virtual_traffic_light", now),
&wall_marker, now);
}
if (d.stop_head_pose_at_end_line) wall_poses.push_back(*d.stop_head_pose_at_end_line);

return wall_marker;
return virtual_wall_marker_creator_->createStopVirtualWallMarker(
wall_poses, "virtual_traffic_light", clock_->now(), 0.0, std::to_string(module_id_));
}

visualization_msgs::msg::MarkerArray VirtualTrafficLightModule::createDebugMarkerArray()
Expand Down

0 comments on commit 6b1370b

Please sign in to comment.