How can I better handle two different ros versions?

asked 2021-01-04 08:46:16 -0500

fabian gravatar image

I am trying to connect to a robot running on an older ros version than the one I am using on my computer. So far, I have established an inelegant and unstable (in my eyes) solution and wanted to ask if somebody can suggest a better solution.

The robot runs ros-kinetic and my local computer runs ros-noetic. The two cannot communicate because message versions differ. I, therefore, used a docker image based on ubuntu 16.04 and installed ros-kinetic inside it. To communicate with the robot both based on roscpp and to use rviz, I had to run the docker container with --net host and --privileged and gui options outlined in this tutorial. Unfortunately, I only manage to run one ros-node per container. (If I launch another container via docker exec --container_name I cannot establish a connection with the ros network anymore.) I thus create an entirely new container and install all required dependencies to launch a second ros-node.

I have a feeling the set-up I described above is overly complicated. What is a good practice for communicating with a robot running on a different ros-distro than a locally installed distro? Do I maybe use containers (which seem to be an obvious solution to handle different ros versions) wrongly? I am grateful for any hints and suggestions!

edit retag flag offensive close merge delete

Comments

Could you explain why you are trying to work with two different ros versions? Can the robot be updated to noetic? Can you not downgrade to kinetic?

Akhil Kurup gravatar image Akhil Kurup  ( 2021-01-04 14:01:01 -0500 )edit

Thank you so much for your comment, @akhil! That is a good question - The robot vendor says only ros kinetic is supported and I did not want to risk creating problems by upgrading ros. In addition, I did not want to downgrade the OS on my local machine by two LTS versions. Do you usually try to install the same ros version across devices? Do you maybe install several OSs on different partitions on your computer to interact with robots based on different ros versions?

fabian gravatar image fabian  ( 2021-01-05 00:41:49 -0500 )edit

I have 2 different versions that I work with. I have kinetic on some robots and melodic on my system. Most packages I work with have been built from source. I usually do my development in melodic and deploy in kinetic and I haven't had any issue so far in terms of compatibility. But I don't have to control one from the other, so I don't have a direct answer to your problem. Can you have a dual boot maybe with the lower lts version on your system?

Akhil Kurup gravatar image Akhil Kurup  ( 2021-01-05 10:46:12 -0500 )edit