@@ -71,55 +71,16 @@ visualization_msgs::msg::MarkerArray createLaneletPolygonsMarkerArray(
71
71
return msg;
72
72
}
73
73
74
- visualization_msgs::msg::MarkerArray createPoseMarkerArray (
75
- const geometry_msgs::msg::Pose & pose, const StateMachine::State & state, const std::string & ns,
76
- const int64_t id, const double r, const double g, const double b)
77
- {
78
- visualization_msgs::msg::MarkerArray msg;
79
-
80
- if (state == StateMachine::State::STOP) {
81
- visualization_msgs::msg::Marker marker_line{};
82
- marker_line.header .frame_id = " map" ;
83
- marker_line.ns = ns + " _line" ;
84
- marker_line.id = id;
85
- marker_line.lifetime = rclcpp::Duration::from_seconds (0.3 );
86
- marker_line.type = visualization_msgs::msg::Marker::LINE_STRIP;
87
- marker_line.action = visualization_msgs::msg::Marker::ADD;
88
- marker_line.pose .orientation = createMarkerOrientation (0 , 0 , 0 , 1.0 );
89
- marker_line.scale = createMarkerScale (0.1 , 0.0 , 0.0 );
90
- marker_line.color = createMarkerColor (r, g, b, 0.999 );
91
-
92
- const double yaw = tf2::getYaw (pose.orientation );
93
-
94
- const double a = 3.0 ;
95
- geometry_msgs::msg::Point p0;
96
- p0.x = pose.position .x - a * std::sin (yaw);
97
- p0.y = pose.position .y + a * std::cos (yaw);
98
- p0.z = pose.position .z ;
99
- marker_line.points .push_back (p0);
100
-
101
- geometry_msgs::msg::Point p1;
102
- p1.x = pose.position .x + a * std::sin (yaw);
103
- p1.y = pose.position .y - a * std::cos (yaw);
104
- p1.z = pose.position .z ;
105
- marker_line.points .push_back (p1);
106
-
107
- msg.markers .push_back (marker_line);
108
- }
109
-
110
- return msg;
111
- }
112
-
113
74
} // namespace
114
75
115
76
motion_utils::VirtualWalls BlindSpotModule::createVirtualWalls ()
116
77
{
117
78
motion_utils::VirtualWalls virtual_walls;
118
79
119
- if (! isActivated () && !is_over_pass_judge_line_ ) {
80
+ if (debug_data_. virtual_wall_pose ) {
120
81
motion_utils::VirtualWall wall;
121
82
wall.text = " blind_spot" ;
122
- wall.pose = debug_data_.virtual_wall_pose ;
83
+ wall.pose = debug_data_.virtual_wall_pose . value () ;
123
84
wall.ns = std::to_string (module_id_) + " _" ;
124
85
virtual_walls.push_back (wall);
125
86
}
@@ -130,19 +91,8 @@ visualization_msgs::msg::MarkerArray BlindSpotModule::createDebugMarkerArray()
130
91
{
131
92
visualization_msgs::msg::MarkerArray debug_marker_array;
132
93
133
- const auto state = state_machine_.getState ();
134
94
const auto now = this ->clock_ ->now ();
135
95
136
- appendMarkerArray (
137
- createPoseMarkerArray (
138
- debug_data_.stop_point_pose , state, " stop_point_pose" , module_id_, 1.0 , 0.0 , 0.0 ),
139
- &debug_marker_array, now);
140
-
141
- appendMarkerArray (
142
- createPoseMarkerArray (
143
- debug_data_.judge_point_pose , state, " judge_point_pose" , module_id_, 1.0 , 1.0 , 0.5 ),
144
- &debug_marker_array, now);
145
-
146
96
appendMarkerArray (
147
97
createLaneletPolygonsMarkerArray (
148
98
debug_data_.conflict_areas , " conflict_area" , module_id_, 0.0 , 0.5 , 0.5 ),
0 commit comments