Skip to content

Commit

Permalink
Added multirobot demo and set using prebuilt imags as default for gazebo
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>
  • Loading branch information
delihus committed Jan 15, 2024
1 parent 6b7674e commit 286d0ca
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
33 changes: 33 additions & 0 deletions demo/compose.gazebo.multirobot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Quick Start
#
# 1. run `xhost +local:docker && docker compose -f compose.gazebo.yaml up` on the laptop
# 2. open a shell inside a docker container `docker compose -f compose.gazebo.yaml exec -it rosbot bash`
# 2. run `ros2 run teleop_twist_keyboard teleop_twist_keyboard` inside the container

x-gpu-config:
&gpu-config
runtime: nvidia
environment:
- DISPLAY=${DISPLAY:?err}
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=all

x-cpu-config:
&cpu-config
environment:
- DISPLAY=${DISPLAY:?err}
- LIBGL_ALWAYS_SOFTWARE=1

services:
rosbot:
# image: husarion/rosbot-gazebo:humble
# build:
# context: ../
# dockerfile: Dockerfile.gazebo
<<: [ *gpu-config]
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
command: >
ros2 launch rosbot_gazebo simulation.launch.py
mecanum:=${MECANUM:-False}
robots:="robot1={y: 0.0}; robot2={y: 1.0}; robot3={y: 2.0};
8 changes: 4 additions & 4 deletions demo/compose.gazebo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ x-cpu-config:

services:
rosbot:
# image: husarion/rosbot-gazebo:humble
build:
context: ../
dockerfile: Dockerfile.gazebo
image: husarion/rosbot-gazebo:humble
# build:
# context: ../
# dockerfile: Dockerfile.gazebo
<<: [ *gpu-config]
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
Expand Down

0 comments on commit 286d0ca

Please sign in to comment.