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

Added RGBD example #323

Closed

Conversation

ahcorde
Copy link
Collaborator

@ahcorde ahcorde commented Dec 22, 2023

Added two systems:

  • System to publish CameraInfo
    • publish camera_info topic
  • System to publish color image and depth image
    • publish depth and image sensor_msgs/msg/Image topics

Example includes:

  • cart pole
  • RGBD camera
  • RGBD camera info

Then with depth_image_proc it's possible to generate the cloud point

TODOs:

  • Check why the point cloud is not aligned with the real position of the cart pole
  • Clean code
  • Fix CI
cart_pole_drake.mp4

For testing just launch

ros2 launch drake_ros_examples rgbd_launch.py

This change is Reviewable

Signed-off-by: Alejandro Hernández Cordero <[email protected]>
@ahcorde ahcorde marked this pull request as draft December 22, 2023 16:35
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
@ahcorde ahcorde marked this pull request as ready for review December 28, 2023 19:37
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Copy link
Collaborator

@adityapande-1995 adityapande-1995 left a comment

Choose a reason for hiding this comment

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

Mostly looking good, a partial review here with some minor changes. Trying out the examples and tests

drake_ros/core/camera_info_system.cc Outdated Show resolved Hide resolved
drake_ros/core/camera_info_system.cc Show resolved Hide resolved
drake_ros/core/camera_info_system.h Outdated Show resolved Hide resolved
drake_ros/core/rgbd_system.h Outdated Show resolved Hide resolved
Copy link
Collaborator

@adityapande-1995 adityapande-1995 left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 26 files at r1, 1 of 11 files at r2.
Reviewable status: 2 of 28 files reviewed, 5 unresolved discussions (waiting on @ahcorde)

Copy link
Collaborator

@adityapande-1995 adityapande-1995 left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 26 files at r1.
Reviewable status: 6 of 28 files reviewed, 7 unresolved discussions (waiting on @ahcorde)

Copy link
Collaborator

@adityapande-1995 adityapande-1995 left a comment

Choose a reason for hiding this comment

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

Can we add a README here with the rgbd example ? It contains a cc executable, a py executable, launch files, and rviz configs. The cc and py executables have bazel targets, but the launch files won't work using bazel, so it might be confusing to users, as to how to run these examples. We could have a "run this using colcon" or "run this using bazel" guide.

Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Copy link
Collaborator

@adityapande-1995 adityapande-1995 left a comment

Choose a reason for hiding this comment

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

Still trying to debug the rgbd_py target, I get a "libclang not found" error, even after installing clang. Not sure whats happening there. Otherwise, this looks mostly good to me, and can approve once this is resolved. When running the example, I saw the pointcloud image was lagging behind the camera image in rviz, though I don't think this is a problem with this PR or the systems written here.

drake_ros_examples/examples/rgbd/BUILD.bazel Show resolved Hide resolved
Copy link
Collaborator

@adityapande-1995 adityapande-1995 left a comment

Choose a reason for hiding this comment

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

LGTM ! Maybe we could add a readme note about the lag between the camera and pointcloud images.

Copy link
Collaborator

@adityapande-1995 adityapande-1995 left a comment

Choose a reason for hiding this comment

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

Reviewed 9 of 26 files at r1, 7 of 11 files at r2, 1 of 2 files at r3, 8 of 8 files at r4, all commit messages.
Reviewable status: all files reviewed, 8 unresolved discussions (waiting on @ahcorde)

Copy link
Collaborator

@adityapande-1995 adityapande-1995 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: all files reviewed, 8 unresolved discussions (waiting on @ahcorde)

Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
@adityapande-1995
Copy link
Collaborator

Probably needs a rebase to main, seems like a C++ 20 error.

ahcorde added 2 commits March 27, 2024 10:39
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
@EricCousineau-TRI
Copy link
Collaborator

I'll take this PR and try to land a version of it rebased on latest main, thanks!

@EricCousineau-TRI
Copy link
Collaborator

Closing in lieu of #355

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants