ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ImportError when building ROS2 Bouncy Bolson on Ubuntu 16.04 from source

asked 2018-07-07 09:50:23 -0500

thinwybk gravatar image

When building ROS2 BB from source I get the following ImportError:

--- stderr: uncrustify_vendor                                         
ImportError: 'from ament_package import parse_package_string' failed: cannot import name 'parse_package_string'
Make sure that you have installed 'ament_package', it is up to date and on the PYTHONPATH.

Is there missing something in the wiki.ros2.org install from source instructions? Or is this related to another problem specific to my OS setup?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-07-07 14:52:33 -0500

marguedas gravatar image

It looks like you are using an outdated version of the code. There are no package in Bouncy that still uses ament_package to parse package.xml files. Now the package parsing is done using catkin_pkg. As a consequence the parse_package_string function has been removed from ament_package

Can you make sure to download the Bouncy version of the code for all repositories?

I recommend doing it in an empty workspace to make sure you don't have any legacy Ardent repositories in your workspace.

You can do so by running:

mkdir -p bouncy_ws/src
wget https://raw.githubusercontent.com/ros2/ros2/release-latest/ros2.repos
vcs import src < ros2.repos
edit flag offensive delete link more

Comments

Thx for letting me know. I have setup ROS2 Bouncy on Ubuntu 18.04 via deb packages yesterday which seems to be the best fit for playing around with both, ROS2 Bouncy and ROS1 Melodic. I will not try out the "install from source" variant again but I guess the solution would have fix the issue.

thinwybk gravatar image thinwybk  ( 2018-07-09 01:31:47 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-07-07 09:50:23 -0500

Seen: 169 times

Last updated: Jul 07 '18