Skip to content

ROS2 Support #20

@tpanzarella

Description

@tpanzarella

First 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 to ament and making sure it all builds with colcon
  • tf.transformations is not available in ROS2 AFAIK. So, a local copy of transformations.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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions