This commit is contained in:
Björn Ellensohn 2023-09-26 11:23:47 +02:00
parent e785e90e3e
commit d910fd91bd
3 changed files with 58 additions and 2 deletions

View File

@ -106,7 +106,7 @@ services:
# Controller # Controller
controller: controller:
extends: base extends: base
command: > command: >
ros2 run segwayrmp SmartCar --ros-args -r cmd_vel:=cmd_vel_out -p serial_full_name:=/dev/segway ros2 run segwayrmp SmartCar --ros-args -r cmd_vel:=cmd_vel_out -p serial_full_name:=/dev/segway
devices: devices:
@ -129,6 +129,8 @@ services:
# teleop # teleop
teleop: teleop:
extends: base extends: base
depends_on:
- controller
command: > command: >
ros2 launch rmp220_teleop robot_joystick.launch.py ros2 launch rmp220_teleop robot_joystick.launch.py
devices: devices:
@ -169,6 +171,9 @@ services:
# localiaztion by ekf node # localiaztion by ekf node
ekf: ekf:
extends: overlay extends: overlay
depends_on:
- controller
- rsp
command: > command: >
ros2 launch cps_rmp220_support robot_localization.launch.py ros2 launch cps_rmp220_support robot_localization.launch.py
# Interactive shell # Interactive shell
@ -184,6 +189,10 @@ services:
# mapping # mapping
mapping: mapping:
extends: overlay extends: overlay
depends_on:
- ekf
- rsp
- lidar
command: > command: >
ros2 launch cps_rmp220_support robot_mapping.launch.py ros2 launch cps_rmp220_support robot_mapping.launch.py
# Interactive shell # Interactive shell
@ -199,6 +208,10 @@ services:
# slam-toolbox-localization # slam-toolbox-localization
localization: localization:
extends: overlay extends: overlay
depends_on:
- ekf
- rsp
- lidar
command: > command: >
ros2 launch cps_rmp220_support robot_mapping_localization.launch.py map_file_name:=/repo/maps/map.yaml ros2 launch cps_rmp220_support robot_mapping_localization.launch.py map_file_name:=/repo/maps/map.yaml
# Interactive shell # Interactive shell
@ -214,6 +227,10 @@ services:
# amcl_localization # amcl_localization
amcl: amcl:
extends: overlay extends: overlay
depends_on:
- ekf
- rsp
- lidar
command: > command: >
ros2 launch cps_rmp220_support robot_amcl.launch.py map:=/repo/maps/map.yaml ros2 launch cps_rmp220_support robot_amcl.launch.py map:=/repo/maps/map.yaml
# Interactive shell # Interactive shell
@ -335,6 +352,14 @@ services:
# ROS2 Frontier exploration # ROS2 Frontier exploration
explorer: explorer:
extends: overlay extends: overlay
depends_on:
- controller
- teleop
- rsp
- lidar
- mapping
- ekf
- navigation
command: > command: >
ros2 launch cps_rmp220_support robot_exploration.launch.py ros2 launch cps_rmp220_support robot_exploration.launch.py
stdin_open: true stdin_open: true

View File

@ -17,6 +17,8 @@ ENV ROS_DISTRO=${ROS_DISTRO}
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
# Create Colcon workspace with external dependencies # Create Colcon workspace with external dependencies
RUN echo "update base 26.09.2023 - test"
RUN mkdir -p /rmp_ws/src RUN mkdir -p /rmp_ws/src
WORKDIR /rmp_ws/src WORKDIR /rmp_ws/src
COPY dependencies.arm64.repos . COPY dependencies.arm64.repos .
@ -78,6 +80,7 @@ ENTRYPOINT [ "/entrypoint.sh" ]
FROM base AS overlay FROM base AS overlay
# Create an overlay Colcon workspace # Create an overlay Colcon workspace
RUN echo "update overlay 26.09.2023"
RUN mkdir -p /overlay_ws/src RUN mkdir -p /overlay_ws/src
WORKDIR /overlay_ws/src WORKDIR /overlay_ws/src
COPY overlay.repos . COPY overlay.repos .
@ -85,10 +88,11 @@ RUN vcs import < overlay.repos
WORKDIR /overlay_ws WORKDIR /overlay_ws
RUN echo "update overlay 22.09.2023" ENV DEBIAN_FRONTEND noninteractive
RUN source /rmp_ws/install/setup.bash \ RUN source /rmp_ws/install/setup.bash \
&& apt-get update \ && apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install ros-humble-robot-localization -y \
&& rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y \ && rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

View File

@ -40,4 +40,31 @@ services:
- ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority - ${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. # 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: # pc:
# ipv4_address: 192.168.0.201 #here need to set fixed ip to avoid collissions with other containers on robot.
rviz2-depthai:
image: luxonis/depthai-ros:humble-latest
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. # ipv4_address: 192.168.0.201 #here need to set fixed ip to avoid collissions with other containers on robot.