Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for python3 with ROS1 #429

Closed

Conversation

mathias-luedtke
Copy link
Member

addresses #274

It looks like ROS1 must be rebuilt from scratch in order to support python3.
So I add a ROS_FROM_SCRATCH feature, which uses rosinstall_generator to fetch all released sources.

The latter came in handy add support for noetic (based on Debian Buster) as well.

@mathias-luedtke
Copy link
Member Author

Works, but the auto-generation is not as powerful without ros-infrastructure/rosinstall_generator#25 being fixed.
As a fallback UPSTREAM_WORKSPACE should point to a (generated) rosinstall file.

@arturmiller
Copy link

I have tried this out, with one of my repositories, but I have not been successful. I tried to run ROS melodic with Python3 and got as error message: "env: ‘rosdep’: No such file or directory". Am I missing something? Here is the build report: https://travis-ci.org/arturmiller/pybind11_examples/jobs/628120545#L186
And here is my travis.yml: https://github.com/arturmiller/pybind11_examples/blob/fix/ci/.travis.yml

@mathias-luedtke
Copy link
Member Author

@arturmiller:
If I recall it correctly, I got this error when a dependency pulled in python-catkin-pkg for some reason.
This would replace python3-catkin-pkg and therefore uninstall python3-rosdep.
I will have a look again.

@mathias-luedtke
Copy link
Member Author

when a dependency pulled in python-catkin-pkg

In your case python-rospkg: https://travis-ci.org/arturmiller/pybind11_examples/jobs/628120545#L1154

@arturmiller
Copy link

Just now I see what it takes to support Python3. Your are right a dependency is not Python3 ready. This is the reason for my error. I was able to create a minimal example, which is tested with Melodic and Python3.
I think I found a bug. If the project has no dependencies to other ROS packages, rosinstall-generator throws an error. This is why I have included roscpp as dependency. I don't know if this should be discussed in this PR.
I think this PR is very Important and I'm glad you created it. Many maintainer want to test their projects with Python3 and don't know how. Python2 retires very soon.

@mathias-luedtke
Copy link
Member Author

This is not needed anymore..
noetic is completely supported now and python 3 support for melodic seems to introduduce more problems than it solves.

@mathias-luedtke mathias-luedtke deleted the python3-noetic branch January 27, 2021 14:52
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.

2 participants