Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

ROS2 simulation device packages to connect unity based multi-robot simulator CLOisim.

License

NotificationsYou must be signed in to change notification settings

lge-ros2/cloisim_ros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS2 simulation device packages to connect CLOiSim(the unity3D based multi-robot simulator).

Download CLOiSim Simulator

Install ROS2 jazzy

follow the guideline on below link.

https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debians.html

Prerequisite

mkdir -p~/cloisim_ws/srccd~/cloisim_ws/srcgit clone --recursive https://github.com/lge-ros2/cloisim_ros.git -b jazzysudo apt updatesudo apt install -y python3-rosdepsudo rosdep initrosdep updaterosdep install -y -r -q --from-paths src --ignore-src --rosdistro jazzy

Build

Set up ROS2 environment first

source /opt/ros2/jazzy/setup.bashcd~/cloisim_wscolcon build --symlink-install --packages-up-to cloisim_ros_bringup

Usage

Set environment variable, if the server is not localhost

export CLOISIM_BRIDGE_IP='xxx.xxx.xxx.xxx'export CLOISIM_SERVICE_PORT=8080

check heredetails for bring-up guide

Run cloisim_ros (robot + world)

DDS

recommended to use cylcone DDS

export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

Shared Memory DDS with FastRTPS

It's experimental feature for cloisim_ros. Use absolute path in FASTRTPS_DEFAULT_PROFILES_FILE environment variable.

For example,

export RMW_IMPLEMENTATION=rmw_fastrtps_cppexport FASTRTPS_DEFAULT_PROFILES_FILE=/home/cloi/src/cloisim_ros/fastrtps_shared_profile.xml

Turn off single mode(=multi robot mode)

Apply namespaceas each robot as a multi robot mode.

Strongly recommend to use this method.

ros2 launch cloisim_ros_bringup bringup_launch.pyros2 launch cloisim_ros_bringup bringup_launch.py single_mode:=False

Turn on single Mode

It shall NOT be applied namespace for robot and the number of robot must BE single in world environment.

ros2 launch cloisim_ros_bringup bringup_launch.py single_mode:=True

Running CLOiSim

It provides a script to run CLOiSim easily.

ros2 launch cloisim_ros_bringup cloisim_launch.py sim_path:=/opt/CLOiSim/CLOiSim-2.2.0 world:=lg_seocho.world

Using Docker

Run below command after clone this repository(this branch).

Build Docker image

git clone https://github.com/lge-ros2/cloisim_ros.git -b jazzycd cloisim_rosdocker build -t cloisim_ros.

Running container

You can add possible parameters as described above. ex) target_model, target_parts_type or target_parts_name

multi robot mode

docker run -it --rm --net=host -e ROS_DOMAIN_ID=$ROS_DOMAIN_ID cloisim_ros

single robot mode

docker run -it --rm --net=host -e ROS_DOMAIN_ID=$ROS_DOMAIN_ID cloisim_ros single_mode:=True

multi robot mode with default network driver(bridge)

docker run -it --rm -e CLOISIM_BRIDGE_IP='192.168.0.125' -e ROS_DOMAIN_ID=$ROS_DOMAIN_ID cloisim_ros

single robot mode with default network driver(bridge)

docker run -it --rm -e CLOISIM_BRIDGE_IP='192.168.0.125' -e ROS_DOMAIN_ID=$ROS_DOMAIN_ID cloisim_ros single_mode:=True

You can set bridge ip using below command.

export CLOISIM_BRIDGE_IP=$(ip addr show dev docker0| grep"inet"| awk'NR==1{print $2}'| cut -d'/' -f 1)echo$CLOISIM_BRIDGE_IPdocker run -it --rm -e CLOISIM_BRIDGE_IP=$CLOISIM_BRIDGE_IP -e ROS_DOMAIN_ID=$ROS_DOMAIN_ID cloisim_ros

Version info


[8]ページ先頭

©2009-2025 Movatter.jp