skip to Main Content

I am trying to install ROS Noetic on a Raspberry Pi 4 and I came across this error while executing this command from the official guide:

userk@dopamine:~/development/ros_catkin_ws $ ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
[...]
File "~/development/ros_catkin_ws/build_isolated/rosbash/catkin_generated/generate_cached_setup.py", line 12, in <module>
    from catkin.environment_cache import generate_environment_script
ModuleNotFoundError: No module named 'catkin'

Ros Noetic supports Ubuntu Focal and Debian Buster.

userk@dopamine:~/development/ros_catkin_ws $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:    10
Codename:   buster

Do you have any advice?

2

Answers


  1. I think your question is a more meta-misunderstanding of ROS. ROS (sofar) is strongly linked to the Ubuntu version. If you have Ubuntu 20 installed, I strongly recommend installing ROS Noetic via apt. If you want to use ROS on the Pi, you should stick to a Ubuntu LTS version (16/18/20) for maximal support.

    Login or Signup to reply.
  2. I had this error too and solved it. It came for me from a mixup between python2 and python3 during build. Use ROS_PYTHON_VERSION environment variable to force build with a specific version of python.

    Debian Buster IS a supported OS for noetic, though not the main one which is Ubuntu Buster. OP does not need to be told “Noetic should not be installed on this OS”, he/she needs help to solve his/her issue. Solving a problem is better than just eluding it, in my opinion.

    My setup is a bit more tricky:

    • hardware: Raspberry Pi 4
    • OS: raspbian buster
    • Installing ROS noetic (currently 1.15.7) in a docker image which guest OS is raspbian buster too, so it should be the same as installing it directly on host OS.
    • Using python3 to install ROS

    Instructions below. I hope it will help.

    mkdir ~/catkin_ws && cd ~/catkin_ws
    export ROS_DISTRO="noetic"
    # I very strongly advise to set Python version used by ROS
    # otherwise the packages will mix up python2 and python3 during build
    # finally leading to the error you encountered (just like me before)
    export ROS_PYTHON_VERSION="3"
    # disable languages that I don't need
    export ROS_LANG_DISABLE="geneus:genlisp:gennodejs"
    sh -c 'echo "deb http://packages.ros.org/ros/ubuntu buster main" > /etc/apt/sources.list.d/ros-latest.list'
    apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
    apt-get update
    apt-get install python3-rosdep python3-rosinstall-generator python3-vcstool build-essential
    apt-get install -y ca-certificates && rosdep init && rosdep update
    # Remove/add packages to get an installation covering your needs.
    rosinstall_generator --rosdistro noetic --deps --tar 
            ros_comm             
            actionlib            
            sensor_msgs          
            image_common         
            vision_opencv        
            > noetic-computervision.rosinstall
    mkdir ./src && vcs import --input noetic-computervision.rosinstall ./src
    rosdep install --from-paths ./src --ignore-packages-from-source --rosdistro noetic -y
    python3 ./src/catkin/bin/catkin_make_isolated --install --install-space /opt/ros/noetic -DCMAKE_BUILD_TYPE=Release
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search