Skip to content

Commit 6b1370b

Browse files
authored
fix(behavior_velocity_virtual_traffic_light_module): properly use the VirtualWallMarkerCreator and set unique namespace (#3839)
Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
1 parent 8d9fa4c commit 6b1370b

File tree

1 file changed

+5
-18
lines changed
  • planning/behavior_velocity_virtual_traffic_light_module/src

1 file changed

+5
-18
lines changed

planning/behavior_velocity_virtual_traffic_light_module/src/debug.cpp

+5-18
Original file line numberDiff line numberDiff line change
@@ -52,28 +52,15 @@ namespace
5252

5353
visualization_msgs::msg::MarkerArray VirtualTrafficLightModule::createVirtualWallMarkerArray()
5454
{
55-
visualization_msgs::msg::MarkerArray wall_marker;
56-
5755
const auto & d = module_data_;
58-
const auto now = clock_->now();
59-
6056
// virtual_wall_stop_line
61-
if (d.stop_head_pose_at_stop_line) {
62-
appendMarkerArray(
63-
virtual_wall_marker_creator_->createStopVirtualWallMarker(
64-
{*d.stop_head_pose_at_stop_line}, "virtual_traffic_light", now),
65-
&wall_marker, now);
66-
}
67-
57+
std::vector<geometry_msgs::msg::Pose> wall_poses;
58+
if (d.stop_head_pose_at_stop_line) wall_poses.push_back(*d.stop_head_pose_at_stop_line);
6859
// virtual_wall_end_line
69-
if (d.stop_head_pose_at_end_line) {
70-
appendMarkerArray(
71-
virtual_wall_marker_creator_->createStopVirtualWallMarker(
72-
{*d.stop_head_pose_at_end_line}, "virtual_traffic_light", now),
73-
&wall_marker, now);
74-
}
60+
if (d.stop_head_pose_at_end_line) wall_poses.push_back(*d.stop_head_pose_at_end_line);
7561

76-
return wall_marker;
62+
return virtual_wall_marker_creator_->createStopVirtualWallMarker(
63+
wall_poses, "virtual_traffic_light", clock_->now(), 0.0, std::to_string(module_id_));
7764
}
7865

7966
visualization_msgs::msg::MarkerArray VirtualTrafficLightModule::createDebugMarkerArray()

0 commit comments

Comments
 (0)