文件最后提交记录最后更新时间
chore: initial monorepo migration for IB_Robot Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 3 个月前
so101_hardware: add calibration checker tool Move the follower arm calibration checker into so101_hardware while keeping the ros2 run parameters close to the original hardware-oriented tool. Expose the checker entry point, keep compatibility with legacy robot.id-based calibration lookup and named LeRobot calibration files, and document the expected follower-arm validation workflow. Signed-off-by: Shi Xin <shixin21@h-partners.com> 2 个月前
chore: initial monorepo migration for IB_Robot Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 3 个月前
chore: initial monorepo migration for IB_Robot Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 3 个月前
chore: initial monorepo migration for IB_Robot Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 3 个月前
so101_hardware: add calibration checker tool Move the follower arm calibration checker into so101_hardware while keeping the ros2 run parameters close to the original hardware-oriented tool. Expose the checker entry point, keep compatibility with legacy robot.id-based calibration lookup and named LeRobot calibration files, and document the expected follower-arm validation workflow. Signed-off-by: Shi Xin <shixin21@h-partners.com> 2 个月前
so101_hardware: add calibration checker tool Move the follower arm calibration checker into so101_hardware while keeping the ros2 run parameters close to the original hardware-oriented tool. Expose the checker entry point, keep compatibility with legacy robot.id-based calibration lookup and named LeRobot calibration files, and document the expected follower-arm validation workflow. Signed-off-by: Shi Xin <shixin21@h-partners.com> 2 个月前
launch: block startup when calibration file is missing When running on real hardware without calibration files (common with root user where $HOME resolves to /root instead of the actual user), the system silently proceeds and fails later with cryptic controller errors. This patch adds pre-flight checks in both follower and leader arm paths: - control.py: check calib_file exists before creating ros2_control nodes, raise RuntimeError with actionable guidance if missing - teleop.py: same check for leader arm calib_file in teleop mode - so101_system_hardware.cpp: upgrade WARN to ERROR with remediation command for double-safety at the hardware plugin layer Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 2 个月前
so101_hardware: add calibration checker tool Move the follower arm calibration checker into so101_hardware while keeping the ros2 run parameters close to the original hardware-oriented tool. Expose the checker entry point, keep compatibility with legacy robot.id-based calibration lookup and named LeRobot calibration files, and document the expected follower-arm validation workflow. Signed-off-by: Shi Xin <shixin21@h-partners.com> 2 个月前
build(so101_hardware): use gitee mirror for FTServo_Linux SDK Using the Gitee mirror prevents timeouts and slow downloads when FetchContent pulls the feetech servo SDK during the build process in environments with restricted access. Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 1 个月前
chore: initial monorepo migration for IB_Robot Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 3 个月前
so101_hardware: add calibration transfer tool Move calibration migration support into so101_hardware while keeping the migrated CLI close to the original tool. Add the migration core, validate generated follower calibration files, expose the ros2 run entry point, keep the package-level test hooks, and document the compatible usage. Signed-off-by: Shi Xin <shixin21@h-partners.com> 2 个月前
build: overhaul workspace setup scripts and ROS 2 dependencies - **Scripts Refactoring**: - Remove usb_cam submodule, relying entirely on openEuler sources. - Refactor openEuler ROS repo URLs dynamically ($basearch) and remove redundant hardcoded packages in install_ros.sh. - Upgrade Ubuntu target from desktop to ros-humble-desktop-full. - Enhance openEuler OS detection robustness in setup.sh. - Add strict error handling for rosdepc update and install operations to prevent hidden failures. - Bulletproof rosdepc --skip-keys syntax across platforms. - **Workspace Dependencies**: - Fix missing package.xml dependencies (moveit, moveit_servo, joy, gz_ros2_control). - Correct invalid dependency names (nlohmann_json to nlohmann-json-dev). - Remove unneeded dependencies (ros2python, ros2idl_runtime_py, rclpy_action, rclpy_interfaces). - Ensure ament_python is strictly kept as a <buildtool_depend>. Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 1 个月前
chore: initial monorepo migration for IB_Robot Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 3 个月前
chore: initial monorepo migration for IB_Robot Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 3 个月前
README.en.md

SO-101 Robotic Arm Hardware Package

Hardware driver package for the SO-101 robotic arm, providing high-performance C++ ros2_control interfaces and Python utilities.

Overview

This package provides a complete hardware driver solution for the SO-101 robotic arm, supporting two main modes:

  • C++ ros2_control Plugin: Direct communication via FTServo SDK, low latency, high performance. Ideal for production and control.
  • Python Utilities: Tools for calibration, data collection (Leader Arm Publisher), and diagnostics.

Key Features

  • Direct Communication: Uses FTServo SDK for native communication with Feetech servos.
  • Mixed Package Build: Uses ament_cmake_python to support both C++ plugins and Python scripts in a single package.
  • Startup Position Protection: Supports reset_positions to prevent the arm from jumping to zero on startup (critical for mobile platforms).
  • Lifecycle Management: Implements standard on_init, on_configure, on_activate, and on_deactivate states.
  • Safety: Automatically disables motor torque on node shutdown.

Architecture

ros2_control (Controller Manager)
      ↓
SO101SystemHardware (C++ Plugin)  ←──┐
      ↓                              │
FTServo SDK (C++)                    │
      ↓                              │
Feetech Servos (Hardware)            │
      ↑                              │
Python Utilities (Scripts) ──────────┘

Dependencies

Git Submodule

FTServo_Linux SDK is included as a git submodule:

git submodule update --init --recursive

System Dependencies

  • ROS 2 Humble
  • nlohmann_json library
  • hardware_interface, pluginlib, rclcpp_lifecycle
  • pyserial (Python driver)

Building

cd ~/Research/lerobot_ros2/src/ros2/ros2_ws
source /opt/ros/humble/setup.zsh
# Ensure successful mixed build by setting PYTHONPATH
PYTHONPATH=/usr/lib/python3/dist-packages:$PYTHONPATH colcon build --packages-select so101_hardware
source install/setup.zsh

Usage

1. Calibrating the Arm (Python)

Calibration must be performed before first use to generate JSON files in ~/.calibrate/.

# Calibrate Follower arm
ros2 run so101_hardware calibrate_arm --arm follower --port /dev/ttyACM0

2. C++ ros2_control Plugin Configuration

Specify the hardware interface in your URDF:

<hardware>
  <plugin>so101_hardware/SO101SystemHardware</plugin>
  <param name="port">/dev/ttyACM0</param>
  <param name="calib_file">$(env HOME)/.calibrate/so101_follower_calibrate.json</param>
  <!-- Optional: Safe startup positions (JSON format, radians) -->
  <param name="reset_positions">{"1": 0.0, "2": 0.0}</param>
</hardware>

3. Leader Arm Publisher

Used for recording demonstration data or teleoperation:

ros2 run so101_hardware leader_arm_pub --port /dev/ttyACM0 --publish_rate 50.0

Implementation Details

Startup Positions (Reset Positions)

The reset_positions parameter allows you to specify initial joint positions.

  • Configured: The arm moves smoothly to the specified pose upon activation.
  • Not Configured (Default): The arm preserves its current motor position without movement.

Coordinate Conversion

The plugin handles conversion between steps and radians automatically:

  • Read: radians = ((steps - range_min) / range - 0.5) * 2.0 * PI
  • Write: steps = (radians / (2.0 * PI) + 0.5) * range + range_min

Comparison: C++ Plugin vs Python Tools

Feature C++ Plugin (Production) Python Tools (Dev/Calib)
Latency Very Low (Direct) Higher (Python overhead)
Performance High (Real-time) Medium
Mode ros2_control Interface Topic Bridge / Scripts
Use Case RL / Trajectory Execution Calibration / Recording / Diagnostics

Constants Configuration

Shared constants can be accessed in Python via:

from so101_hardware.calibration.constants import MOTOR_IDS, JOINT_NAMES, DEFAULT_SERIAL_PORT

Troubleshooting

  • Serial Permissions: Run sudo chmod 666 /dev/ttyACM0 or add user to the dialout group.
  • Missing Calibration: If you see Calibration file not found, run the calibrate_arm tool first.
  • Empty Submodule: Ensure you have run git submodule update.

License

TODO: License declaration