-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstarbots-sim-gazebo
54 lines (46 loc) · 1.87 KB
/
starbots-sim-gazebo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# This Docker image will contain everything necessary
# for starting the Gazebo simulation in ROS2
# Start from ROS Humble desktop image
FROM osrf/ros:humble-desktop
# Use ARG to set DEBIAN_FRONTEND to noninteractive only during the build
ARG DEBIAN_FRONTEND=noninteractive
# Install necessary packages including apt-utils
RUN apt-get update && apt-get install -y \
apt-utils \
git \
build-essential \
python3-colcon-common-extensions \
python3-rosdep \
python3-rosinstall-generator \
python3-vcstool \
wget \
# Add other necessary packages here
ros-humble-gazebo-ros2-control \
&& rm -rf /var/lib/apt/lists/*
# It's generally a good idea to run rosdep update as a non-root user,
# but in Docker, we typically ignore this warning.
RUN rosdep update
# Create an overlay Colcon workspace
RUN /bin/bash -c "source /opt/ros/humble/setup.bash \
&& mkdir -p /ros2_ws/src \
&& cd /ros2_ws \
&& colcon build --symlink-install"
COPY /robot_ur3e_setup/ /ros2_ws/src/robot_ur3e_setup/
COPY /universal_robot_ros2/ /ros2_ws/src/universal_robot_ros2/
COPY /robot_ur3e_setup/ /ros2_ws/src/robot_ur3e_setup/
COPY /robot_ur3e_manipulation/ /ros2_ws/src/robot_ur3e_manipulation/
# Attempt to install dependencies, skipping the problematic package
RUN apt-get update && apt-get upgrade -y && \
cd /ros2_ws && \
rosdep install --from-paths src --ignore-src -r -y --skip-keys="ros-humble-warehouse-ros-mongo" || true
# Build the workspace
RUN /bin/bash -c "source /opt/ros/humble/setup.bash \
&& cd /ros2_ws \
&& colcon build --symlink-install \
&& source /ros2_ws/install/setup.bash \
&& echo 'source /ros2_ws/install/setup.bash' >> ~/.bashrc"
# Set up the work directory
WORKDIR /ros2_ws
# Set up the entrypoint
# CMD /bin/bash -c "source /ros2_ws/install/setup.bash \
# && ros2 launch the_construct_office_gazebo starbots_ur3e.launch.xml