Skip to content

Commit 9ff9565

Browse files
muhtasim001kenoi1
authored andcommitted
fixed the image issue, added the following packages : nav2, joy, slam_toolbox, added : jstest-gtk, added : display passthrough for (workso on linux), input passthough for devies into the container (gamepads can be used in the container now)
1 parent b9f45fe commit 9ff9565

File tree

10 files changed

+63
-1
lines changed

10 files changed

+63
-1
lines changed

docker/robot/robot.Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ FROM ${BASE_IMAGE} AS source
55

66
WORKDIR ${AMENT_WS}/src
77

8+
RUN apt-get update && apt-get install -y curl \
9+
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
10+
811
# Clean up and update apt-get, then update rosdep
912
RUN sudo apt-get clean && \
1013
sudo apt-get update && \
@@ -16,6 +19,10 @@ RUN sudo apt-get clean && \
1619
COPY src/robot .
1720

1821
# Scan for rosdeps
22+
23+
RUN apt-get update && apt-get install -y curl \
24+
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
25+
1926
RUN apt-get -qq update && rosdep update && \
2027
rosdep install --from-paths . --ignore-src -r -s \
2128
| grep 'apt-get install' \
@@ -26,6 +33,10 @@ RUN apt-get -qq update && rosdep update && \
2633
FROM ${BASE_IMAGE} AS dependencies
2734

2835
# Clean up and update apt-get, then update rosdep
36+
37+
RUN apt-get update && apt-get install -y curl \
38+
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
39+
2940
RUN sudo apt-get clean && \
3041
sudo apt-get update && \
3142
sudo rosdep update
@@ -50,6 +61,10 @@ RUN apt-get -qq autoremove -y && apt-get -qq autoclean && apt-get -qq clean && \
5061
FROM dependencies AS build
5162

5263
# Clean up and update apt-get, then update rosdep
64+
65+
RUN apt-get update && apt-get install -y curl \
66+
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
67+
5368
RUN sudo apt-get clean && \
5469
sudo apt-get update && \
5570
sudo rosdep update
@@ -63,6 +78,18 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \
6378
# Source and Build Artifact Cleanup
6479
# RUN rm -rf src/* build/* devel/* install/* log/*
6580

81+
#add the slam toolbox, localizaiton and rviz2
82+
RUN sudo apt-get update
83+
RUN sudo apt-get install -y ros-humble-rviz2
84+
RUN sudo apt-get install -y ros-humble-navigation2
85+
RUN sudo apt-get install -y ros-humble-slam-toolbox
86+
87+
#add controler support to the container
88+
RUN sudo apt-get install -y ros-humble-joy
89+
RUN sudo apt-get install -y jstest-gtk
90+
RUN mkdir -p /root/.config/jstest-gtk
91+
92+
6693
# Entrypoint will run before any CMD on launch. Sources ~/opt/<ROS_DISTRO>/setup.bash and ~/ament_ws/install/setup.bash
6794
COPY docker/wato_ros_entrypoint.sh ${AMENT_WS}/wato_ros_entrypoint.sh
6895
ENTRYPOINT ["./wato_ros_entrypoint.sh"]

docker/samples/cpp_aggregator.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ WORKDIR ${AMENT_WS}/src
99
COPY src/samples/cpp/aggregator aggregator
1010
COPY src/wato_msgs/sample_msgs sample_msgs
1111

12+
RUN apt-get update && apt-get install -y curl \
13+
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
14+
1215
# Scan for rosdeps
1316
RUN apt-get -qq update && rosdep update && \
1417
rosdep install --from-paths . --ignore-src -r -s \

docker/samples/cpp_producer.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ WORKDIR ${AMENT_WS}/src
99
COPY src/samples/cpp/producer producer
1010
COPY src/wato_msgs/sample_msgs sample_msgs
1111

12+
RUN apt-get update && apt-get install -y curl \
13+
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
14+
1215
# Scan for rosdeps
1316
RUN apt-get -qq update && rosdep update && \
1417
rosdep install --from-paths . --ignore-src -r -s \

docker/samples/cpp_transformer.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ WORKDIR ${AMENT_WS}/src
99
COPY src/samples/cpp/transformer transformer
1010
COPY src/wato_msgs/sample_msgs sample_msgs
1111

12+
RUN apt-get update && apt-get install -y curl \
13+
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
14+
1215
# Scan for rosdeps
1316
RUN apt-get -qq update && rosdep update && \
1417
rosdep install --from-paths . --ignore-src -r -s \

docker/samples/py_aggregator.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ WORKDIR ${AMENT_WS}/src
99
COPY src/samples/python/aggregator aggregator
1010
COPY src/wato_msgs/sample_msgs sample_msgs
1111

12+
RUN apt-get update && apt-get install -y curl \
13+
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
14+
1215
# Scan for rosdeps
1316
RUN apt-get -qq update && rosdep update && \
1417
rosdep install --from-paths . --ignore-src -r -s \

docker/samples/py_producer.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ WORKDIR ${AMENT_WS}/src
99
COPY src/samples/python/producer producer
1010
COPY src/wato_msgs/sample_msgs sample_msgs
1111

12+
RUN apt-get update && apt-get install -y curl \
13+
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
14+
1215
# Scan for rosdeps
1316
RUN apt-get -qq update && rosdep update && \
1417
rosdep install --from-paths . --ignore-src -r -s \

docker/samples/py_transformer.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ WORKDIR ${AMENT_WS}/src
99
COPY src/samples/python/transformer transformer
1010
COPY src/wato_msgs/sample_msgs sample_msgs
1111

12+
RUN apt-get update && apt-get install -y curl \
13+
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
14+
1215
# Scan for rosdeps
1316
RUN apt-get -qq update && rosdep update && \
1417
rosdep install --from-paths . --ignore-src -r -s \

docker/sim/sim.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ FROM ros:foxy
2424

2525
SHELL ["/bin/bash", "-c"]
2626

27+
RUN apt-get update && apt-get install -y curl \
28+
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
29+
2730
# dependencies
2831
RUN apt-get update --fix-missing && \
2932
apt-get install -y git \

docker/vis_tools/foxglove.Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
ARG BASE_IMAGE=ghcr.io/watonomous/robot_base/base:humble-ubuntu22.04
22

3+
#ARG BASE_IMAGE=osrf/ros:humble-desktop-ful
4+
35
################################ Source ################################
46
FROM ${BASE_IMAGE} AS source
57

@@ -8,6 +10,9 @@ WORKDIR ${AMENT_WS}/src
810
# Copy in source code
911
COPY src/wato_msgs wato_msgs
1012

13+
RUN apt-get update && apt-get install -y curl \
14+
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
15+
1116
# Scan for rosdeps
1217
RUN apt-get -qq update && rosdep update && \
1318
rosdep install --from-paths . --ignore-src -r -s \
@@ -18,6 +23,9 @@ RUN apt-get -qq update && rosdep update && \
1823
################################# Dependencies ################################
1924
FROM ${BASE_IMAGE} AS dependencies
2025

26+
RUN apt-get update && apt-get install -y curl \
27+
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
28+
2129
# Install Foxglove Deps
2230
RUN apt-get update && apt-get install -y curl ros-humble-ros2bag ros-humble-rosbag2* ros-humble-foxglove-msgs&& \
2331
rm -rf /var/lib/apt/lists/*
@@ -61,4 +69,4 @@ RUN rm -rf src/* build/* devel/* install/* log/*
6169

6270
# Entrypoint will run before any CMD on launch. Sources ~/opt/<ROS_DISTRO>/setup.bash and ~/ament_ws/install/setup.bash
6371
COPY docker/wato_ros_entrypoint.sh ${AMENT_WS}/wato_ros_entrypoint.sh
64-
ENTRYPOINT ["./wato_ros_entrypoint.sh"]
72+
ENTRYPOINT ["./wato_ros_entrypoint.sh"]

modules/docker-compose.robot.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ services:
2121
- develop
2222
volumes:
2323
- ${MONO_DIR}/src:/home/bolty/ament_ws/src
24+
- /tmp/.X11-unix:/tmp/.X11-unix
25+
- /dev/input:/dev/input
26+
environment:
27+
- DISPLAY=${DISPLAY}
28+
device_cgroup_rules:
29+
- 'c 13:* rmw'

0 commit comments

Comments
 (0)