subt/docker/rospy: use rospy in python3#497
Conversation
Actually python packages for ros melodic are highly encouraged to support both Python 2.7 and Python 3.5 or later (see https://www.ros.org/reps/rep-0003.html#python). Debian/Ubuntu contain ros melodic natively and in Ubuntu 20.04 it even depends on python3. We should be able to vendor (copy) rospy into our tree and just use it with python3.
|
What is the goal of this PR? To demonstrate it can be done? It is not clear to me if you want to merge this in and if so, why. |
|
That is the trade off for merging early - the benefits are not that obvious/visible. I am not fond of keeping long lived side branches where potentially valuable stuff is hidden. I think rospy in python3 just might be the future of |
jisa
left a comment
There was a problem hiding this comment.
Let's keep track of these lose ends. If there are too many, they may as well not exist, because nobody will remember what are they for and they will just confuse us.
| @@ -0,0 +1,14 @@ | |||
| FROM ubuntu:20.04 | |||
There was a problem hiding this comment.
Are you sure, that ROS for Ubuntu 18 (Melodic) and Ubuntu 20 (Noetic) are compatible?! (for some older versions this used to be headache)
|
I don't have a good experience with using ROS melodic and Python3. It is not difficult to make a single independent module. But once you start doing more with that (e.g. using tf transformations, which is very common in nodes), the tree of dependencies, what must work under python3 is much wider and the problems start there. On my side, I use Melodic with python 2 and I am writing a code that should work on both Python 2 and 3. I plan to switch to python 3 with ROS Noetic (should be released in a couple of weeks). |
|
Since there was no cheering about this PR, I will keep it in my archive so that we don't have too many loose ends in master. Also with the introduction of #523 we have the ability to keep using rospy+python2 which seems to be a good compromise going forward. |
Actually python packages for ros melodic are highly encouraged to support
both Python 2.7 and Python 3.5 or later (see
https://www.ros.org/reps/rep-0003.html#python). Debian/Ubuntu contain
ros melodic natively and in Ubuntu 20.04 it even depends on python3. We
should be able to vendor (copy) rospy into our tree and just use it
with python3.
These are the sources for my rospy cloudsim test with python3 (it worked).