Skip to main content

ROS 2

info

The Robot Operating System (ROS) is open-source set of libraries and tools for building robotics applications. Whatever your application might be ROS 2 provides you with all the plumbing and tools to get it up and running.

ROS2 setup

Next steps according to this instruction : Install ROS 2 :

  • Set locale
  • Setup Sources
  • Install ROS 2 packages
  • Environment setup
  • Sourcing the setup script
  • Try some examplescd inn

All steps by running script, see step 2.

  1. clone git repo z GitLabu branch product-clean do adresáře innobot
    git clone -b innobot https://gitlab.com/INOMECH/projekty/247-univerzalni_ridici_jednotka.git ~/innobot
  2. run the ROS installation on the RPi
    cd ~/innobot  
    ./ros-setup.sh
  3. If you always want /opt/ros/foxy/setup.bash sourced when you open a new bash shell, put the source command at the end of the .bashrc file in your home directory.
    sudo nano ~/.bashrc
    put the source command at the end
    # Set up  environment for ROS2  by sourcing the following file
    echo "Enviroment for ROS2 is set. You have access to the ROS commands."
    source /opt/ros/foxy/setup.bash
    Save and exit (press CTRL + X, press Y and then press ENTER)
  4. when finished, check the installation
    • when you installed on a PC - linux, virtual machine or Windows Subsystem for Linux: ./check-config.bash
    • when you installed on RaspberryPi ./check-config-rpi.bash
  5. if the installation fails with a dump E: Unable to locate package *** there is a problem with Open Robotics GPG key
    • in the command line type:
      sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
  6. if the output FAIL for some library/package, it must be installed manually
    • sudo apt install <debianPackage>, if you need to install the debian package
    • pip install <pythonPackage>, if you need to install the python library