Skip to content

XRC ROS

This document describes how to setup and run the XRC ROS packages.

If you have completed the setup or are looking for running instructions, see below, "Running" section.

Setup

Raspberry Pi

  1. Follow instructions: https://ubuntu.com/download/raspberry-pi
    • Our recommended setup consists of Raspberry Pi 4 (8 Gb) and Ubuntu 24.04 LTS (server)
    • Use the Raspberry Pi Imager tool to set up your board.

ROS 2 installation

At the time of writing (spring 2025), we recommend using the ROS 2 Jazzy distribution. Follow the installation instructions for Ubuntu here: https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debs.html

  • Make sure to install the development tools.
  • For our purposes, the ROS 2 base (bare bones) version is enough. Note that this does not include ROS 2 example packages.
  • Don't install additional RMW implementations

After completing the above steps, verify your installation:

First, source the ROS installation

source /opt/ros/jazzy/setup.bash
Note: We recommend adding the source statement to your ~/.bashrc script for convenience.

Then, test the ros2 statement

ros2 -h
This should list ROS 2 commands if the installation was successful.

ROS 2 environment setup

After installing ROS 2 you will set up your workspace. We recommend the following steps: * Create your workspace directory in your home directory:

mkdir ros2_ws

Then create your src directory:

cd ~/ros2_ws
mkdir src

Import packages

Dynamixel SDK

Make sure you are inside your workspace src directory.

Clone the Jazzy branch of Unity's ROS-TCP-Endpoint repository.

git clone -b jazzy https://github.com/ROBOTIS-GIT/DynamixelSDK

Note that this will clone the entire Dynamixel SDK, although we will only use the contents of the ros directory.

XRC ROS

Make sure you are inside your workspace src directory.

Clone the XRC ROS repository.

git clone https://github.com/xrcollaboratory/xrc-ros

Unity ROS-TCP-Endpoint

Make sure you are inside your workspace src directory.

Clone the ROS 2 branch of Unity's ROS-TCP-Endpoint repository

git clone -b main-ros2 https://github.com/Unity-Technologies/ROS-TCP-Endpoint

Building

After importing all the packages, now you will need to build your packages. Make sure to only build in this directory, not in the src directory or elsewhere in your environment.

cd ~/ros2_ws

colcon build

After building you will need to source your workspace:

source install/setup.bash
Note: We recommend adding the source statement to your ~/.bashrc script for convenience.

Running

ROS-TCP-Endpoint

ros2 run ros_tcp_endpoint default_server_endpoint --ros-args -p ROS_IP:=<your IP address>

See here for information: https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/ros_unity_integration/setup.md

XRC Motor

Open a new terminal window. Make sure to source your ROS environment and your installed packages:

source /opt/ros/jazzy/setup.bash
cd ~/ros2_ws
source install/setup.bash

In a separate terminal window, run the dynamixel_controller_node from the xrc_motor package:

ros2 run xrc_motor dynamixel_controller_node

For running the node for a specific motor, such as ID 7, use the following command:

ros2 run xrc_motor dynamixel_controller_node --ros-args -p dxl_id:=7