This commit is contained in:
Björn Ellensohn 2023-07-25 11:29:56 +02:00
parent 160fe70a7e
commit b266eab40c
3 changed files with 32 additions and 3 deletions

View File

@ -40,7 +40,36 @@ services:
controller: controller:
extends: overlay extends: overlay
command: > command: >
/robot_startup.sh /controller_startup.sh
devices:
- /dev/ttyUSB0:/dev/ttyUSB0
- /dev/ttyACM0:/dev/ttyACM0
- /dev/input/js0:/dev/input/js0
# Interactive shell
stdin_open: true
tty: true
# Networking and IPC for ROS 2
network_mode: host
ipc: host
# Needed to display graphical applications
privileged: true
environment:
# Allows graphical programs in the container.
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
- NVIDIA_DRIVER_CAPABILITIES=all
volumes:
# Allows graphical programs in the container.
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority
# Localization
localization:
extends: overlay
command: >
ros2 launch bot_mini_bringup rsp.launch.py &
ros2 launch bot_mini_bringup robot_localization.launch.py &
ros2 launch bot_mini_bringup robot_lidar.launch.py
devices: devices:
- /dev/ttyUSB0:/dev/ttyUSB0 - /dev/ttyUSB0:/dev/ttyUSB0
- /dev/ttyACM0:/dev/ttyACM0 - /dev/ttyACM0:/dev/ttyACM0

View File

@ -50,7 +50,7 @@ RUN source /bot_mini_ws/install/setup.bash \
COPY ./docker/entrypoint.sh / COPY ./docker/entrypoint.sh /
RUN chmod +x /entrypoint.sh RUN chmod +x /entrypoint.sh
COPY ./robot_startup.sh / COPY ./controller_startup.sh /
RUN chmod +x /robot_startup.sh RUN chmod +x /controller_startup.sh
ENTRYPOINT [ "/entrypoint.sh" ] ENTRYPOINT [ "/entrypoint.sh" ]