Skip to content

Unity-3D based multi-robot simulator can bring-up simulation environment by SDF(Simulation Description File) easily. And it supports to connect ROS2 through cloisim_ros.

License

Notifications You must be signed in to change notification settings

avatar196kc/cloisim

 
 

Repository files navigation

CLOiSim : Multi-Robot Simulator

Multi-robot

Happy to announce CLOiSim. It is a new multi-robot simulator that uses an SDF file containing 3d world environemnts and robot descriptions.

The simulator is based on Unity 3D. It may look similar to Gazebo, where, unfortunately, we encountered performance problems while loading multiple robots equipped with multiple sensors.

This project consists of

  • SDF Parser for C#
  • SDF Robot Implementation for Unity -> Visual / Collision / Sensor / Physics for joints
  • SDF Plugins for Unity
  • UI modules -> Module for on-screen information
  • Network modules -> Module for transporting sensor data or control signal
  • Web service -> Module for controling simulation through a web interface

cloisim_multirobot video link

Features

The current release includes the features only for a 2-wheeled mobile robot with 2D LiDAR sensor. Other sensor models are work in progress. Here is the full list of models that is implemented or planned to be implemented.

  • 2D LiDAR Sensor
  • 2-Wheeled Motor
  • Sonar sensor
  • IMU
  • Contact
  • Camera
    • Camera intrinsic parameter
  • Multi-camera
  • GPS sensor
  • Depth Camera
    • Point Cloud message
  • RealSense (RGB + IR1 + IR2 + Depth)
  • 3D Lidar Sensor
  • Sensor noise models
  • Physics
    • Support all physics parameters in SDF specification
    • Support <Joint type="revolute2">
  • Actors
    • interpolate_x in <animation>

Plus, SDF works on the essential elements such as <model>, <link>, <visual>, <collision>, <joint>, etc. It does not support optional elmenets like <lights>, <audio>, <state>.

Currently, geometry mesh type is supporting only 'Wavefront(.obj) with material' and 'STL(.stl)'.

cloisim_lidar_ros video link

How it works

Refer to core codes in 'Assets/Scripts'.

  • Load SDF file -> Parse SDF(simulation description) -> Implement and realize description

Shaders are also used to get depth buffer information in a few sensor model.

Default physics engine 'Nvidia PhysX' is used for physics. And it retrieves some of physics parameters from <ode> in sdf. 'SDFPlugins' help physics tricky handling for jointing <link> ojbects by <joint> element.

We've deceided to change a solver type of physics engine since new solver "TGS(Temporal Gauss Seidel)" is intorduced recently(PhysX 4.1).

So there is NO more constaints for rigidbodies by PGS(Projected Gauss Seidel) solver type since latest version(CLOiSim-1.11.0).

But inertia factors which retrieved from SDF are still NOT USED for rigidbody in Unity. Because it could cause unexpected behavior with physX engine.

Getting Started

Minimum requirement

  • Processor: testing and looking for the minimum
  • Memory: testing and looking for the minimum
  • Graphics: testing and looking for the minimum

Tested environement

  • Latest Unity Editor Version: '2020.3.0f1 (LTS)'
  • Linux: Ubuntu 20.04.1
  • Processor: AMD® Ryzen 9 3900x 12-core processor × 24
  • Memory: 32GB
  • Graphics: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti]

Release version

If you don't want to build a project, just USE a release binary(Download linux version). And just refer to 'Usage'

If you want to build a project

Please visit here build guide.

Usage

Run 'CLOiSim'

Set environment path like below.

export CLOISIM_FILES_PATH="/home/Unity/cloisim/sample_resources/media"
export CLOISIM_MODEL_PATH="/home/Unity/cloisim/sample_resources/models"
export CLOISIM_WORLD_PATH="/home/Unity/cloisim/sample_resources/worlds"

Run CLOiSim

./CLOiSim.x86_64 -world lg_seocho.world

or you can execute './run.sh' script in release binary version.

  • ./run.sh cloisim.world

After run 'CLOiSim'

  • 'cloisim_ros' ros2 packages for transporting sensor data are required.

  • Run bringup node in 'cloisim_ros' ros2 packages

  • And have fun!!!

Debugging log

tail -f  ~/.config/unity3d/LG\ Electronics/CLOiSim/Player.log

Control service

CLOiSim supports web-based simulation control service through websocket as an external interface.

websocket service path: ws://127.0.0.1:8080/{service-name}

Just send a request data as a JSON format.

Read detail guide

cloisim_nav2_ros2 video link

Future Plan

New features or functions shall be developed on demand.

  • Fully support to keep up with 'SDF specifiaction version 1.7'

  • Add new sensor models and enhance sensor performance

  • introduce programmable c++ plugin

  • Noise models for sensor model

  • Performance optimization for sensors (Use DOTS by unity?)

  • Upgrade quality of graphical elements

  • If you have any troubles or issues, please don't hesitate to create a new issue on 'Issues'. https://github.com/lge-ros2/cloisim/issues

감사합니다. Thank you

About

Unity-3D based multi-robot simulator can bring-up simulation environment by SDF(Simulation Description File) easily. And it supports to connect ROS2 through cloisim_ros.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.2%
  • Other 0.8%