LeDog: Weilan AlphaDog Dev + SO-101 Arm Fusion Control on openEuler Embedded 2403

December 28, 2025 · View on GitHub

English | 中文

1. Overview

This repository is designed for the Weilan AlphaDog Dev developer version, integrated with the SO-101 Robotic Arm. It aims to provide a unified control solution using ROS 2 Humble on the Orange Pi AI Pro (20T) running openEuler Embedded 24.03.

Side View Top View

The core solution utilizes ros1_bridge to seamlessly bridge the robot dog's built-in, closed-source ROS 1 environment with the local ROS 2 Humble environment. This allows developers to use the latest ROS 2 toolchains (such as joystick control and MoveIt 2) to drive both the ROS 1 chassis and the ROS 2 SO-101 arm simultaneously, facilitating teleoperation for data collection.

⚠️ WARNING: This system runs on openEuler Embedded (BusyBox). DO NOT execute dnf update. Doing so may corrupt the system core.

2. Repository Structure

This repository uses a "Monolithic" structure, managing both ROS 1 and ROS 2 workspaces within a single Git repository.

alphadog_ros_ctl/  
├── doc/                                     # Tutorials and documentation
│   └── openEuler_Embedded_ROS1_Bridge_Install_Guide.md # Core Installation Guide
├── README.md                                # This file
├── ros1_ws/                                 # ROS 1 Catkin Workspace
│   └── dog_msgs_ws/                         # Contains [ORIGINAL] ROS 1 messages/services/actions for the dog
│       └── src/
│           ├── agent_msgs
│           └── ros_alphadog
└── ros2_ws/                                 # ROS 2 Colcon Workspace (Humble)
    └── src/  
        ├── bridge_mapping/                  # Manual mapping rules for the bridge
        ├── dog_msg_ws/                      # [MODIFIED] Message packages migrated from ROS 1 and adapted for ROS 2
        │   ├── agent_msgs
        │   ├── ros_alphadog
        │   └── x_rosbridge_msgs
        ├── joystick_alphadog_with_so101_servo/    # Unified joystick control node for Dog + Arm
        ├── lerobot_controller/              # SO-101 Arm ros2_control controller
        ├── lerobot_description/             # SO-101 Arm URDF and simulation models
        ├── lerobot_moveit/                  # SO-101 Arm MoveIt 2 configuration
        ├── ros1_bridge/                     # Enhanced ros1_bridge with Action support
        ├── pymoveit2/                       # Python MoveIt2 Interface (Submodule)
        └── so101_hw_interface/              # SO-101 Arm Hardware Interface (ros2_control)

3. Core Challenges & Solutions

Deploying this hybrid environment on openEuler Embedded 24.03 addressed the following key challenges:

  1. ROS 1 & ROS 2 Coexistence: Leveraged the ROS SIG test sources provided by openEuler to install ARM-based ROS 1 Noetic and ROS 2 Humble directly via DNF, eliminating the need for time-consuming source compilation on the board.
  2. Embedded Environment Library Fixes:
  • Boost Symlink Missing: Fixed issues where the compiler could not find Boost libraries due to missing unversioned .so symlinks.
  • Header Files Missing: Resolved "Ghost Package" issues in DNF (e.g., yaml-cpp-devel) to ensure complete compilation headers.
  1. Permissions & Paths: Fixed permission issues in /usr/local/lib64, allowing non-root users to read dependency libraries correctly.
  2. ros1_bridge Adaptation:
  • Package Name Mapping: Used bridge_mapping to handle the non-standard naming of ros_alphadog.
  • Network Resolution: Configured /etc/hosts to resolve the robot dog's hostname sport.

4. Quick Start Guide

Step 0: System Environment Preparation

Before compiling the code in this repository, you MUST complete the basic environment setup following the instructions in doc/openEuler_Embedded_ROS1_Bridge_Install_Guide.md.

This guide includes critical operations. Failure to follow them will result in compilation errors:

  1. Configure DNF sources for ROS 1 Noetic and ROS 2 Humble and install base packages.
  2. Execute dnf reinstall to fix development packages like tinyxml2, yaml-cpp, and boost.
  3. Manually create symbolic links for Boost libraries.
  4. Modify permissions for the /usr/local/lib64 directory.

Step 1: Clone & Initialize

git clone [https://gitee.com/openeuler/ledog_ros2.git](https://gitee.com/openeuler/ledog_ros2.git) ledog_ros2
cd ledog_ros2

# Initialize and pull Git Submodules (includes ros1_bridge, pymoveit2, and topic_based_ros2_control)
git submodule update --init --recursive

# Install python pkg dependencies
pip install feetech-servo-sdk deepdiff tqdm

Step 2: Compile ROS 1 Workspace

This step ensures your ROS 1 environment contains the original custom messages compatible with the robot dog.

# 1. Source System ROS 1 Environment
source /opt/ros/noetic/setup.bash

# 2. Compile
cd ros1_ws/dog_msgs_ws
catkin_make

Step 3: Compile ROS 2 Workspace (Excluding Bridge)

Compile all ROS 2 nodes, arm-related packages, messages, and pymoveit2.

# Open a NEW terminal
# 1. Source System ROS 2 Environment
source /opt/ros/humble/setup.bash

# 2. Compile (Skip bridge; ros1_bridge must be compiled last with both environments loaded)
cd ros2_ws
colcon build --symlink-install --packages-skip ros1_bridge

Step 4: Compile ros1_bridge

This is the most critical step. It must be performed in a correctly configured "Hybrid Environment".

  1. Open a NEW terminal.
  2. Source the environments in strict order:
# 1. Source your ROS 1 workspace
source <path-to-your-repo>/ros1_ws/dog_msgs_ws/devel/setup.zsh

# 2. Source your ROS 2 workspace
source <path-to-your-repo>/ros2_ws/install/setup.zsh

  1. Run Compilation:
cd <path-to-your-repo>/ros2_ws
colcon build --packages-select ros1_bridge --cmake-force-configure --cmake-args -DBUILD_TESTING=OFF

5. Run & Verify

  • The driver nodes run automatically on the robot dog.
  • You can run roscore on your PC or OPi (if needed). Connect the PC and OPi to the robot dog via Wi-Fi or Ethernet. Use rostopic list to verify connection to the dog's ROS 1 network.

5.1 Network Configuration

Before running, ensure the board and the dog are on the same network segment and configure the environment variables:

# Edit ~/.bashrc or ~/.zshrc
export ROS_MASTER_URI=[http://10.10.10.10:11311](http://10.10.10.10:11311)  # IP of the Robot Dog
export ROS_IP=10.10.10.xxx                      # IP of the Orange Pi

Also, modify /etc/hosts to map the dog's hostname:

sudo echo "10.10.10.10 sport" >> /etc/hosts

5.2 Automated Start (Tmux)

This repository provides a start_dog.sh script to launch everything using tmux.

Note: Before using tmux on openEuler Embedded, ensure you have fixed the libevent missing issue and glibc-langpack-en locale issue as per the installation guide, otherwise tmux will not start.

  1. Grant Permissions:
chmod +x start_dog.sh

  1. Start:
./start_dog.sh
# or
./start_dog_split.sh

The script will automatically launch the ROS 2 driver nodes and ros1_bridge.

  1. Manage Tmux:
  • Attach to session to view logs: tmux attach -t ledog
  • Detach (background): Press Ctrl+B, release, then press d.
  • Kill session: tmux kill-session -t ledog

5.3 Manual Start (For Debugging)

Terminal A (ROS 2 Driver):

source /opt/ros/humble/setup.bash
source ros2_ws/install/setup.bash
ros2 launch joystick_alphadog_with_so101_servo start_real_dog_with_arm.launch.py

Terminal B (Bridge):

source /opt/ros/noetic/setup.bash
source ros1_ws/dog_msgs_ws/devel/setup.bash
source /opt/ros/humble/setup.bash
source ros2_ws/install/setup.bash

ros2 run ros1_bridge dynamic_bridge --bridge-all-topics

5.4 Arm Calibration (Debug)

If you need to calibrate the motor zero position for the Follower arm, use the following command:

ros2 run so101_hw_interface so101_motor_bridge --ros-args -p calibrate:=True

7. Acknowledgements

The ros1_bridge and its bridge_mapping solution used in this repository are based on the outstanding work of community developer Doug Smith.