pnd_mujoco is a simulator developed based on pnd_sdk_python and mujoco. Users can easily integrate the control programs developed with pnd_sdk_python and pnd_ros2 into this simulator, enabling a seamless transition from simulation to physical development. The repository with a structure as follows:
simulate_python: Simulator implemented based onpnd_sdk_pythonand mujocopnd_robots: MJCF description files for robots supported bypnd_sdk_pythonexample: Example programs
Current version only supports low-level development, mainly used for sim to real verification of controller
LowCmd: Motor control commandsLowState: Motor state informationSportModeState: Robot position and velocity dataIMUState: Torso IMU state atrt/secondary_imutopic
cd ~
sudo apt install python3-pip
git clone https://github.com/pndbotics/pnd_sdk_python.git
cd pnd_sdk_python
pip3 install -e .pip3 install mujoco==3.2.0pip3 install pygamecd simulate_python
python3 pnd_mujoco.pyOpen another terminal:
python3 example/python/open_arm.pyThe Adam‑U robot in simulation will lift and lower its arm.
Configuration file: simulate_python/config.py
ROBOT = "adam_u" # Robot name, "adam_u", "adam_lite", "adam_pro" , "adam_sp"
ROBOT_SCENE = "../pnd_robots/" + ROBOT + "/scene.xml" # Robot scene
HANDPOSE_SRC = 1 # 0 is sim2sim 1 is real2sim
# For ROS2
# SDK_TYPE="ROS2" # "ROS2" or "DDS"
# DOMAIN_ID = 1 # Domain id
# For DDS
SDK_TYPE="DDS" # "ROS2" or "DDS"
DOMAIN_ID = 1 # Domain id
INTERFACE = "lo" # Interface
USE_JOYSTICK = 1 # Simulate PND WirelessController using a gamepad
JOYSTICK_TYPE = "xbox" # support "xbox" and "switch" gamepad layout
JOYSTICK_DEVICE = 0 # Joystick number
PRINT_SCENE_INFORMATION = False # Print link, joint and sensors information of robot
ENABLE_ELASTIC_BAND = True # Virtual spring band, used for lifting adam
SIMULATE_DT = 0.001 # Need to be larger than the runtime of viewer.sync()
VIEWER_DT = 0.01 # 100 fps for viewerTo simulate the suspension & release process of humanoid robots:
- Enable in config:
ENABLE_ELASTIC_BAND = 1- Controls:
9— engage/release hoist7— lower robot8— lift robot
The example folder contains simple examples of using different interfaces to make the robot stand up and then lie down. These examples demonstrate how to implement the transition from simulation to reality using interfaces provided by PND. Here is an explanation of each folder name:
| Folder | Description |
|---|---|
python |
Python examples using pnd_sdk_python |
ros2 |
ROS2 examples using pnd_ros2 |
- Install
# Install system dependencies
sudo apt install libyaml-cpp-dev libspdlog-dev libboost-all-dev libglfw3-dev python3-pip
# Install Python SDK
cd ~
git clone https://github.com/pndbotics/pnd_sdk_python.git
cd pnd_sdk_python
sudo pip3 install -e .- Run
cd ~/pnd_sdk_python/example/low_level/adam_lite
python3 adam_lite_low_level_example.py enp59s0- Source
# Download & build pnd_ros2
git clone https://github.com/pndbotics/pnd_ros2.git
cd pnd_ros2
colcon build
source install/setup.bash- Modify
config.py
DDS is used by default. To switch to ROS2:
Open the configuration file config.py
cd ~
xdg-open ~/pnd_mujoco/simulate_python/config.pySet the SDK type to ROS2:
SDK_TYPE="ROS2"- Run
cd ~/pnd_sdk_python/example/low_level/adam_lite # Robot name, "adam_u", "adam_lite", "adam_pro" , "adam_sp"
python3 adam_lite_low_level_example.py enp59s0 # Robot name, "adam_u", "adam_lite", "adam_pro" , "adam_sp", replace enp59s0 with the actual wired network interface name- Install
To build your own application with the SDK, you can install the pnd_sdk_cpp to your system directory:
cd ~/pnd_sdk_cpp
mkdir build
cd build
cmake ..
sudo make installOr install pnd_sdk_cpp to a specified directory:
cd ~/pnd_sdk_cpp
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/pndbotics_robotics
sudo make installImportant
If you install to a non-standard path, remember to add that path to your ${CMAKE_PREFIX_PATH} so that find_package() can locate the SDK in your own projects.
- Run Example
- Run on real robot:
# Get network interface name
ip a
# Run the control example (replace enp59s0 with the wired network interface name)
cd ~/pnd_sdk_cpp/build/bin
sudo ./lite_ankle_swing_example enp3s0python3 ./open_arm.py # simulation
python3 ./open_arm.py enp3s0 # real robot (network interface)
Program logic:
if len(sys.argv) < 2:
ChannelFactoryInitialize(1, "lo") # simulation
else:
ChannelFactoryInitialize(1, sys.argv[1]) # real robotLowCmd— motor control commandLowState— motor state feedback
The PND Adam-U robot model uses the adam_u idl for low-level communication.
- MuJoCo physics engine
- ROS2 community
- DDS community
- PNDbotics SDK ecosystem
- Email: info@pndbotics.com
- Wiki: https://wiki.pndbotics.com
- SDK: https://github.com/pndbotics/pnd_sdk_python
- Issues: https://github.com/pndbotics/pnd_mujoco/issues
| Version | Date | Updates |
|---|---|---|
| v1.3.1 | 2026-04-20 | Fix gripper bug |
| v1.3.0 | 2026-04-02 | Add adam_pro with gripper |
| v1.2.0 | 2026-01-22 | DDS refactoring version |
| v1.0.4 | 2025-12-09 | Update xbox axis & Add lo ro home in switch |
| v1.0.3 | 2025-11-20 | Get state in ros2 |
| v1.0.2 | 2025-11-17 | Change the meshes and add Columns mass to 88 kg |
| v1.0.1 | 2025-11-11 | Add ros2 example & Support hands |
| v1.0.0 | 2025-11-10 | Initial release |
