ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ros1_bridge: Python approach

asked 2020-10-16 11:19:12 -0500


I am using ros1_bridge with custom messages (baxter_core_msgs) and this requires re-compiling the bridge regularly which is pretty long. I ended up writing a custom Python bridge for a few particular messages. Playing with ROS1 / ROS2 modules with the same name is a bit of an issue but is manageable.

I'll be presenting ROS2 for more and more people in the next months and I know some of my audience use a lot of custom ROS1 messages. What brings hope in transitioning from ROS1 to ROS2 is that you can always rely on a bridge while some of the packages are still ROS1. Porting messages to ROS 2 is straightforward but the bridge compilation is an issue to my point of view. So I'd like to be allowed to say that they can just fire up a generic bridge and forget about recompiling a heavy C++ code every time there is an upgrade.

Are there any current works on a generic Python ros1_bridge?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-10-16 11:32:57 -0500

Dirk Thomas gravatar image

I don't think there is any current work towards this. The main reason is probably that the performance of a Python based bridge will be significantly lower (due to the need to copy the data between C and Python back and forth).

But if that is not an issue for your use cases it would certainly be more convenient to use with custom messages.

edit flag offensive delete link more


Thanks, indeed it makes sense that a bridge should be as fast as possible. In our case we have a few lightweight messages (similar to JointState of dim. 15 at worst) and Python is far enough.

I guess the good practice with custom messages it to have a dedicated overlay for ros1_bridge as it has to be carefully compiled.

Olivier Kermorgant gravatar image Olivier Kermorgant  ( 2020-10-21 03:58:43 -0500 )edit

Question Tools



Asked: 2020-10-16 11:19:12 -0500

Seen: 279 times

Last updated: Oct 16 '20