Skip to content

lge-ros2/cloisim

Repository files navigation

CLOiSim: Multi-Robot Simulator

Unity ROS 2 Humble ROS 2 Jazzy License Release

CLOiSim is a high-performance multi-robot simulator based on Unity 6. It dynamically builds simulated 3D environments and robots directly from SDFormat (SDF) description files.

multi-type-of-robots

🚀 Overview

CLOiSim was developed to address performance bottlenecks encountered with other simulators when loading multiple robots with complex sensor suites. By leveraging Unity's efficient rendering and physics pipelines, CLOiSim provides a scalable solution for large-scale robot simulation.

Key Components

  • SDF Parser: Utilizes sdformat-sharp as a Unity package for robust and comprehensive SDF 1.6+ specification parsing.
  • Unity Implementer: Automated mapping of SDF elements to Unity's Visual, Collision, and Physics (ArticulationBody) components.
  • Transport Layer: High-performance sensor data and control signal transport via ZeroMQ (NetMQ).
  • Web Service: JSON-based simulation control and monitoring through a web interface.

cloisim_multirobot Full Video Demo


📢 Notices

Important

🚨 CLOiSim has been upgraded to Unity 6 (6000.5.3f1). Legacy versions based on Unity 2022.3 LTS are no longer maintained.

Warning

⚠️🔥 5.4.x or later is recommended over 5.3.x. Across 5.3.0–5.3.14, several fixes were attempted for a recurring freeze in the Unified Ray Tracing (URT) path (TLAS in-flight disposal, BVH rebuild races, GPU fence gating, TDR recovery, etc.), but the freeze kept resurfacing under load. Starting with 5.4.x, Depth Camera sensors (Depth / RealSense IR / VCSEL) have been switched from URT back to rasterization, which resolves this class of freeze. LiDAR remains URT-based. If you're currently on 5.3.x, upgrading to 5.4.x or later is recommended.

Warning

⚠️ From 5.4.0 onward, Ubuntu 24.04 LTS is required on Linux. The bundled AssimpNetter 6.0.5 native library requires newer GLIBC/libstdc++ and may fail to load on older distributions such as Ubuntu 20.04/22.04.

Version History

Branch CLOiSim Version Unity Version Status
main 5.4.x (Latest Release) Unity 6 Active — release snapshots
develop 5.4.x+ (Rolling) Unity 6 Active — ongoing development toward the next release
release-5.3.14 5.3.x Unity 6 Not recommended (URT freeze)
release-4.14.6 4.x.x Unity 2022.3 LTS Maintenance
release-3.2.0 3.x.x Unity 2021 Legacy
release-2.7.7 2.x.x Unity 2020 Legacy

✨ Features

🛠 Sensors & Actuators

Category Feature Status Notes
Joints Joint Control / Pose ArticulationBody based
LiDAR 2D / 3D (URT ray tracing) Pattern-based (e.g., Livox) supported
Camera Color / Multi / Segmentation Rasterization-based
Depth Camera Depth / RealSense (IR1, IR2, VCSEL dot pattern) Rasterization-based
Inertial IMU / GPS Gaussian noise models included
Other Sonar / IR / Contact
Noise Gaussian / Custom 🚧 Gaussian fully supported

🌍 World & Physics

  • Physics Engine: NVIDIA PhysX with Temporal Gauss Seidel (TGS) solver for enhanced stability.
  • World Elements: Actors (animated characters), Lights, Heightmaps (DEM), Roads.
  • Coordinates: Support for Spherical Coordinates.
  • Rendering: URP-based high-quality visuals with specialized shaders for sensors.

cloisim_lidar_ros


🔌 Plugin System

CLOiSim uses a flexible plugin architecture to extend robot and world functionalities via SDF <plugin> tags. Plugin names are case-sensitive and should be specified in the filename attribute (e.g., <plugin name="actor_plugin" filename="libActorPlugin.so" />).

Model Plugins

  • LaserPlugin: Publishes 2D or 3D LiDAR data.
  • CameraPlugin: Publishes 2D color or depth image data.
  • SegmentationCameraPlugin: Publishes semantic segmentation images and label info.
  • MultiCameraPlugin: Publishes data from multiple color cameras.
  • RealSensePlugin: Handles IR1, IR2, depth, and color data for RealSense sensors.
  • MicomPlugin: Controls differential drive (2/4-wheeled) and self-balancing robots.
  • JointControlPlugin: Controls joints and publishes joint status.
  • GpsPlugin: Provides GPS position data in the world.
  • ImuPlugin: Publishes IMU sensor data.
  • SonarPlugin / IRPlugin: Publishes range data from Sonar or IR sensors.
  • LogicalCameraPlugin: Publishes object detection and info within the camera view.
  • ContactPlugin: Publishes contact sensor data.
  • ActorPlugin: Adds character control functionality using Unity AI components.
  • ParticleSystemPlugin: Enables Unity's particle systems.
  • ClothPlugin / ClothGrabberPlugin: Handles cloth simulation and fingertip grabbers.

World Plugins

  • ElevatorSystemPlugin: Controls lifting and calling logic for elevator systems.
  • GroundTruthPlugin: Retrieves precise information (position, size, velocity) for all objects.
  • ActorControlPlugin: Centrally controls actors that have the ActorPlugin attached.
  • MowingPlugin: Handles grass and mowing simulation.

🏁 Getting Started

Prerequisites

  • OS: Ubuntu 24.04 LTS or Windows 10+ (older Ubuntu 20.04/22.04 not supported)
  • Graphics: Vulkan-capable GPU (NVIDIA RTX 20-series recommended)
  • Unity: Unity Editor 6000.5.3f1 (if building from source)

Installation

  1. Release Binary: Download the latest Linux version.
  2. From Source: Refer to the Build Guide for detailed instructions.

📖 Usage

1. Environment Setup

Set the paths to your resources (models, worlds, media):

export CLOISIM_FILES_PATH="/path/to/sample_resources/media"
export CLOISIM_MODEL_PATH="/path/to/sample_resources/models"
export CLOISIM_WORLD_PATH="/path/to/sample_resources/worlds"

2. Running the Simulator

# Standard mode
./run.sh cloisim.world

# Headless mode (Linux only)
./run.sh --headless --world cloisim.world

3. ROS 2 Integration

To bridge simulation data to ROS 2, use the cloisim_ros package:

  • Supports ROS 2 Humble & Jazzy.
  • Launch the bringup node to start publishing sensor topics.

4. Running EditMode Unit Tests

See scripts/README.md for detailed EditMode test runner usage and configuration.


🛠 Advanced Features

External UI & Control

CLOiSim provides a WebSocket interface for runtime interaction:

  • Path: ws://127.0.0.1:8080/{service-name}
  • Capabilities: Marker placement (lines, boxes, text), simulation reset, and more.
  • Detailed Guide

cloisim_nav2_ros2


🗺 Roadmap

  • Full SDF specification compatibility.
  • Programmable C++ plugin interface.
  • Advanced sensor performance optimizations.
  • Enhanced graphical fidelity and material support.

🤝 Support

If you encounter any issues or have feature requests, please open an Issue.


감사합니다. Thank you!

About

Unity3D based multi-robot simulator can bring-up simulation environment by SDFormat (Simulation Description Format) easily. And it supports to connect ROS2 through cloisim_ros.

Topics

Resources

License

Security policy

Stars

176 stars

Watchers

9 watching

Forks

Sponsor this project

Contributors