Giter Site home page Giter Site logo

ratharn / cloisim_ros Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lge-ros2/cloisim_ros

0.0 1.0 0.0 507 KB

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

License: MIT License

Shell 0.18% Dockerfile 0.35% CMake 18.71% Python 1.66% C++ 77.67% C 1.42%

cloisim_ros's Introduction

cloisim_ros (foxy version)

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

Prerequisite

  • Download CLOiSim Simulator
    • CLOiSim: Latest link, All Releases link
rosdep update
rosdep install -y -r -q --from-paths src --ignore-src --rosdistro foxy

Build

Set up ROS2 environment first

source /opt/ros2/foxy/setup.bash
colcon 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 here details

Run all cloisim_ros (robot + factory)

strongly recommend to use this method.

Turn off single mode(=multi robot mode)

apply namespace for each robot)

ros2 run cloisim_ros_bringup cloisim_ros_bringup --ros-args -p singlemode:=False

ros2 run cloisim_ros_bringup cloisim_ros_bringup

or

ros2 launch cloisim_ros_bringup bringup.launch.py

ros2 launch cloisim_ros_bringup bringup.launch.py singlemode:=False

Turn on single Mode

will NOT apply namespace for robot and the number of robot must BE single in world environment.

ros2 run cloisim_ros_bringup cloisim_ros_bringup --ros-args -p singlemode:=True

or

ros2 launch cloisim_ros_bringup bringup.launch.py singlemode:=True

Running CLOiSim

it provides a script to run CLOiSim easily.

ros2 launch cloisim_ros_bringup cloisim.launch.py sim_path:=/opt/CLOiSim/CLOiSim-1.10.0 world:=lg_seocho.world

Using Docker

Run below command after clone this repository(this branch). Only support 'ros2 run'

Build Docker image

git clone https://github.com/lge-ros2/cloisim_ros.git -b foxy
cd cloisim_ros
docker build -t cloisim_ros .

Running container

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

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

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

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

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

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

You can set bridge ip using below command.

echo $(ip addr show dev docker0 | grep "inet" | awk 'NR==1{print $2}' | cut -d'/' -f 1)

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

Version info

  • Please refer to each branch for ROS2 distro-version you want

cloisim_ros's People

Contributors

hyunseok-yang avatar zikprid0 avatar yjkim046 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.