Skip to content

Commit 2a5cee7

Browse files
committed
feat(add_perception_objects_pointcloud_publisher) update add_pointcloud
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
1 parent 7081786 commit 2a5cee7

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

common/autoware_auto_perception_rviz_plugin/include/object_detection/object_polygon_display_base.hpp

+10-1
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,16 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase
207207
m_marker_common.load(config);
208208
}
209209

210-
void update(float wall_dt, float ros_dt) override { m_marker_common.update(wall_dt, ros_dt); }
210+
void update(float wall_dt, float ros_dt) override
211+
{ m_marker_common.update(wall_dt, ros_dt);
212+
point_cloud_common_->update(wall_dt, ros_dt);
213+
}
211214

212215
void reset() override
213216
{
214217
RosTopicDisplay::reset();
215218
m_marker_common.clearMarkers();
219+
point_cloud_common_->reset();
216220
}
217221

218222
void clear_markers() { m_marker_common.clearMarkers(); }
@@ -227,6 +231,11 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase
227231
m_marker_common.addMessage(markers_ptr);
228232
}
229233

234+
void add_pointcloud(const sensor_msgs::msg::PointCloud2::ConstSharedPtr cloud)
235+
{
236+
point_cloud_common_->addMessage(cloud);
237+
}
238+
230239
// transform detected object pose to target frame and return bool result
231240
bool transformObjects(
232241
const MsgT & input_msg, const std::string & target_frame_id, const tf2_ros::Buffer & tf_buffer,

common/autoware_auto_perception_rviz_plugin/src/object_detection/detected_objects_display.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ void DetectedObjectsDisplay::onObjectsAndObstaclePointCloud(
173173
output_pointcloud_msg_ptr->header = input_pointcloud_msg->header;
174174

175175
// publisher->publish(*output_pointcloud_msg_ptr);
176-
point_cloud_common_->addMessage(output_pointcloud_msg_ptr);
176+
// point_cloud_common_->addMessage(output_pointcloud_mbsg_ptr);
177+
add_pointcloud(output_pointcloud_msg_ptr);
177178
}
178179

179180
} // namespace object_detection

common/autoware_auto_perception_rviz_plugin/src/object_detection/predicted_objects_display.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ void PredictedObjectsDisplay::onObjectsAndObstaclePointCloud(
327327
output_pointcloud_msg_ptr->header = input_pointcloud_msg->header;
328328

329329
// publisher->publish(*output_pointcloud_msg_ptr);
330-
point_cloud_common_->addMessage(output_pointcloud_msg_ptr);
330+
add_pointcloud(output_pointcloud_msg_ptr);
331331
}
332332

333333
} // namespace object_detection

common/autoware_auto_perception_rviz_plugin/src/object_detection/tracked_objects_display.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ void TrackedObjectsDisplay::onObjectsAndObstaclePointCloud(
213213
output_pointcloud_msg_ptr->header = input_pointcloud_msg->header;
214214

215215
// publisher->publish(*output_pointcloud_msg_ptr);
216-
point_cloud_common_->addMessage(output_pointcloud_msg_ptr);
216+
// point_cloud_common_->addMessage(output_pointcloud_msg_ptr);
217+
add_pointcloud(output_pointcloud_msg_ptr);
217218
}
218219

219220
} // namespace object_detection

0 commit comments

Comments
 (0)