gs_ros is a ROS 2 package designed to bridge the gap between the powerful Genesis simulator and the ROS 2 ecosystem. Genesis is a next-gen physics platform for Robotics and Embodied AI, offering:
- A universal physics engine built from the ground up for a wide range of materials.
- A lightweight, ultra-fast, and user-friendly robotics simulation platform.
- A powerful and fast photo-realistic rendering system.
- A generative data engine that can create multi-modal data from natural language prompts.
This project provides the essential tools to kickstart your robotics development and simulation within ROS 2 using Genesis. Using this package is very simple, the main code is 5 lines long

gs_ros is a lightweight, pure Python package that simplifies the integration of Genesis and ROS 2.
- ROS 2 Control Integration: uses a topic based hardware interface for seamless compatibility with the
ros2_controlframework. - Simulator Services: Exposes core simulator functionalities (like pausing, resetting, domain_randomisation,inverse kinematics, forward kinematics, path planning) through ROS 2 services, defined in the accompanying
gs_ros_interfacespackage. - Comprehensive Sensor Suite: Provides a variety of simulated sensors, publishing data on standard ROS 2 topics.
gs_ros provides out-of-the-box support for several common robotics sensors:
- 📷 Camera: Publishes RGB, depth, semantic segmentation, and surface normal images.
- 📸 RGBD Camera: A convenient wrapper for synchronized RGB and point cloud publishing.
- 🛰️ IMU: Simulates an Inertial Measurement Unit.
- 📏 Sectional Lidar: A ray based lidar covering a section of the space(analogus to a depth camera).
- 🌐 3D Lidar: A ray based 360 degree 3D Lidar.
- 📡 LaserScan A 360 degree laser-scan with one vertical channel, commonly used in robotics
- 💥 Contact Force Sensor A tactile sensor to measure the force experinced by a speified link
- 💥 contact senor A binary tactile sensor to check if an entity is in contact with any other entity
- ROS 2: This package is developed for ROS 2. Ensure you have a working installation (e.g., jazzy, kilted, rolling, humble).
- Genesis Simulator: Install Genesis by following the instructions in the official Genesis repository.
Note:
gs_roswas tested with Genesisv0.3.5. Newer versions may have compatibility issues. Please report any problems you encounter!
-
Downgrade NumPy(optional) The default NumPy version installed with Genesis may not be compatible with ROS 2. Downgrade to a compatible version:
pip install numpy==1.26.4
-
Clone the Repository Navigate to your Colcon workspace's
srcdirectory and clone this repository.# Example for a workspace in ~/ros2_ws cd ~/ros2_ws/src git clone https://github.com/vybhav-ibr/genesis_ros.git .
Use the 'humble' barnch for that distro, for every-other distro use the main branch
-
Install Dependencies Let
rosdephandle the required dependencies.cd ~/ros2_ws rosdep install --from-paths src --ignore-src -r -y
-
Build and Source the Workspace Build the package using
colcon.cd ~/ros2_ws colcon build
Troubleshooting: If you encounter an
ImportError: No module named 'em', it might be due to a conflict with a Python virtual environment. Deactivate any active virtual environment run thecolcon clean workspacecommand and try building with the--merge-installflag:colcon build --merge-installAfter a successful build, source your workspace's setup file:
source install/setup.bash
-
Start the genesis Simulator and the gs_ros bridge
python test_import.py
-
Launch the Ackermann Drive Demo Run the provided demo from the
gs_ros2_control_demospackage to see a wheeled robot in action.ros2 launch gs_ros2_control_demos ackermann_drive_example.launch.py
- Genesis Version: Genesis is under active development. Using the latest version from their
mainbranch may cause issues. Sticking to a tagged release likev0.3.5is recommended. but any version afterv0.3.5should be mostly compatable - Parallel Environments: Support for parallelized simulation environments is not yet implemented but may be added in the future.
- Sensor Models: Currently, no advanced sensor noise or distortion models are included. This is planned for a future release.
- topic_based_hardware_interfaces: This external package is used gs_ros for integrating ros2_control with a topic based system topic_based_hardware_interfaces.For the
humblebranch topic_based_ros2_control by picknik robotics is used as humble distro is not supported. The update frequncy for the topic-based-hardware-interface may be a limitation, This package is also not suitable for real-time controllers
- Contributions Welcome! Feel free to open a Pull Request to fix a bug or add a feature. If you'd like to contribute long-term, please open an issue to discuss it.
- Need Help? For bugs, feature requests, or suggestions, please open an issue in the repository.
- Configuration Docs: For details on the parameters in the config files, please refer to the Genesis source code, as the official documentation may not be up-to-date.