SDK Introduction
This SDK is mainly used to control the motion and state of each part of the robot. Use the Lejulab_ARM repository as the reference. The current SDK uses C++17 + Cyclone DDS and does not depend on ROS1, catkin, or rosbridge.
Interface Layers
| Interface layer | Main header files | Use cases |
|---|---|---|
| Low-level interface | lejusdk-lowlevel/leju_sdk.h | Read robot, IMU, hardware, and gamepad state; develop motor-level control or drivers |
| Upper-level control interface | lejusdk-vr/lejusdk_vr.h | Control the Roban arms, head, waist, and movement speed; switch control modes; query runtime status; play tact motions |
| Communication and tools | Cyclone DDS, Iceoryx, command-line programs | Same-host or LAN communication, status diagnostics, audio playback, and data recording |
Applications should generally prefer lejusdk-vr. Use lejusdk-lowlevel only when you need to read low-level state or directly construct a full-joint RobotCmd; the number and order of joints should be obtained from getMotorNumber() and getMotorNames() respectively.
Repository Structure
Lejulab_ARM/
├── installed/ # 已安装的头文件、动态库、可执行程序和环境脚本
│ ├── include/lejusdk-lowlevel/
│ ├── include/lejusdk-vr/
│ ├── lib/
│ └── setup.bash
├── src/lejusdk/examples/ # SDK 示例
├── src/leju_launch/scripts/ # 实机与 MuJoCo 启动脚本
├── src/leju-hardware/config/ # 各机器人版本配置
└── README_DEPLOY.md # 源码组件部署说明(SDK 已预编译)Pre-Development Checks
cd <Lejulab_ARM>
export ROBOT_VERSION=17
source installed/setup.bash
echo "$CYCLONEDDS_URI"ROBOT_VERSION must match the current robot configuration and must not be guessed from the product name. The verified value for a Roban2 2.2 physical robot is 17; after changing robots or software packages, rely on the device's actual environment variables and configuration directory.
The default deployment uses /etc/cyclonedds/cyclonedds_shm.xml, and processes on the same host communicate through Cyclone DDS and Iceoryx shared memory. For cross-host development, see DDS Communication and Remote Development.
Documentation Entry Points
- Build, Run, and Simulation
- Low-Level C++ API
- Roban C++ SDK Quick Start
- Robot Information and State
- Arm, Head, Waist, and Hand Control
- Robot Locomotion and Controller Interface
- Motion and Audio Tools
Reading state does not drive the robot. Any publish*Cmd, startRuntime, startMotion, playTact, or mode-switching interface may cause the robot to move. Before testing on a physical robot, you must secure the robot, clear the area around it, confirm that the emergency stop is functional, and ensure on-site personnel are supervising.