Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Providing some command options for building and runningthe application.
Browse files Browse the repository at this point in the history
  • Loading branch information
aentinger committed May 13, 2024
1 parent f01e80d commit 37c4650
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
1 change: 1 addition & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ RUN mkdir -p /tmp/colcon_ws/src
WORKDIR /tmp/colcon_ws/src
RUN git clone --recursive https://github.com/107-systems/t07_robot
RUN git clone --recursive https://github.com/pika-spark/pika-spark-bno085-driver
RUN git clone https://github.com/107-systems/robotem_rovne

WORKDIR /tmp/colcon_ws
RUN . /opt/ros/humble/setup.sh && \
Expand Down
25 changes: 18 additions & 7 deletions docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,22 @@
cd /tmp/colcon_ws
. /opt/ros/humble/setup.sh

cd src
git clone https://github.com/107-systems/robotem_rovne
colcon build --packages-select robotem_rovne
shopt -s nocasematch

cd /tmp/colcon_ws
. install/setup.sh robotem_rovne
ros2 launch robotem_rovne all.py
#ros2 launch pika_spark_bno085_driver imu.py &
if [[ "$1" = "build" ]]
then
echo "Rebuilding package robotem_rovne ..."
cd src/robotem_rovne
git pull origin main
cd /tmp/colcon_ws
colcon build --packages-select robotem_rovne
elif [[ "$1" = "run" ]]
then
echo "Starting application robotem_rovne"
. install/setup.sh robotem_rovne
ros2 launch robotem_rovne all.py
else
echo "Invalid command option"
fi

shopt -u nocasematch

0 comments on commit 37c4650

Please sign in to comment.