mirror of
https://github.com/bjoernellens1/ros2_bot_mini.git
synced 2024-11-23 08:05:11 +00:00
update
This commit is contained in:
parent
dfeb1a7cee
commit
fe19ca1207
@ -67,8 +67,7 @@ services:
|
||||
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
|
||||
/localization_startup.sh
|
||||
devices:
|
||||
- /dev/ttyUSB0:/dev/ttyUSB0
|
||||
- /dev/ttyACM0:/dev/ttyACM0
|
||||
@ -90,6 +89,61 @@ services:
|
||||
# Allows graphical programs in the container.
|
||||
- /tmp/.X11-unix:/tmp/.X11-unix:rw
|
||||
- ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority
|
||||
|
||||
# mapping
|
||||
mapping:
|
||||
extends: overlay
|
||||
command: >
|
||||
ros2 launch bot_mini_bringup robot_mapper.launch.py
|
||||
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
|
||||
|
||||
# navigation
|
||||
navigation:
|
||||
extends: overlay
|
||||
command: >
|
||||
ros2 launch bot_mini_bringup robot_navigation.launch.py
|
||||
map_subscribe_transient_local:=true
|
||||
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
|
||||
|
||||
# # Behavior demo using Python and py_trees
|
||||
# demo-behavior-py:
|
||||
|
@ -53,4 +53,10 @@ RUN chmod +x /entrypoint.sh
|
||||
COPY ./controller_startup.sh /
|
||||
RUN chmod +x /controller_startup.sh
|
||||
|
||||
COPY ./mapping_startup.sh /
|
||||
RUN chmod +x /mapping_startup.sh
|
||||
|
||||
COPY ./localization_startup.sh /
|
||||
RUN chmod +x /localization_startup.sh
|
||||
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
28
localization_startup.sh
Normal file
28
localization_startup.sh
Normal file
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
# Basic entrypoint for ROS / Colcon Docker containers
|
||||
|
||||
# Source ROS 2
|
||||
source /opt/ros/${ROS_DISTRO}/setup.bash
|
||||
echo "Sourced ROS 2 ${ROS_DISTRO}"
|
||||
|
||||
# Source the base workspace, if built
|
||||
if [ -f ${UNDERLAY_WS}/install/setup.bash ]
|
||||
then
|
||||
source ${UNDERLAY_WS}/install/setup.bash
|
||||
#export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$(ros2 pkg prefix turtlebot3_gazebo)/share/turtlebot3_gazebo/models
|
||||
echo "Sourced Bot Mini base workspace"
|
||||
fi
|
||||
|
||||
# Source the overlay workspace, if built
|
||||
if [ -f /overlay_ws/install/setup.bash ]
|
||||
then
|
||||
source /overlay_ws/install/setup.bash
|
||||
#export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$(ros2 pkg prefix tb3_worlds)/share/tb3_worlds/models
|
||||
echo "Sourced Bot Mini overlay workspace"
|
||||
fi
|
||||
|
||||
# Start Robot ROS2 Nodes
|
||||
ros2 launch bot_mini_bringup robot_lidar.launch.py &
|
||||
ros2 launch bot_mini_bringup robot_localization.launch.py
|
||||
|
||||
wait
|
Loading…
Reference in New Issue
Block a user