Robotics StackExchange | Archived questions

How to use python2 and python3 at the same time on ROS melodic

Hi everyone,

I'm fairly new to ROS. My first node is written in Python 2, and my second is written in Python 3. Because it has Python3, the master node is not sending data to the second node. Is there anything I need to install or configure to run Python 2 and Python 3 concurrently? If anyone has any suggestions. Please advise on the best way to resolve this.

Thanks.

Asked by nagi on 2022-09-17 01:06:05 UTC

Comments

Create two separate workspace, say py2_ws and py3_ws. Keep Python 2 codes in py2_ws and so on.

Asked by ravijoshi on 2022-09-17 12:47:48 UTC

Answers

Hi, I think this question has been answered here. As you can see, there are a few workarounds necessary to enable Python 2 and Python 3 nodes on ROS Melodic. For beginners, it could be a little challenging, but it is worth a shot. Good luck!

Asked by tufail on 2023-03-17 11:06:05 UTC

Comments