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

Noetic and Python 3 Plan #303

Closed
sloretz opened this issue Oct 16, 2019 · 7 comments
Closed

Noetic and Python 3 Plan #303

sloretz opened this issue Oct 16, 2019 · 7 comments

Comments

@sloretz
Copy link
Contributor

sloretz commented Oct 16, 2019

Is there a plan for this repo to support Noetic and Python 3? In case you haven't seen it, there's a tutorial on the ROS wiki about transitioning to Python 3.

It looks like vision_opencv does not have a source entry for Noetic and is directly blocking 54 other repos. A source entry signals to other packages it is being worked on, and makes it possible for downstream maintainers to use rosinstall_generator to download their dependencies while they work on Python 3 incompatibilities.

For starters, these rosdep keys will need to be switched to python 3 equivalents, and all the equivalents already exist:

<build_depend>python</build_depend>
<build_depend>python-opencv</build_depend>

<exec_depend>python</exec_depend>
<exec_depend>python-opencv</exec_depend>

<test_depend>python-numpy</test_depend>

@Rayman
Copy link

Rayman commented Oct 16, 2019

Something like this?

    <depend condition="$ROS_PYTHON_VERSION == '2'">python-numpy</depend>
    <depend condition="$ROS_PYTHON_VERSION == '3'">python3-numpy</depend>

@sloretz
Copy link
Contributor Author

sloretz commented Oct 17, 2019

Yup, minus the single quotes. The package.xml format will need to be bumped to 3 too.

See rospy's package.xml and ros/genpy#104 for examples of conditional dependencies on ROS_PYTHON_VERSION.

@hhansen-bdai
Copy link

Just commenting here to show my interest in also getting this to Noetic/Python3 compatibility

@seanyen
Copy link
Contributor

seanyen commented Feb 25, 2020

Commenting here for another Python3 related issue:

find_package(Boost REQUIRED python3)

On Windows, the naming scheme to look for boost python 3 is little different from Debian/Ubuntu. In this particular case, I have to change it to look for python37 to match my run-time. The similar issue is also discussed here: https://gitlab.kitware.com/cmake/cmake/issues/16391

We probably need a more robust way to find boost python 3 module.

UPDATED:
Adding related docs: https://cmake.org/cmake/help/latest/module/FindBoost.html

Note that Boost Python components require a Python version suffix (Boost 1.67 and later), e.g. python36 or python27 for the versions built against Python 3.6 and 2.7, respectively. This also applies to additional components using Python including mpi_python and numpy. Earlier Boost releases may use distribution-specific suffixes such as 2, 3 or 2.7. These may also be used as suffixes, but note that they are not portable.

UPDATED:
https://cmake.org/cmake/help/v3.13/module/FindPythonLibs.html

Deprecated since version 3.12: Use FindPython3, FindPython2 or FindPython instead.

@sloretz
Copy link
Contributor Author

sloretz commented Mar 12, 2020

Hey @vrabaud, friendly ping. What's the plan for vision_opencv supporting Python 3 and ROS Noetic?

@mjcarroll
Copy link
Contributor

@ahcorde is going to work this, PR: #323

@sloretz
Copy link
Contributor Author

sloretz commented Apr 13, 2020

Thanks for releasing! ros/rosdistro#24373

@sloretz sloretz closed this as completed Apr 13, 2020
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

No branches or pull requests

5 participants