Skip to content

Conversation

@zbynekwinkler
Copy link
Member

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).

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.
@zbynekwinkler zbynekwinkler requested review from jisa, m3d and pavliik May 18, 2020 14:25
@jisa
Copy link
Collaborator

jisa commented May 18, 2020

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.

@zbynekwinkler
Copy link
Member Author

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 ros_node_proxy.cc + rosmsg.py and this is the first micro-step towards that future.

Copy link
Collaborator

@jisa jisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@m3d
Copy link
Member

m3d commented May 19, 2020

As long as we depend on C++ code (ignition scoring) then I would not switch to Python. Also the problem is not necessary "base Python3" as support of other useful/important modules/libraries (@pavliik would refer more on this). I.e. I would have the same questions as @jisa )

@@ -0,0 +1,14 @@
FROM ubuntu:20.04
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure, that ROS for Ubuntu 18 (Melodic) and Ubuntu 20 (Noetic) are compatible?! (for some older versions this used to be headache)

@pavliik
Copy link
Collaborator

pavliik commented May 20, 2020

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).

@zbynekwinkler
Copy link
Member Author

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.

@zbynekwinkler zbynekwinkler deleted the feature/rospy branch June 5, 2020 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants