ROS2 Support
See original GitHub issueFirst off, thanks for the nice work on this project. We use it heavily in our analysis stack.
I had looked to see if there was ROS2 support for ros_numpy
and could not find it anywhere. To that end, I’ve forked the repo and ported it so that this package now works with ROS2 Foxy. My working repo is here with the relevant branch being foxy-devel
(it should be the default).
All unit tests are passing and I also tested it live against an Ouster LiDAR, ROS2 Foxy, Cyclone DDS, where I was only calling numpify(...)
on a PointCloud2
and that seems to be working as well. I will do some deeper checks to further ensure correctness.
There was some effort involved in the port. The big things being:
- Moving from
catkin
toament
and making sure it all builds withcolcon
tf.transformations
is not available in ROS2 AFAIK. So, a local copy oftransformations.py
has been added to the project- Some of the msg field constructors in ROS2 were incompatible with the current code base so I ported those too
- I took the liberty to convert tabs to spaces. I hope that does not offend anyone.
The full diff is here.
All of the above said, if you think the port is acceptable, it would be great to figure out how to best keep the ROS and ROS 2 projects together. I’m open to any suggestions.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:5
Top GitHub Comments
Providing an update here…
I’d like to try to get
ros_numpy
into the ROS 2 Foxy distribution. To attempt to facilitate that, I have taken the following steps in my fork:ros2_numpy
so it will not conflict withros_numpy
. However, the fork relationship on Github has been preserved.2.0.3
. TheMAJOR
was set to2
to indicate ROS 2. TheMINOR
andPATCH
were left as0
and3
respectively to preserve provenance to the the ROS 1ros_numpy
from which the ROS 2 port was bootstrapped. I did not really want to do that, however, AFAIK a unique release tag is necessary to integrate with the ROS 2 bloom release machinery.2.0.3
in my fork.Again, I’d love some feedback as to how to best keep the ROS 1 and ROS 2 ports of this project together. The steps I have taken (short of any feedback) seems to me to be a reasonable way forward.
Thoughts, comments, etc. are welcome and encouraged. Thank you.
You can import it into your workspace ‘src’ folder and use colcon build to make the workspace.
If it fails, use rosdep to install the required depends before building