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

feat(autoware_auto_perception_rviz_plugin): add perception objects pointcloud publisher #3097

Open
wants to merge 68 commits into
base: main
Choose a base branch
from

Conversation

lexavtanke
Copy link
Contributor

Description

This PR adding new function to autoware_auto_perception_rviz_plugin. Now it has ability to publish point cloud of detected objects. It improve visualization of perception pipeline.
This feature can be enabled/disabled in control panel of the plugin by toggling Publish Objects Pointcloud property.
New point cloud plugin should be added to autoware config to visualize output of the plugin. Like it's shown in this video.

Output topics for point clouds:

  • /rviz2/output/predicted_objects_pointcloud
  • /rviz2/output/detected_objects_pointcloud
  • /rviz2/output/tracked_objects_pointcloud

Video demo with predicted objects from autoware demo bagfile.

Related links

This feature was discussed here 2860.

Tests performed

This feature was tested manually against sample rosbag from Rosbag replay simulation demo. I didn't find any reduces in performance.

Notes for reviewers

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

lexavtanke and others added 21 commits February 22, 2023 18:13
…d scripts

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…o_perception_plugin subscription to pointclouds and publishing pointclouds

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…message templated plugins, builds, but not woking correctly . Add rviz lauch file for debugging. modify package.xml

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…ntcloud_publisher' into feat/add_perception_objects_pointcloud_publisher
…o_rviz plugin to publish pointclouds

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…use objectsCallback to update objects

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…back to plugin

hardcoded topic names, one color for all classes of objects
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…ntcloud_publisher' into feat/add_perception_objects_pointcloud_publisher
…rent object classes

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…/disable publish poincloud

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…input pointcloud

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…and config

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
@github-actions github-actions bot added component:common Common packages from the autoware-common repository. (auto-assigned) type:documentation Creating or refining documentation. (auto-assigned) labels Mar 16, 2023
pre-commit-ci bot and others added 2 commits March 16, 2023 15:58
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…terpoint confing file

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
@github-actions github-actions bot removed the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Mar 23, 2023
@lexavtanke lexavtanke marked this pull request as ready for review March 23, 2023 09:32
Copy link
Contributor

@kaancolak kaancolak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Alexey @lexavtanke, I left out some comments.

object.classification;
object_info info = {
object.shape, object.kinematics.initial_pose_with_covariance.pose, object.classification};
objs_buffer.push_back(info);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to have the obj_buffer? input_objs_msgs already have the same content

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no objs_buffer but I still use conversion to object_info to unify data for filterPolygon function and keep in base class.


sync_ptr = std::make_shared<Sync>(
SyncPolicy(10), perception_objects_subscription, pointcloud_subscription);
sync_ptr->registerCallback(&PredictedObjectsDisplay::onObjectsAndObstaclePointCloud, this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of message_filters::Synchronizer, maybe we can use a different callback for point cloud and objects message. if the m_publish_objs_pointcloud boolean variable is true, we can synchronize them based on their timestamps. Also in this way, we can subscribe/unsubscribe point cloud messages according to the "m_publish_objs_pointcloud" variables status. if "m_publish_objs_pointcloud" is false, we don't need to subscribe to the point cloud. Additionally, this logic makes it possible to change the point cloud topic name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated this part. Now there is separate callback for poincloud messages.

@@ -147,6 +226,62 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase
m_marker_common.addMessage(markers_ptr);
}

void add_pointcloud(const sensor_msgs::msg::PointCloud2::ConstSharedPtr cloud)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can resize the point Size (Pixel) for better visualization, by default, points

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is already build-in.

lexavtanke and others added 21 commits March 30, 2023 11:24
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
… off, but update of the pointcloud topic doesn't work

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…opic works

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…t pointcloud by timestamp, builds, but crused on runtime

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…r guard

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…us and onObjectsAndObstaclePointCloud

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…from

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…ud to tracked and predicted

works but sometime core dumped 
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…stPointCloud

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…earest poincloud , works on planning simulator

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…t pointcloud buffer

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…c update

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
@stale
Copy link

stale bot commented Sep 17, 2023

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:common Common packages from the autoware-common repository. (auto-assigned) status:stale Inactive or outdated issues. (auto-assigned) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants