Software Setup
SDK installation, SocketCAN driver configuration, ROS2 integration, LeRobot setup, and Python API reference. Everything from a fresh Ubuntu install to a running arm.
Jump to a section:
SDK Installation
The OpenArm SDK is distributed as the roboticscenter Python package. It includes openarm_can (the low-level CAN interface library) and all supporting utilities.
Create a virtual environment (recommended)
python3 -m venv ~/.venvs/openarm
source ~/.venvs/openarm/bin/activate
Install the SDK
pip install roboticscenter
Verify the installation
python3 -c "import openarm_can; print(openarm_can.__version__)"
You should see a version string. If you see an import error, see the Troubleshooting section.
Install from source (optional)
git clone https://github.com/reazon-research/openarm.git
cd openarm
pip install -e .
SocketCAN Driver Setup
OpenArm communicates over CAN bus using SocketCAN — a Linux kernel subsystem. The drivers are already in the kernel; you just need to load the modules and bring up the interface.
Load kernel modules
sudo modprobe can
sudo modprobe can_raw
sudo modprobe slcan # for USB-serial CAN adapters (CANable)
Bring up the CAN interface
For the included CANable 2.0 USB adapter:
# Find the USB serial device (usually /dev/ttyACM0 or /dev/ttyUSB0)
ls /dev/ttyACM*
# Bring up CAN interface at 1 Mbps
sudo slcand -o -c -s8 /dev/ttyACM0 can0
sudo ip link set up can0
Verify the interface is up
ip link show can0
# Expected output: can0: <NOARP,UP,LOWER_UP> mtu 16 ...
Make it persistent across reboots
Create a systemd service or add to /etc/rc.local. See the SocketCAN Setup Guide for a full systemd service template.
Test CAN communication
# Install can-utils
sudo apt install can-utils -y
# Listen for CAN packets
candump can0
# In another terminal, power on the arm and look for motor heartbeats
ROS2 Integration
OpenArm ships with openarm_ros2, a full ros2_control-based package. It supports fake hardware mode for testing without the physical arm.
Install ROS2 Humble (Ubuntu 22.04)
sudo apt update && sudo apt install software-properties-common curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | \
sudo apt-key add -
sudo sh -c 'echo "deb http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" \
> /etc/apt/sources.list.d/ros2.list'
sudo apt update
sudo apt install ros-humble-desktop ros-humble-ros2-control \
ros-humble-ros2-controllers ros-humble-joint-state-publisher-gui -y
Clone and build openarm_ros2
mkdir -p ~/openarm_ws/src && cd ~/openarm_ws/src
git clone https://github.com/reazon-research/openarm_ros2.git
cd ~/openarm_ws
source /opt/ros/humble/setup.bash
colcon build --symlink-install
Launch in fake hardware mode (no arm required)
source ~/openarm_ws/install/setup.bash
ros2 launch openarm_ros2 openarm.launch.py use_fake_hardware:=true
Launch with real hardware
ros2 launch openarm_ros2 openarm.launch.py \
use_fake_hardware:=false \
can_interface:=can0
Send a test motion command
ros2 topic pub /joint_trajectory_controller/joint_trajectory \
trajectory_msgs/msg/JointTrajectory \
'{joint_names: ["joint1"], points: [{positions: [0.5], time_from_start: {sec: 2}}]}'
See the ROS2 Control Guide for full controller configuration, launch file options, and trajectory tuning.
LeRobot Integration
LeRobot (by HuggingFace) is the primary data collection and policy training framework for OpenArm. It handles episode recording, dataset formatting, and interfaces directly with ACT and Diffusion Policy.
Install LeRobot
pip install lerobot
Configure your robot
Create a robot configuration file for OpenArm. LeRobot uses a YAML-based robot config:
# ~/.lerobot/robots/openarm.yaml
robot_type: openarm
can_interface: can0
num_joints: 8
camera_names:
- wrist_cam
- overhead_cam
Record a dataset
python -m lerobot.scripts.control_robot \
--robot.type=openarm \
--control.type=record \
--control.fps=30 \
--control.repo_id=your-username/openarm-pick-place \
--control.num_episodes=50 \
--control.single_task="Pick up the red cube"
Upload to HuggingFace Hub
huggingface-cli login
python -m lerobot.scripts.push_dataset_to_hub \
--repo_id=your-username/openarm-pick-place
See the Data Collection page for the full episode recording workflow and quality checks.
Python API Quickstart
The openarm_can library provides direct low-level access to all 8 joints via SocketCAN. No ROS2 required for basic control.
Basic joint control
from openarm_can import OpenArm
# Connect to the arm
arm = OpenArm(can_interface="can0")
arm.connect()
# Enable all joints
arm.enable_all()
# Move joint 1 to 45 degrees (in radians: ~0.785)
arm.set_position(joint_id=1, position=0.785, kp=50, kd=1)
# Read current state
state = arm.get_state()
print(f"Joint positions: {state.positions}")
print(f"Joint velocities: {state.velocities}")
print(f"Joint torques: {state.torques}")
# Zero torque (safe shutdown)
arm.disable_all()
arm.disconnect()
MIT control mode
from openarm_can import OpenArm, MITCommand
arm = OpenArm(can_interface="can0")
arm.connect()
arm.enable_all()
# Send a MIT control command: position + velocity + torque feedforward
cmd = MITCommand(
joint_id=1,
position=0.5, # rad
velocity=0.0, # rad/s
kp=80.0, # position gain
kd=2.0, # velocity gain
torque_ff=0.0 # feedforward torque (Nm)
)
arm.send_mit_command(cmd)
arm.disable_all()
arm.disconnect()
Reading sensor data in a loop
import time
from openarm_can import OpenArm
arm = OpenArm(can_interface="can0", control_rate_hz=500)
arm.connect()
arm.enable_all()
for _ in range(1000): # 2 seconds at 500 Hz
state = arm.get_state()
print(state.positions)
time.sleep(1 / 500)
arm.disable_all()
arm.disconnect()
Simulation Support
OpenArm supports three simulation environments. All share identical state definitions and action spaces with the real hardware, enabling sim-to-real transfer.
ROS2 Fake Hardware (built-in — no install)
The fastest way to test software without the physical arm. State mirrors the real hardware interface.
ros2 launch openarm_ros2 openarm.launch.py use_fake_hardware:=true
MuJoCo
Calibrated physics model. Ideal for policy training and sim-to-real transfer.
pip install mujoco
# Clone the OpenArm MuJoCo model
git clone https://github.com/reazon-research/openarm_mujoco.git
# Run the default sim
python openarm_mujoco/examples/run_sim.py
NVIDIA Isaac Sim
GPU-accelerated simulation for large-scale synthetic data generation. Requires NVIDIA GPU and Isaac Sim license. See the data-centric platform article for Isaac Sim configuration details.
Sim-to-Real Alignment — OpenArm's simulation models mirror real hardware kinematics, dynamics, and actuation limits. This means you can train a policy in simulation and deploy it directly to real hardware with minimal tuning.
Top 3 Common Issues
no such device can0
The SocketCAN interface is not up. This is almost always because the USB CAN adapter is not connected, or the kernel modules are not loaded.
Fix:
# 1. Check if the USB adapter is detected
lsusb | grep -i "can\|serial"
# 2. Load the modules
sudo modprobe can && sudo modprobe can_raw && sudo modprobe slcan
# 3. Bring up the interface
sudo slcand -o -c -s8 /dev/ttyACM0 can0
sudo ip link set up can0
# 4. Verify
ip link show can0
arm.enable_all()
Motors are not receiving commands. Most commonly caused by incorrect CAN IDs, a CAN bus error frame, or insufficient power supply.
Fix:
# 1. Check for CAN error frames
candump can0 | grep -i "error"
# 2. Check power supply — arm requires 24V @ 150W minimum
# Voltage sag under load causes motor timeouts
# 3. Verify motor CAN IDs match your config
python3 -c "from openarm_can import OpenArm; a=OpenArm('can0'); a.scan_motors()"
# 4. Reset the arm (power cycle) and retry
controller_manager not found
The ros2_control packages are not installed or the workspace is not sourced correctly.
Fix:
# 1. Install missing packages
sudo apt install ros-humble-ros2-control \
ros-humble-ros2-controllers \
ros-humble-joint-state-publisher-gui -y
# 2. Rebuild the workspace
cd ~/openarm_ws && colcon build --symlink-install
# 3. Source both ROS2 and your workspace (order matters)
source /opt/ros/humble/setup.bash
source ~/openarm_ws/install/setup.bash
# 4. Retry launch
ros2 launch openarm_ros2 openarm.launch.py use_fake_hardware:=true
Still stuck? Ask on the OpenArm Forum or check existing GitHub issues.