Skip to main content

reBot Arm B601-DM in LeRobot

License: MITPython VersionPlatformPinocchio

6-DOF Robotic Arm · Multi-Motor Support · Kinematics Solver · Trajectory Planning · Fully Open Source

reBot Arm B601-DM is an open-source robotic arm project launched by Seeed, dedicated to lowering the threshold for learning embodied intelligence. We open-source all structural designs and code without reservation, making robotics technology accessible to everyone.

LeRobot is committed to providing models, datasets and tools for real-world robotics in PyTorch. Its aim is to reduce the entry barrier of robotics, enabling everyone to contribute and benefit from sharing datasets and pretrained models. LeRobot integrates cutting-edge methodologies validated for real-world application, centering on imitation learning and reinforcement learning. It has furnished a suite of pre-trained models, datasets featuring human-gathered demonstrations, and simulation environments, enabling users to commence without the necessity of robot assembly.

This wiki provides debugging tutorials for reBot-DevArm and implements data collection and training within the LeRobot framework.

caution

Seeed Studio tutorials are strictly updated according to official documentation. If you encounter software or environmental issues that cannot be resolved, please check the FAQ at the end of the article first, or contact customer service to join the SeeedStudio LeRobot discussion group. You can also ask questions here: LeRobot GitHub or Discord Channel.

Initial System Environment​

  • Ubuntu 22.04/Ubuntu 24.04
  • NVIDIA GPU with CUDA 12+ (optional, for GPU-accelerated training and inference)
  • Python 3.12
  • Torch 2.6 (CPU builds can run basic workflows; CUDA builds are required for GPU acceleration)

Install LeRobot​

LeRobot can be installed and run on CPU-only machines for basic workflows. If you need GPU-accelerated training or inference, confirm that your computer has an NVIDIA GPU, then install PyTorch and Torchvision versions matching your CUDA version.

1

1. Install Miniforge​

cd ~
wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh

~/miniforge3/bin/conda init bash
source ~/.bashrc
2

2. Clone the LeRobot Repository​

mkdir ~/rebot_lerobot
cd ~/rebot_lerobot
git clone https://github.com/Seeed-Projects/lerobot.git
3

3. Create a Conda Environment and Install LeRobot​

tip

For detailed functions of the function packages, please refer to:

The lerobot repository already has a pyproject.toml. Create a conda environment and install all dependencies.

cd ~/rebot_lerobot

# Create conda environment (Python 3.12)
conda create -y -n lerobot python=3.12

# Activate environment
conda activate lerobot

# Install lerobot main project (editable mode)
pip install -e ./lerobot

# Add dependency packages
pip install lerobot-teleoperator-rebot-arm-102
pip install lerobot-robot-seeed-b601
pip install motorbridge
4

4. Install Video Dependencies​

ffmpeg is a video decoding dependency, install via conda:

conda install ffmpeg -c conda-forge
tip

Version Notes:

  • By default, ffmpeg 7.X will be installed (supports libsvtav1 encoder)

  • If you encounter version compatibility issues, you can specify ffmpeg 7.1.1:

    conda install ffmpeg=7.1.1 -c conda-forge
  • You can check if libsvtav1 encoder is supported via ffmpeg -encoders | grep svtav1

Ubuntu x86 requires no other video dependency configuration. Continue with step 5.

5

5. Check PyTorch and Torchvision​

Installing the LeRobot environment with pip may replace the original PyTorch and Torchvision with CPU builds, so check the result in Python.

python3
import torch
print(torch.cuda.is_available())
exit()

If the output is False, the current environment is using the CPU version of PyTorch. This is expected on computers without an NVIDIA GPU, and you can continue with CPU-based basic workflows, although training will be much slower. If your computer has an NVIDIA GPU and you need GPU acceleration, install PyTorch and Torchvision versions matching your CUDA version from the official PyTorch guide. In that case, the final check should return True.

tip

If you are using a Jetson device, install GPU-enabled PyTorch and Torchvision according to this tutorial.

NVIDIA RTX 50-series GPUs require the PyTorch preview version with CUDA 12.8 or later:

pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

Calibrate the Robotic Arm​

Next, you need to connect the power supply and data cable to your reBot B601-DM robot for calibration to ensure that the leader and follower arms have the same position values when they are in the same physical position. This calibration is essential because it allows a neural network trained on one reBot B601-DM robot to work on another. If you need to recalibrate the robotic arm, please completely delete the files under ~/.cache/huggingface/lerobot/calibration/robots or ~/.cache/huggingface/lerobot/calibration/teleoperators and recalibrate the robotic arm. Otherwise, an error prompt will appear. The calibration information for the robotic arm will be stored in the JSON files under this directory.

First, you need to grant interface permissions by running the following commands:

sudo chmod 666 /dev/ttyUSB*  # Leader arm
sudo chmod 666 /dev/ttyACM* # Follower arm (serial bridge)

B601-DM only needs to be calibrated once after assembly. Here is the calibration command. Refer to the figure for the zero position (gripper fully closed).

sudo chmod 666 /dev/ttyACM*  # follower arm (serial bridge)

lerobot-calibrate \
--robot.type=seeed_b601_dm_follower \
--robot.port=/dev/ttyACM0 \
--robot.id=follower1 \
--robot.can_adapter=damiao
danger

During teleoperation, if the master-slave robotic arm experiences power disconnection, poor power contact, or signal line detachment, you must first stop the program code and return the robotic arm to its home zero position. Only then reconnect the power supply and restart the program. This prevents data disorder from causing robotic arm runaway and potential safety hazards.

Teleoperate​

danger

During teleoperation, if the master-slave robotic arm experiences power disconnection, poor power contact, or signal line detachment, you must first stop the program code and return the robotic arm to its home zero position. Only then reconnect the power supply and restart the program. This prevents data disorder from causing robotic arm runaway and potential safety hazards.

First grant permissions to the serial ports:

sudo chmod 666 /dev/ttyUSB*  # Leader arm
sudo chmod 666 /dev/ttyACM* # Follower arm (serial bridge)

Run teleoperation:

lerobot-teleoperate \
--robot.type=seeed_b601_dm_follower \
--robot.port=/dev/ttyACM0 \
--robot.id=follower1 \
--robot.can_adapter=damiao \
--teleop.type=rebot_arm_102_leader \
--teleop.port=/dev/ttyUSB0 \
--teleop.id=rebot_arm_102_leader

Add Cameras​

danger

During teleoperation, if the master-slave robotic arm experiences power disconnection, poor power contact, or signal line detachment, you must first stop the program code and return the robotic arm to its home zero position. Only then reconnect the power supply and restart the program. This prevents data disorder from causing robotic arm runaway and potential safety hazards.

RealSense depth cameras can provide RGB-D perception for LeRobot and are suitable for tasks such as object recognition, point cloud reconstruction, and tabletop manipulation. The recommended models here are RealSense D405 and RealSense D435i.

RealSense D405

The RealSense D405 is a short-range stereo depth camera designed for high-precision close-range tasks such as tabletop robotic manipulation, with a typical working range of 7 cm to 50 cm.

RealSense D435i

The RealSense D435i combines depth sensing, RGB imaging, and an IMU, making it suitable for mid- to close-range applications such as 3D reconstruction, SLAM, and robotic environment perception.

1

Switch to the Camera Branch

Step 1

Current camera support is available on the DepthCameraSupport branch:

git checkout DepthCameraSupport
git pull origin DepthCameraSupport

Confirm the current branch:

git branch --show-current

Expected output:

DepthCameraSupport
2

Install LeRobot in Editable Mode

Step 2

If you only use RealSense:

pip install -e ".[realsense]"
3

Grant Permissions

Step 3

sudo chmod a+rw /dev/bus/usb/*/*
4

Detect Cameras

Step 4

lerobot-find-cameras realsense

This step will output:

  • Camera model
  • Serial number
  • USB information
  • Default stream configuration
5

RealSense Example

Step 5

Dual RealSense test:

lerobot-teleoperate \
--robot.type=seeed_b601_dm_follower \
--robot.port=/dev/ttyACM0 \
--robot.id=follower1 \
--robot.can_adapter=damiao \
--robot.cameras='{
d435i_color: {
type: realsense_d435i_color,
serial_number_or_name: "419522072950",
width: 640,
height: 480,
fps: 30,
color_mode: rgb,
color_stream_format: rgb8,
rotation: 0,
warmup_s: 1
},
d435i_depth: {
type: realsense_d435i_depth,
serial_number_or_name: "419522072950",
width: 640,
height: 480,
fps: 30,
max_depth_m: 2.0,
depth_alpha: 0.2,
rotation: 0,
warmup_s: 5
},
d405_color: {
type: realsense_d405_color,
serial_number_or_name: "409122273421",
width: 640,
height: 480,
fps: 30,
color_mode: rgb,
color_stream_format: rgb8,
rotation: 0,
warmup_s: 1
},
d405_depth: {
type: realsense_d405_depth,
serial_number_or_name: "409122273421",
width: 640,
height: 480,
fps: 30,
depth_alpha: 0.03,
rotation: 0,
warmup_s: 5
}
}' \
--teleop.type=rebot_arm_102_leader \
--teleop.port=/dev/ttyUSB0 \
--teleop.id=rebot_arm_102_leader \
--display_data=true
6

Parameter Notes

Step 6

  • depth_alpha controls the scaling factor of the depth image and can be adjusted based on the display result and target distance range.
  • If you connect three or more depth cameras, it is recommended to reduce fps to 15 to improve overall stability.
  • It is recommended to keep the resolution at 640x480 for a better balance of stability and real-time performance.

Dataset Collection​

danger

During teleoperation, if the master-slave robotic arm experiences power disconnection, poor power contact, or signal line detachment, you must first stop the program code and return the robotic arm to its home zero position. Only then reconnect the power supply and restart the program. This prevents data disorder from causing robotic arm runaway and potential safety hazards.

lerobot-record \
--robot.type=seeed_b601_dm_follower \
--robot.port=/dev/ttyACM0 \
--robot.id=follower1 \
--robot.can_adapter=damiao \
--robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: "MJPG"}, side: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: "MJPG"}}" \
--teleop.type=rebot_arm_102_leader \
--teleop.port=/dev/ttyUSB0 \
--teleop.id=rebot_arm_102_leader \
--display_data=true \
--dataset.repo_id=seeed_rebot_b601_dm/test \
--dataset.num_episodes=5 \
--dataset.single_task="Grab the black cube" \
--dataset.push_to_hub=false \
--dataset.episode_time_s=30 \
--dataset.reset_time_s=30

Among them, repo_id can be modified customarily, and push_to_hub=false. Finally, the dataset will be saved in the ~/.cache/huggingface/lerobot directory in the home folder, where the aforementioned seeed_rebot_b601_dm/test folder will be created.

Record Function

The record function provides a suite of tools for capturing and managing data during robot operation.

1. Data Storage

  • Data is stored using the LeRobotDataset format and is stored on disk during recording.
  • By default, the dataset is pushed to your Hugging Face page after recording.
  • To disable uploading, use: --dataset.push_to_hub=False.

2. Checkpointing and Resuming

  • Checkpoints are automatically created during recording.
  • To resume after an interruption, re-run the same command with: --resume=true

⚠️ Important Note: When resuming, set --dataset.num_episodes to the number of additional episodes to record (not the targeted total number of episodes in the dataset).

  • To start recording from scratch, manually delete the dataset directory.

3. Recording Parameters

Set the flow of data recording using command-line arguments:

ParameterDescriptionDefault
--dataset.episode_time_sDuration per data episode (seconds)60
--dataset.reset_time_sEnvironment reset time after each episode (seconds)60
--dataset.num_episodesTotal episodes to record50

4. Keyboard Controls During Recording

Control the data recording flow using keyboard shortcuts:

KeyAction
→ (Right Arrow)Early-stop current episode/reset; move to next.
← (Left Arrow)Cancel current episode; re-record it.
ESCStop session immediately, encode videos, and upload dataset.
tip

If your keyboard presses are not responding, you may need to downgrade your pynput version, such as installing version 1.6.8.

pip install pynput==1.6.8

Tips for Gathering Data

  • Task Suggestion: Grasp objects at different locations and place them in a bin.
  • Scale: Record ≥50 episodes (10 episodes per location).
  • Consistency:
    • Keep cameras fixed.
    • Maintain identical grasping behavior.
    • Ensure manipulated objects are visible in camera feeds.
  • Progression:
    • Start with reliable grasping before adding variations (new locations, grasping techniques, camera adjustments).
    • Avoid rapid complexity increases to prevent failures.

💡 Rule of Thumb: You should be able to do the task yourself by only looking at the camera images on the screen.

If you want to dive deeper into this important topic, you can check out the blog post we wrote on what makes a good dataset.

Troubleshooting

Linux-specific Issue: If Right Arrow/Left Arrow/ESC keys are unresponsive during recording:

Visualize the Dataset​

echo ${HF_USER}/rebot_test  

If you uploaded the data, you can also visualize it locally with the following command:

lerobot-dataset-viz \
--repo-id ${HF_USER}/rebot_test \
--episode-index 0 \
--display-compressed-images=false

If you used --dataset.push_to_hub=false and didn't upload the data, you can also visualize it locally with:

lerobot-dataset-viz \
--repo-id seeed_rebot_b601_dm/test \
--episode-index 0 \
--display-compressed-images=false

Here, seeed_rebot_b601_dm/test is the custom repo_id name defined during data collection.

Replay an Episode​

tip

Unstable, can be skipped or tried.

Now, try replaying the first dataset on your robot:

lerobot-replay \
--robot.type=seeed_b601_dm_follower \
--robot.port=/dev/ttyACM0 \
--robot.can_adapter=damiao \
--robot.id=follower1 \
--dataset.repo_id=seeed_rebot_b601_dm/test \
--dataset.episode=0

At this point, the robot should perform the same actions as when you teleoperated during recording.

Training and Evaluation​

Refer to the official tutorial ACT

Training

To train a policy to control your robot, use the python -m lerobot.scripts.train script. Some parameters are required. Here is an example command:

lerobot-train \
--dataset.repo_id=${HF_USER}/rebot_test \
--policy.type=act \
--output_dir=outputs/train/act_rebot_test \
--job_name=act_rebot_test \
--policy.device=cuda \
--wandb.enable=false \
--steps=300000

If you want to train on a local dataset, make sure the repo_id matches the name used during data collection and add --policy.push_to_hub=false.

lerobot-train \
--dataset.repo_id=seeed_rebot_b601_dm/test \
--policy.type=act \
--output_dir=outputs/train/act_rebot_test \
--job_name=act_rebot_test \
--policy.device=cuda \
--wandb.enable=false \
--policy.push_to_hub=false \
--steps=300000
tip

If you are using an RTX 50 series GPU, you need to add --dataset.video_backend=pyav to bypass missing APIs in the preview version of torchvision. The training command becomes:

lerobot-train \
--dataset.repo_id=seeed_rebot_b601_dm/test \
--dataset.video_backend=pyav \
--policy.type=act \
--output_dir=outputs/train/act_rebot_test \
--policy.device=cuda \
--wandb.enable=false \
--policy.push_to_hub=false \
--steps=300000

Command Explanation

  • Dataset specification: We provide the dataset via the parameter --dataset.repo_id=${HF_USER}/rebot_test.
  • Training steps: We modify the number of training steps using --steps=300000. The algorithm defaults to 800000 steps; adjust based on your task difficulty. You can set it higher if unsure, since checkpoints are generated during training and evaluation can resume from any checkpoint.
  • Policy type: We provide the policy with policy.type=act. Similarly, you can switch between policies such as [act, diffusion, pi0, pi0fast, sac, smolvla]. This will load the configuration from configuration_act.py. Importantly, this policy will automatically adapt to your robot's motor states, motor actions, and the number of cameras, as this information is already stored in your dataset.
  • Device selection: We provide policy.device=cuda because we are training on an Nvidia GPU, but you can use policy.device=mps for training on Apple Silicon.
  • Visualization tool: We provide wandb.enable=true to visualize training charts using Weights and Biases. This is optional, but if you use it, ensure you have logged in by running wandb login.

Evaluation

You can use the record function from lerobot/record.py but with a policy checkpoint as input. For instance, run this command to record 10 evaluation episodes:

lerobot-record \
--robot.type=seeed_b601_dm_follower \
--robot.port=/dev/ttyACM0 \
--robot.can_adapter=damiao \
--robot.cameras='{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: "MJPG"}, side: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: "MJPG"} }' \
--robot.id=follower1 \
--display_data=false \
--dataset.repo_id=seeed/eval_test123 \
--dataset.single_task="Put lego brick into the transparent box" \
--policy.path=outputs/train/act_rebot_test/checkpoints/last/pretrained_model
  1. The --policy.path parameter indicates the path to the weight file of your policy training results (e.g., outputs/train/act_rebot_test/checkpoints/last/pretrained_model). If you upload the model training result weight file to Hub, you can also use the model repository (e.g., ${HF_USER}/act_rebot_test).
  2. The dataset name dataset.repo_id starts with eval_. This operation will separately record videos and data during evaluation, which will be saved in the folder starting with eval_, such as seeed/eval_test123.
  3. If you encounter File exists: 'home/xxxx/.cache/huggingface/lerobot/xxxxx/seeed/eval_xxxx' during the evaluation phase, please delete the folder starting with eval_ first and then run the program again.
  4. When encountering mean is infinity. You should either initialize with stats as an argument or use a pretrained model, please note that keywords like front and side in the --robot.cameras parameter must be strictly consistent with those used when collecting the dataset.

To resume training from a checkpoint, here is an example command to resume from the last checkpoint of the act_rebot_test policy:

lerobot-train \
--config_path=outputs/train/act_rebot_test/checkpoints/last/pretrained_model/train_config.json \
--resume=true

FAQ​

  • If you are following this documentation tutorial, please git clone the recommended GitHub repository https://github.com/Seeed-Projects/lerobot.git. The repository recommended in this documentation is a verified stable version; the official LeRobot repository is continuously updated to the latest version, which may cause unforeseen issues such as different dataset versions, different commands, etc.

  • If you encounter:

    Could not connect on port "/dev/ttyUSB0" or "/dev/ttyACM0"

    And you can see the device exists when running ls /dev/ttyUSB* or ls /dev/ttyACM*, it means you forgot to grant serial port permissions. Enter sudo chmod 666 /dev/ttyUSB* /dev/ttyACM* in the terminal to fix it.

  • If you encounter:

    No valid stream found in input file. Is -1 of the desired media type?

    Please install ffmpeg 7.1.1 using conda install ffmpeg=7.1.1 -c conda-forge.

  • Training ACT on 50 sets of data takes approximately 6 hours on a laptop with an RTX 3060 (8GB), and about 2-3 hours on computers with RTX 4090 or A100 GPUs.

  • During data collection, ensure the camera position, angle, and ambient lighting are stable. Reduce the amount of unstable background and pedestrians captured by the camera, as excessive changes in the deployment environment may cause the robotic arm to fail to grasp properly.

  • For the data collection command, ensure the num-episodes parameter is set to collect sufficient data. Do not manually pause midway, as the mean and variance of the data are calculated only after data collection is complete, which are necessary for training.

  • If the program indicates it cannot read image data from the USB camera, ensure the USB camera is not connected through a hub. The USB camera must be directly connected to the device to ensure fast image transmission speed.

tip

If you encounter software issues or environment dependency problems that cannot be resolved, in addition to checking the FAQ section at the end of this tutorial, please promptly report the issue to the LeRobot platform or the LeRobot Discord channel.

References​

Seeed Studio English Wiki: How to use the SO100Arm robotic arm in Lerobot

TheRobotStudio Project: SO-ARM10x

Huggingface Project: LeRobot

Dnsty: Jetson Containers

Jetson AI Lab

Diffusion Policy

ACT or ALOHA

TDMPC

VQ-BeT

Tech Support & Product Discussion​

Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.

Loading Comments...