MCPcopy Index your code
hub / github.com/Astribot-Dev/astribot_simulation

github.com/Astribot-Dev/astribot_simulation @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
187 symbols 508 edges 11 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

🚀 Astribot Simulation

A unified robot simulation platform built on top of MuJoCo, Genesis, and ManiSkill.
This project provides a common abstraction layer so that you can run your robot across different simulators with a consistent API.
It is designed as a research tool for users of Astribot.

Astribot Simulation System


🎥 Demo

Astribot Simulation Demo


📌 Features

  • 🔄 Multi-backend environments: switch between MuJoCo / Genesis / ManiSkill with one line of code.
  • 🤖 Plug-and-play robot models: support for URDF and MJCF.
  • 🧩 Config-driven setup: YAML configs for each simulator and robot variant.
  • ROS Integration: optional ROS1 interface for bridging simulation and real robots.
  • 🛠 Research-friendly utilities: logging, common tools, environment factory.

🗺 Roadmap

  • ROS2 Integration (Coming Soon)
  • 🐳 Dockerized deployment (Coming Soon)
  • 💻 NVIDIA Isaac Lab integration (Coming Soon)

📂 Project Structure

astribot_simulation/
│── astribot_envs/              # Environment wrappers for each simulator
│   ├── astribot_base_env.py
│   ├── astribot_mujoco_env.py
│   ├── astribot_genesis_env.py
│   ├── astribot_maniskill_env.py
│   └── astribot_envs_factory.py
│
│── config/                     # YAML configs for different robots & simulators
│   └── astribot_s1/
│       ├── simulation_genesis_param_chassis_fixed.yaml
│       ├── simulation_maniskill_param_chassis_fixed.yaml
│       ├── simulation_mujoco_param_with_hand.yaml
│       └── ...
│
│── astribot_descriptions/                # Robot models
│   ├── urdf/
│   └── mjcf/
│
│── simu_utils/                 # Utility functions
│   ├── simu_common_tools.py
│   └── robot_ros_interface.py
│
│── tools/                      # Setup scripts
│   ├── install.sh
│   ├── build.sh
│   ├── Miniconda3-py38_4.9.2-Linux-x86_64.sh
│   ├── fix_GLIBCXX_3.4.30_bug.sh
│   └── fix_LIBFFI_BASE_7.0_bug.sh
│
│── astribot_simulation.py      # Main entry
│── env.sh                      # Environment setup
│── README.md
└── __init__.py

📦 Installation

Clone with submodules

git clone https://github.com/Astribot-Dev/astribot_simulation
cd astribot_simulation
git submodule init
git submodule update

Install dependencies

install miniconda for simulation

bash tools/Miniconda3-py38_4.9.2-Linux-x86_64.sh

Exit the terminal and re-enter the terminal.

install dependencies for simulation

bash tools/install.sh

🚀 Quick Start

If it is a ROS1 system, start the master node first.

roscore

Launch Astribot Simulation:

conda activate astribot_simu
cd <your_path>/astribot_simulation
source env.sh && python3 astribot_simulation.py

If you want to reset the robot state, press Backspace while the simulation is running.

Switch to Other Simulators or Robots

You can switch to another simulator or robot by modifying the YAML file path in astribot_simulation.py:

from astribot_envs.astribot_envs_factory import AstribotEnvsFactory

def main():
    # Load param from yaml, create a simulation env using the Factory Pattern
    astribot_yaml_file='config/astribot_s1/simulation_genesis_param.yaml'
    astribot_envs_factory = AstribotEnvsFactory()
    astribot_data = AstribotEnvsFactory.load_yaml_file(astribot_yaml_file)
    astribot_simulation_thread = astribot_envs_factory.create_simulation_env(astribot_data)

if __name__ == '__main__':
    main()

📄 YAML Configuration Files

The config/astribot_s1/ folder contains several YAML files to customize your simulation environment. Each file defines a combination of simulator backend, robot variant, and Hardware configuration:

YAML File Description
simulation_genesis_param_chassis_fixed.yaml Genesis backend with fixed chassis configuration.
simulation_maniskill_param_chassis_fixed.yaml ManiSkill backend with fixed chassis configuration.
simulation_mujoco_param_chassis_fixed.yaml MuJoCo backend with fixed chassis configuration.
simulation_mujoco_param_with_camera.yaml MuJoCo backend with three-camera configuration.
simulation_mujoco_param_with_hand.yaml MuJoCo backend with BrainCo hand configuration.
simulation_mujoco_param.yaml MuJoCo backend with default configuration.

💡 Tip:
To switch simulators or robot setups, modify the astribot_yaml_file variable in astribot_simulation.py to point to the desired YAML file. No code change is needed beyond this.


💻 System Requirements

  • Operating System: Ubuntu 20.04 LTS / Ubuntu 22.04 LTS
  • Middleware: ROS Noetic (for 20.04) / ROS2 Humble (for 22.04)
  • Python Version: Python == 3.10 (use Conda environment)
Hardware / Software Recommended Specifications
CPU Intel i5-14600F or higher
GPU NVIDIA RTX 2080 Ti or higher
GPU Driver NVIDIA driver ≥ 535
CUDA CUDA ≥ 12.0
Python Python == 3.10 (Conda recommended)

📌 Note: For GPU-accelerated simulation, ensure the above hardware and driver requirements are met.


🎮 Joint Space Command

If you want to directly control the joints, note: The robot exposes joint-space command topic (e.g., /astribot_arm_left/joint_space_command) for controlling the arm. The interpretation of the command depends on the control mode:

Control Mode Command Dimension Meaning Notes
Position / Velocity Control 7–14 Values 7–14:

First 7 values: target joint positions

Last 7 values: target joint velocities | Includes velocity compensation and gravity compensation for smoother motion | | Force Control | 7 | Each value represents the torque/force applied to the corresponding joint | ⚠️ Note: This mode does not guarantee sim-to-real accuracy, mainly for simulation purposes |

💡 Tip: If using Astribot SDK, you generally do not need to worry about these details — refer to the Astribot SDK documentation for more information. When using joint-space commands, ensure the control mode matches the command dimension to avoid unexpected behavior.


📷 Sensors

The robot supports cameras on hands and head. After loading the correct YAML configuration, you can receive image data on the corresponding ROS topics:

  • Raw color image: /astribot_whole_body/camera/<camera_name>/image_raw
  • Depth image: /astribot_whole_body/camera/<camera_name>/depth
  • Point cloud(in camera frame): /astribot_whole_body/camera/<camera_name>/point_cloud
Backend Supported Sensors
MuJoCo RGB-D cameras and point clouds for both hands and the head.
ManiSkill RGB cameras for both hands and the head.
Genesis Currently no sensor support.

💡 Tip
- To enable sensors in MuJoCo, use: simulation_mujoco_param_with_camera.yaml
- To enable sensors in ManiSkill, use: simulation_maniskill_param_chassis_fixed.yaml - Currently, examples starting with 3xx in the SDK are not supported in the simulation.


🛠 Tools

  • tools/install.sh → environment setup
  • tools/build.sh → build astribot_msgs
  • tools/Miniconda3-py38_4.9.2-Linux-x86_64.sh → install miniconda
  • tools/fix_GLIBCXX_3.4.30_bug.sh → patch for GLIBCXX bug
  • tools/fix_LIBFFI_BASE_7.0_bug.sh → patch for libffi bug

📖 Documentation


🤝 Contributing

Contributions are welcome!
If you’d like to add support for new simulators or robots, please contact me at [tonywang@astribot.com].


📜 License

BSD 3-Clause License


🙌 Acknowledgements

Built on top of:
- MuJoCo
- Genesis
- ManiSkill


❓ FAQ & Troubleshooting

  • Error related to GLIBCXX_3.4.30 not found or cv_bridge when installing dependencies Solution:
    Run the patch script to fix:
  bash tools/fix_GLIBCXX_3.4.30_bug.sh
  • Error related to libffi.so.7 or cv_bridge when launching the simulation Solution:
    Run the patch script to fix:
  bash tools/fix_LIBFFI_BASE_7.0_bug.sh

Core symbols most depended-on inside this repo

Shape

Method 176
Class 9
Function 2

Languages

Python100%

Modules by API surface

astribot_envs/astribot_mujoco_env.py51 symbols
simu_utils/robot_ros_interface.py34 symbols
astribot_envs/astribot_base_env.py31 symbols
astribot_envs/astribot_maniskill_env.py29 symbols
astribot_envs/astribot_genesis_env.py27 symbols
simu_utils/simu_common_tools.py8 symbols
astribot_envs/astribot_envs_factory.py6 symbols
astribot_simulation.py1 symbols

For agents

$ claude mcp add astribot_simulation \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page