From b984ebf9dc414d397fd2f7370984144f45b116a7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 19 Jan 2022 16:40:44 +0000 Subject: [PATCH] Added usb cam and volume for docker container ws_linux --- .gitmodules | 3 +++ Legacy/Dockerfile | 3 +-- Legacy/entrypoint.sh | 1 + Legacy/ws_linux/src/usb_cam | 1 + install.sh | 3 +++ run.sh | 5 +++-- 6 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 .gitmodules create mode 160000 Legacy/ws_linux/src/usb_cam diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2723ee4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Legacy/ws_linux/src/usb_cam"] + path = Legacy/ws_linux/src/usb_cam + url = https://github.com/ros-drivers/usb_cam diff --git a/Legacy/Dockerfile b/Legacy/Dockerfile index 82c92a3..3e5d53d 100644 --- a/Legacy/Dockerfile +++ b/Legacy/Dockerfile @@ -1,8 +1,7 @@ FROM irth7/ros:hydro as build RUN sed -i 's/archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list && cat /etc/apt/sources.list -RUN apt-get update && apt-get install -y ros-hydro-tf ros-hydro-dynamic-reconfigure ros-hydro-nav-msgs ros-hydro-hokuyo-node -COPY ws_linux /home/lab1_5/ws/ws_linux +RUN apt-get update && apt-get install -y ros-hydro-tf ros-hydro-dynamic-reconfigure ros-hydro-nav-msgs ros-hydro-hokuyo-node v4l-utils python-catkin-tools ffmpeg ADD Aria /usr/local/Aria COPY entrypoint.sh /entrypoint.sh diff --git a/Legacy/entrypoint.sh b/Legacy/entrypoint.sh index 8bd2904..ed8dcc1 100755 --- a/Legacy/entrypoint.sh +++ b/Legacy/entrypoint.sh @@ -24,3 +24,4 @@ set -x rosrun rosaria RosAria _port:=$ARIA_PORT _tf_prefix:=PIONIER${PIONIER_ID} & rosrun hokuyo_node hokuyo_node _frame_id:="${ROS_NAMESPACE}/laser" +rosrun usb_cam usb_cam_node diff --git a/Legacy/ws_linux/src/usb_cam b/Legacy/ws_linux/src/usb_cam new file mode 160000 index 0000000..3ce8ee1 --- /dev/null +++ b/Legacy/ws_linux/src/usb_cam @@ -0,0 +1 @@ +Subproject commit 3ce8ee1c47c03be37229bf5857ae9a309d8eb1e8 diff --git a/install.sh b/install.sh index 599dfbb..6cbd1b6 100755 --- a/install.sh +++ b/install.sh @@ -7,6 +7,9 @@ fi cp rosaria-docker.service /etc/systemd/system/ chmod g+w /etc/systemd/system/rosaria-docker.service + +git submodule init +git submodule update systemctl daemon-reload systemctl enable rosaria-docker.service systemctl start rosaria-docker.service diff --git a/run.sh b/run.sh index 0d02c4b..898d02f 100755 --- a/run.sh +++ b/run.sh @@ -2,5 +2,6 @@ # Script running rosaria inside docker container echo "ID: $PIONIER_ID" -docker run --privileged --network=host --device=/dev/ttyS0 -i -e ROS_IP=$(hostname -I | awk '{print $1}') -e PIONIER_ID=$(hostname | sed 's/[^0-9]//g' -) irth7/rosaria-legacy +docker run --privileged --network=host --device=/dev/ttyS0 -i -e ROS_IP=$(hostname -I | awk '{print $1}') -e PIONIER_ID=$(hostname | sed 's/[^0-9]//g')\ + --mount type=bind,source=/home/lab1_5/rosaria/Legacy/ws_linux,target=/home/lab1_5/ws/ws_linux irth7/rosaria-legacy +