ROS 2 Setup

ROS 2 Installation

See the ROS 2 Humble installation guide for instructions on how to install ROS 2 Humble on your system. We recommend using the deb package installation method for Ubuntu 22.04.

Trossen Arm Workspace Setup

  1. Create a ROS 2 workspace and clone the trossen_arm_ros repository into it:

    mkdir -p ~/ros2_ws/src
    cd ~/ros2_ws/src
    git clone -b humble https://github.com/TrossenRobotics/trossen_arm_ros.git
    
  2. Install the dependencies using rosdep and vcs:

    cd ~/ros2_ws
    vcs import src < src/trossen_arm_ros/dependencies.repos
    rosdep install --from-paths src --ignore-src -r -y
    
  3. Build the workspace:

    cd ~/ros2_ws
    colcon build --symlink-install
    

Tip

After building the workspace, you must source it to make the packages available in your environment:

source ~/ros2_ws/install/setup.bash

You can add this line to your ~/.bashrc file to automatically source the workspace every time you open a new terminal.

echo "source ~/ros2_ws/install/setup.bash" >> ~/.bashrc

What’s Next?

With ROS 2 installed and your Trossen Arm workspace set up properly, continue on to the next tutorial to learn how to visualize the Trossen Arm in the Trossen Arm Description package.