Unity3D based multi-robot simulator can bring-up simulation environment by SDF(Simulation Description File) easily. And it supports to connect ROS2 through cloisim_ros.
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. Hence, CLOiSim.
This project consists of
Working branch policy has been updated. Previous latest main
branch which is corresponding to release-3.2.0
branch is no longer available. So please check release-3.2.0
branch if you want to follow the history of CLOiSim-3.x.x
.
develop
branch shall be merged into main
branch every released.
The current release includes the features only for marked items in the list below. Other sensor models are work in progress. Here are the list of items that is implemented(marked) or planned to be implemented.
<Joint type="revolute2">
<animation>
<specular>
, <attenuation/linear>
, <attenuation/contant>
, <attenuation/quadratic>
, <spot/falloff>
Plus, SDF file basically targeting and supporting version 1.6 and works on the essential elements such as <model>
, <link>
, <visual>
, <collision>
, <joint>
, etc.
It does not support optional elmenets like <wind>
, <audio>
, <state>
, <atmosphere>
, <magnetic_field>
, <scene>
, <road>
, <population>
.
There is problem with <pose>
in <joint>
since introduction of articulation body model. Therefore, plaese
Currently, geometry mesh type is supporting only 'Wavefront(.obj) with material', 'Collada(.dae) including animation' and 'STL(.stl)'.
<ambient>
elements in <materal>
and ambient properies in mesh files are not support in CLOiSim.
It called 'CLOiSimPlugin'. And below plugins could be utilized through write an element on SDF.
Plugin name should be written in filename attribute and it's case sensitive.
For example,
<plugin name="actor_plugin" filename="libActorPlugin.so" />
More details and usages for configuration/parameters in here.
LaserPlugin
: help to publish 2D or 3D lidar dataCameraPlugin
: help to publish 2D color image data or depth image dataSegmentationCameraPlugin
: help to publish semantic segmentation image data and label infoMultiCameraPlugin
: help to publish multiple color image dataRealSensePlugin
: can handle ir1(left), ir2(right), depth, colorMicomPlugin
: control micom(differential drive) input/output(sensor)GpsPlugin
: gps position in worldJointControlPlugin
: can control joints and help to publish joints status.ActorPlugin
: add actor control functionality using AI(Unity) componentsImuPlugin
: help to publish IMU sensor dataSonarPlugin
: help to publish Sonar range dataElevatorSystemPlugin
: control(lifting, cal) elevatorsGroundTruthPlugin
: retrieve all information(position, size, velocity) for objectsActorControlPlugin
: controls actor using AI(Unity) components(actor which loaded ActorPlugin
)Refer to core codes in 'Assets/Scripts'.
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).
For the performance in terms of collision handling, designing collision geometry properly may important.
if <name>
element of <script>
element in <material>
element contains "tree" words, CLOiSim applies "URP/Nature/SpeedTree" Shader as a rendering material.
Unity Editor Version: '2022.3.21f1 (LTS)'.
Linux Machine
Windows Machine
If you don't want to build a project, just USE a release binary(Download linux version). And just refer to 'Usage' section.
In terms of branch, 'main' is release(stable) version, and 'develop' is used for development(on-going).
Please visit here build guide in Wiki pages.
Any problem during launching the simultion, please refer to Wiki Page/Usage' section.
Set environment path like below. You can find the sample resources here
Multiple path can be set by :(colon).
export CLOISIM_FILES_PATH="/home/Unity/cloisim/sample_resources/media"
export CLOISIM_MODEL_PATH="/home/Unity/cloisim/sample_resources/models:/home/Unity/cloisim/another_resources/models"
export CLOISIM_WORLD_PATH="/home/Unity/cloisim/sample_resources/worlds"
Run CLOiSim
./run.sh cloisim.world
or you can execute binary file directly.
./CLOiSim.x86_64 -world lg_seocho.world
You need to run this package in order to publish sensor data in ROS2.
Run bringup node in 'cloisim_ros' ros2 packages
Latest version of CLOiSim will support only humble version of ROS2
That's it. Have fun!!!
tail -f ~/.config/unity3d/LGE.CTO.AdvancedRoboticsLab/CLOiSim/Player.log
CLOiSim supports web-based control service through websocket as an external interface.
websocket service path: ws://127.0.0.1:8080/{service-name}
You can add markers like line, text, box, or sphere point and reset simulation by just sending a request data as a JSON format.
Read detail guide in Wiki pages.
New features or functions shall be developed on demand.
Fully support to keep up with the latest version of 'SDF specifiaction'
Add new sensor models and enhance sensor performance
introduce programmable c++ plugin
Performance optimization for sensors (Use DOT 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