2023-11-13 15:48:59 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Basic entrypoint for ROS / Colcon Docker containers
|
|
|
|
|
|
|
|
UNDERLAY_WS=/rmp_ws
|
|
|
|
|
|
|
|
# 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
|
2024-03-28 08:58:05 +00:00
|
|
|
# vcs pull ${UNDERLAY_WS}/src
|
2023-11-13 15:48:59 +00:00
|
|
|
echo "Sourced CPS RMP 220 base workspace"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Source the overlay workspace, if built
|
|
|
|
if [ -f /overlay_ws/install/setup.bash ]
|
|
|
|
then
|
|
|
|
source /overlay_ws/install/setup.bash
|
2024-03-28 08:58:05 +00:00
|
|
|
# vcs pull /overlay_ws/src
|
2023-11-13 15:48:59 +00:00
|
|
|
echo "Sourced CPS RMP 220 Overlay workspace"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Source the bridge workspace, if built
|
|
|
|
if [ -f ~/ros2_humble/install/setup.bash ]
|
|
|
|
then
|
|
|
|
source ~/ros2_humbleinstall/setup.bash
|
|
|
|
#export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$(ros2 pkg prefix turtlebot3_gazebo)/share/turtlebot3_gazebo/models
|
|
|
|
echo "Sourced CPS RMP 220 base workspace"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Implement updating all repositories at launch
|
2024-03-28 08:58:05 +00:00
|
|
|
# if [ -f ${UNDERLAY_WS}/]
|
2023-11-13 15:48:59 +00:00
|
|
|
# then
|
2024-03-28 08:58:05 +00:00
|
|
|
# cd ${UNDERLAY_WS}
|
|
|
|
# vcs pull src
|
|
|
|
# echo "Updated base workspace"
|
2023-11-14 13:55:16 +00:00
|
|
|
# fi
|
|
|
|
|
2024-03-28 08:58:05 +00:00
|
|
|
# if [ -f /overlay_ws/]
|
|
|
|
# then
|
|
|
|
# cd /overlay_ws
|
|
|
|
# vcs pull src
|
|
|
|
# echo "Updated overlay workspace"
|
2023-11-14 14:29:24 +00:00
|
|
|
# fi
|
2023-11-14 13:55:16 +00:00
|
|
|
|
2023-11-13 15:48:59 +00:00
|
|
|
# Execute the command passed into this entrypoint
|
|
|
|
exec "$@"
|