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

ImportError when running catkin_make_isolated

asked 2018-06-14 12:29:14 -0500

pepijndevos gravatar image

I'm following the source installation on Debian Stretch on an armel platform. When I come to the final step of running catkin_make_isolated, I get the following error:

$ ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
Traceback (most recent call last):
  File "./src/catkin/bin/catkin_make_isolated", line 12, in <module>
    from catkin.builder import build_workspace_isolated
  File "./src/catkin/bin/../python/catkin/builder.py", line 66, in <module>
    from catkin_pkg.terminal_color import ansi, disable_ANSI_colors, fmt, sanitize
ImportError: No module named terminal_color

It seems this is due to a version mismatch, but I'm not sure where exactly. I'm running this in a Docker file, so it should be very reproducible:

FROM ev3dev/ev3dev-stretch-ev3-generic

RUN echo "robot ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

RUN apt-get install --yes --no-install-recommends python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential 

RUN rosdep init
USER robot
RUN rosdep update

RUN mkdir /home/robot/ros_catkin_ws
WORKDIR /home/robot/ros_catkin_ws

RUN rosinstall_generator robot --rosdistro melodic --deps --exclude roslisp --tar > melodic-robot.rosinstall
RUN wstool init -j8 src melodic-robot.rosinstall

RUN rosdep install --os=debian:stretch --from-paths src --ignore-src --rosdistro melodic -y

RUN ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
edit retag flag offensive close merge delete

Comments

I can't check (as I don't have an arm board to run this on), but check that python does not point to python3 in ev3dev/ev3dev-stretch-ev3-generic. Afaik all ROS Python pkgs are released for Python 2. If terminal_color has been installed for Python 3, Python 2 will not find it.

gvdhoorn gravatar image gvdhoorn  ( 2018-06-14 12:46:40 -0500 )edit
1

Debian gives me a really old version of catkin_pkg. I did a pip install -U catkin_pkg and that soled that particular issue. But going full pip instead of deb, get me issues with roslisp that is trying to install packages that don't exist. How can I tell it to exclude that?

pepijndevos gravatar image pepijndevos  ( 2018-06-14 16:49:20 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-06-15 03:19:57 -0500

gvdhoorn gravatar image

Debian gives me a really old version of catkin_pkg.

Ah, I think I know what is going on. You're using Debian upstream packages. Please read the page I linked. I'm not sure, but mixing this might not be a good idea.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-06-14 12:29:14 -0500

Seen: 956 times

Last updated: Jun 14 '18