From 18212fcd0c0a77d222dc618f5d962cbc477f1786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ellensohn?= Date: Wed, 13 Sep 2023 13:59:17 +0200 Subject: [PATCH] update --- docker-compose.yaml | 7 ++++--- rviz2.yaml | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 rviz2.yaml diff --git a/docker-compose.yaml b/docker-compose.yaml index 9fa44c7..de7883e 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -257,7 +257,8 @@ services: # rviz2 rviz2: - extends: guis + #extends: guis + image: ghcr.io/bjoernellens1/ros2_rmp/rmp:guis # command: > # ros2 launch cps_rmp220_support robot_rviz2.launch.py command: > @@ -266,7 +267,7 @@ services: stdin_open: true tty: true # Networking and IPC for ROS 2 - #network_mode: host + network_mode: host ipc: host # Needed to display graphical applications privileged: true @@ -281,7 +282,7 @@ services: # Allows graphical programs in the container. - /tmp/.X11-unix:/tmp/.X11-unix:rw - ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority - + # Foxglove Studio Bridge foxglove_bridge: extends: overlay diff --git a/rviz2.yaml b/rviz2.yaml new file mode 100644 index 0000000..0319f4d --- /dev/null +++ b/rviz2.yaml @@ -0,0 +1,43 @@ +networks: + pc: # config for this pc. Only required for running the containers locally on the pc. For instance rviz2 or guis with gazebo. + driver: macvlan + driver_opts: + parent: wlx00e04c5513fc # pc network interface: here my wifi card. Can be found with ifconfig. + ipam: + config: + - subnet: 192.168.0.0/24 + gateway: 192.168.0.1 + ip_range: 192.168.0.200/25 + aux_addresses: + net-address: 192.168.0.100 #? what is this for --> to exclude addresses from buing used. + +services: + # rviz2 + rviz2: + image: ghcr.io/bjoernellens1/ros2_rmp/rmp:guis + # command: > + # ros2 launch cps_rmp220_support robot_rviz2.launch.py + command: > + ros2 launch cps_rmp220_support rviz.launch.py + # 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 + - ROS_DOMAIN_ID=5 + - RMW_IMPLEMENTATION=rmw_cyclonedds_cpp + volumes: + # Allows graphical programs in the container. + - /tmp/.X11-unix:/tmp/.X11-unix:rw + - ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority + # networks: # not using bridging anymore, instead try using all services on macvlan? let's see... shoudl word for now. Bridging does definitely not work because multicast is not supported here. + # pc: + # ipv4_address: 192.168.0.201 #here need to set fixed ip to avoid collissions with other containers on robot. \ No newline at end of file