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

Should provide additional conversions #159

Open
1 of 5 tasks
EricCousineau-TRI opened this issue Oct 20, 2022 · 3 comments
Open
1 of 5 tasks

Should provide additional conversions #159

EricCousineau-TRI opened this issue Oct 20, 2022 · 3 comments

Comments

@EricCousineau-TRI
Copy link
Collaborator

EricCousineau-TRI commented Oct 20, 2022

Follow-up to #153.

This is primarily in service of ROS 2 development in Anzu. Integration with Drake is a close second, though.
We should either provide these here, or as a package in this workspace.

We should provide both C++ and Python conversions, and exercise them.

  • Python versions of geometry_conversions.h (either bindings, or reimplementations)
  • Eigen matrices / NumPy arrays
  • Point Clouds (\cc @hongkai-dai)
    • This could be Eigen matrices, and/or Open3D types.
  • Images

\cc @IanTheEngineer @sloretz

@EricCousineau-TRI EricCousineau-TRI changed the title conversions: Additional conversions to provide Should provide additional conversions Oct 20, 2022
@adityapande-1995
Copy link
Collaborator

Made an upstream ticket for ROS messages to be typecastable from python to C++ : ros2/rosidl#723

@adityapande-1995
Copy link
Collaborator

adityapande-1995 commented Feb 13, 2023

Update :

@adityapande-1995
Copy link
Collaborator

adityapande-1995 commented Apr 4, 2023

@EricCousineau-TRI For pointclouds, IIUC, we need a conversion between the python and C++ ros message type (using something more efficient then serializing-deserializing) and then between the C++ pointcloud message and drake C++ type, right ?

If I look at geometry_conversions, what we are doing for say quaternion is :

  • python ros msg -> C++ ros msg -> C++ drake type -> python drake type -> return to python world
  • python drake type -> C++ drake type -> C++ ros msg -> python ros msg -> return to python world

Assuming we want the same for pointclouds, this would require 2 conversions :

  1. C++ ROS PointCloud & PointCloud2 message <-> drake::perception::PointCloud
  2. C++ ROS msg PointCloud & PointCloud2 <-> Python equivalents, not using serialization, but something more efficient.

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

No branches or pull requests

2 participants