[ros-users] [Discourse.ros.org] [General] Discussion on ROS to ROS2 transition plan

Martin Günther ros.discourse at gmail.com
Fri Oct 12 08:10:43 UTC 2018

[quote="mkhansen, post:15, topic:6155, full:true"]

In the absence of a shim (I dont know whether that is possible or not, but for the sake of this question assume it isnt), what about a migration tool or script to do 80+% of the migration effort? Would that help ease the transition?


I'm not sure. To be honest, I haven't had time to use ROS2 yet, so I cannot say how similar the APIs are, and therefore how viable it is to write such a script. (BTW, the reason I haven't used ROS2 yet is because it's still missing some features (actions, nav) that we require for our paid projects, so that ruled out ROS2 without even trying, even when starting a new project.)

In the past, I found conversion scripts pretty useful for small upstream API changes that a lot of dependent projects have to do. Some examples are here:


My hunch is that the ROS1 -> ROS2 conversion is more than just a few renames, so it's hard to write a script that gets it right (but I could be wrong here). More importantly, when starting to switch over to ROS2, I would be willing to invest some effort into learning ROS2, and after that doing the conversion manually probably wouldn't be more effort than running an imperfect script and fixing it up afterwards; especially since doing the renames is only 10% of the effort, the other 90% is debugging the subtle changes in behavior that @moritz mentioned. In contrast, any effort put into learning the pluginlib conversions is lost, because you only need that knowledge once. But if it's easy to do, why not write a conversion script and see how well it works.

BTW, here is an example that's probably closer to what a ROS1 -> ROS2 script would look like:


It's a collection of scripts that was used to switch from the old rosbuild system to the new catkin system 5 years ago. I've never found it terribly useful for the reasons I outlined above: I had to learn catkin anyway, and the scripts didn't get it 100% right, so it was easier for me to start off with a clean catkin template and manually move stuff over. It's mostly mechanical work, but you end up with a clean and correct result.


[Visit Topic](https://discourse.ros.org/t/discussion-on-ros-to-ros2-transition-plan/6155/21) or reply to this email to respond.

More information about the ros-users mailing list