diff --git a/robot_startup.sh b/controller_startup.sh similarity index 100% rename from robot_startup.sh rename to controller_startup.sh diff --git a/docker-compose.yaml b/docker-compose.yaml index e4005cc..05c7e89 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -40,7 +40,36 @@ services: controller: extends: overlay 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: - /dev/ttyUSB0:/dev/ttyUSB0 - /dev/ttyACM0:/dev/ttyACM0 diff --git a/docker/Dockerfile b/docker/Dockerfile index 3a56344..47ec9ce 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -50,7 +50,7 @@ RUN source /bot_mini_ws/install/setup.bash \ COPY ./docker/entrypoint.sh / RUN chmod +x /entrypoint.sh -COPY ./robot_startup.sh / -RUN chmod +x /robot_startup.sh +COPY ./controller_startup.sh / +RUN chmod +x /controller_startup.sh ENTRYPOINT [ "/entrypoint.sh" ] \ No newline at end of file