-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔨 Ported latest modifications from humble_devel for better docker run…
…ning. Signed-off-by: Bey Hao Yun <[email protected]>
- Loading branch information
1 parent
bea206b
commit 47516ed
Showing
4 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
build/* | ||
install/* | ||
log/* | ||
.vscode/* | ||
lcov/* | ||
*.png | ||
*.jpeg | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
FROM ros:jazzy-perception-noble | ||
|
||
MAINTAINER Bey Hao Yun <[email protected]> | ||
# Add user | ||
RUN adduser --quiet --disabled-password user | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
# Install OpenCV | ||
RUN apt-get update && \ | ||
apt-get install -y xauth xxd x11-xserver-utils && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /home/user | ||
WORKDIR /home/user/virtual_camera_ws | ||
RUN mkdir src | ||
COPY . src/virtual_camera | ||
|
||
# colcon compilation | ||
RUN . /opt/ros/$ROS_DISTRO/setup.sh \ | ||
&& colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release | ||
|
||
RUN sed -i '$isource "/home/user/virtual_camera_ws/install/setup.bash"' /ros_entrypoint.sh | ||
|
||
RUN chown -R user:user /home/user/ | ||
USER user | ||
|
||
ENTRYPOINT ["/ros_entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
docker build --tag vcam_image:jazzy . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
xhost +local:docker | ||
|
||
docker run -it --rm \ | ||
--net host \ | ||
--name vcam_test_container \ | ||
-e DISPLAY=$DISPLAY \ | ||
-v /dev/shm:/dev/shm \ | ||
-v /tmp/.X11-unix:/tmp/.X11-unix \ | ||
-u user \ | ||
vcam_image:jazzy bash -c \ | ||
"ros2 launch virtual_camera showimageraw.launch.py \ | ||
use_image_viewer:=true" | ||
|
||
xhost -local:docker |