question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

6reactions
tpanzarellacommented, Jul 12, 2020

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:

  • I’ve renamed my fork to ros2_numpy so it will not conflict with ros_numpy. However, the fork relationship on Github has been preserved.
  • I initialized the version numbering of the ROS 2 port to 2.0.3. The MAJOR was set to 2 to indicate ROS 2. The MINOR and PATCH were left as 0 and 3 respectively to preserve provenance to the the ROS 1 ros_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.
  • Building on the previous point, I created a new release tag for 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.

0reactions
krishk16commented, Feb 26, 2021

Thanks for the great work! I used to build ros_numpy using python3 setup.py install. How to use your fork in ROS2 Foxy?

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

ROS 2 Documentation: Foxy documentation
You're reading the documentation for an older, but still supported, version of ROS 2. For information on the latest version, please have a...
Read more >
bponsler/ros2-support: Collection of information ... - GitHub
ros2 -support. Collection of information/scripts pertaining to ROS 2 development. Tutorials/Guides. Below are various tutorials provided by this repository:.
Read more >
ROS 2 Custom Message Support - MATLAB & Simulink
Use custom messages to extend the set of message types currently supported in ROS 2. If you are sending and receiving supported message...
Read more >
Changes between ROS 1 and ROS 2 - ROS 2 Design
Every ROS package is a CMake project. In ROS 2 other build systems can be easily supported. For now the build tool supports...
Read more >
6. ROS & ROS 2 Installation - NVIDIA Omniverse Documentation
Omniverse Isaac Sim provides both a ROS and ROS 2 bridge for ROS system integration. ... There is experimental ROS2 Foxy support on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found