Ask Your Question
0

ROS Indigo in Arch, python3 compatibility problems - fixes?

asked 2016-02-12 15:46:52 -0500

Korken89 gravatar image

Hi all!

I am running ROS on arch linux for a while by "breaking" their standard and forcing python2 to be the default (from python3), but now I have been trying to get ROS running with python3. I have, after some problems, gotten most stuff working but some things I cannot quite figure out how to fix in a good way.

One error I have when trying to start a ROS core is "ImportError: No module named rosmaster.master_api". This comes from ROS only setting the python path for python3 (/opt/ros/indigo/lib/python3.5/site-packages/), what is the recommended way to fix this as I'd like to not mix 2.7 and 3.5.

Is there a way to do this? As in ROS Indigo it should work with python3 ( http://wiki.ros.org/indigo/Migration ).

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-02-12 16:54:28 -0500

joq gravatar image

updated 2016-02-12 16:55:14 -0500

I seriously doubt that many ROS 1 packages (outside the core) actually work unmodified with python3. The recommendation that "all packages should aim to make their Python code work with both Python 2.7 as well as Python 3.3", was just a suggestion. I suspect that very few of them have actually been tested with python3 as the default interpreter.

It's nice of you to do that testing, but don't expect quick results. I would hope that most package maintainers will respond to bug reports for whatever problems you find.

Note that ROS 2 development assumes python3 across the board. Maybe you should try running that.

edit flag offensive delete link more

Comments

Thank you for taking the time! I did try a lot and found what was missing, but in the end it was too much of a hassle to get it working correctly with Python 3. For now, until ROS 2 is ready, I will have to stay with Python 2.

Korken89 gravatar imageKorken89 ( 2016-02-13 10:32:23 -0500 )edit

If you have actual robotics work to do, that is the right choice. If you want to do some testing as a community activity, then fine. Personally, I expect the real migration to happen for ROS 2, not ROS 1.

joq gravatar imagejoq ( 2016-02-13 12:39:08 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-02-12 15:46:52 -0500

Seen: 460 times

Last updated: Feb 12 '16