Roban Body Simulation
Description
Lejulab_ARM provides a MuJoCo simulation launch chain that lets you verify the SDK state subscription and control flow without connecting real robot hardware. launch_mujoco_sim.sh starts the MuJoCo robot simulation, the gamepad, the RL controller, and the data recorder at the same time.
- Note:
installed/contains precompiled artifacts shipped with the package, and the executables must match the architecture of the host machine (uname -mmust match the output offile installed/bin/leju-mujoco-sim). An architecture mismatch producesELF ... not found,Syntax error: "(" unexpected, or garbled output; this is not a script syntax error. - Note: In the terminal, you must set
ROBOT_VERSIONfirst and then runsource installed/setup.bash; the order cannot be reversed. - Main files and brief descriptions:
src/leju_launch/scripts/launch_mujoco_sim.sh: simulation launch orchestration (MuJoCo + gamepad + RL controller + recorder)src/leju_launch/scripts/_launch_common.sh: common launch and DDS logicsrc/leju_assets/models/biped_s17/: Roban2.2 modelsrc/leju-controllers/leju-rl-controller/config/17/: Roban2.2 controller and remote controller configuration
Simulation Steps for the Robot's Host and Onboard Computers
-
First, connect to the robot's onboard computer using realVNC, and confirm that the host machine architecture matches the precompiled artifacts

-
In the
Lejulab_ARMdirectory, run:
cd ~/Lejulab_ARM
uname -m
file installed/bin/leju-mujoco-sim
file installed/bin/run_rl_controllerIf uname -m reports x86_64 while the program shows ARM aarch64, this package cannot run on the current computer; you need a development package that matches the host architecture. Re-running source installed/setup.bash will not solve this.
-
Set the version and load the environment
-
Set the robot version first, then load the environment:
cd ~/Lejulab_ARM export ROBOT_VERSION=17 source installed/setup.bash -
ROBOT_VERSION=17corresponds to Roban2.2: modelscene_rl.xml, controllercontroller_manager.yaml, remote controllerteleop_bindings.yaml.
-
-
Start the simulation
#如果需要模拟遥控器节点需要先停止遥控器服务 #sudo systemctl stop lejulab_joy_monitor.service sudo bash src/leju_launch/scripts/launch_mujoco_sim.sh-
If you need ordinary DDS (without shared memory) for a first verification, append
--no-shm:sudo bash src/leju_launch/scripts/launch_mujoco_sim.sh --no-shm -
The programs started by this script are as follows:
Program Required Role leju-mujoco-simYes Loads scene_rl.xmland provides DDS data for the MuJoCo robot, sensors, and motorsrun_rl_controllerYes Runs the controller manager and RL controller leju-joystickNo Reads an ordinary gamepad; not started when --auto-startis addedlejusdk_recorderNo Records DDS data according to recorder.yaml -
If any required program exits, the launcher stops the other child processes; an optional program exiting does not terminate the simulation on its own.
-
-
(Optional) Verify SDK state subscription
-
Keep the simulation terminal running, and open a new terminal with the same DDS configuration:
cd ~/Lejulab_ARM export ROBOT_VERSION=17 source installed/setup.bash export CYCLONEDDS_URI="file://$PWD/src/leju_launch/config/cyclonedds.xml" hw_state_subscriber -
You can also run
joint_state_subscriberandimu_data_subscriberseparately. Once state reading works normally, test the control interfaces according to the Interface Usage Documentation.
-
Expected Results
Connect to the robot's onboard computer remotely using realVNC. The MuJoCo simulation window opens and runs the robot physics simulation, the gamepad window shows the gamepad button states, and the subscription terminal continuously outputs joint/IMU/hardware state data.

Interface Definitions
-
Subscription type (state reading):
hw_state_subscriber,joint_state_subscriber,imu_data_subscriber -
Control type: see the step-by-step tutorial in the Interface Usage Documentation
-
Common troubleshooting commands:
bash scripts/diagnostics/check_dds.sh -
Common issues:
setup.bashprompts you to set the version first → check the order ofexport ROBOT_VERSIONandsource; the simulation window fails to open → check the graphical display environment (SSH/containers require properly configured display forwarding or graphics devices); no data in the subscription → verify thatROBOT_VERSIONandCYCLONEDDS_URIare consistent across both terminals.