-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
83 lines (76 loc) · 2.27 KB
/
Copy pathDockerfile
File metadata and controls
83 lines (76 loc) · 2.27 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Base image
FROM osrf/ros:foxy-desktop
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8
SHELL ["/bin/bash", "-c"]
# ----------------------------
# 1. Install system and ROS dependencies
# ----------------------------
RUN apt update && apt install -y \
locales \
wget \
git \
python3-vcstool \
python3-colcon-common-extensions \
build-essential \
# ROS2 build tools
ros-foxy-ament-cmake \
ros-foxy-ament-cmake-python \
ros-foxy-ament-lint \
ros-foxy-ament-lint-auto \
ros-foxy-ament-lint-common \
ros-foxy-ament-flake8 \
ros-foxy-ament-cmake-pep257 \
# ROS2 core packages
ros-foxy-xacro \
ros-foxy-urdf \
ros-foxy-tf2 \
ros-foxy-tf2-ros \
ros-foxy-std-msgs \
ros-foxy-std-srvs \
ros-foxy-builtin-interfaces \
ros-foxy-rosidl-default-runtime \
ros-foxy-rosidl-default-generators \
ros-foxy-rclpy \
ros-foxy-twist-mux \
ros-foxy-velodyne-description \
ros-foxy-slam-toolbox \
ros-foxy-teleop-twist-joy \
ros-foxy-robot-state-publisher \
ros-foxy-nav2-bringup \
ros-foxy-joy \
ros-foxy-rclcpp \
ros-foxy-pluginlib \
ros-foxy-joint-trajectory-controller \
ros-foxy-joint-state-broadcaster \
ros-foxy-nav-msgs \
ros-foxy-robot-localization \
# ROS2 control
ros-foxy-ros2-control \
ros-foxy-ros2-controllers \
ros-foxy-controller-manager \
ros-foxy-gazebo-ros2-control \
&& locale-gen en_US.UTF-8 \
&& rm -rf /var/lib/apt/lists/*
# ----------------------------
# 2. Setup workspace
# ----------------------------
RUN mkdir -p /root/jackal_ws/src
WORKDIR /root/jackal_ws
# Import Jackal repositories
RUN wget https://raw.githubusercontent.com/jackal/jackal_robot/foxy-devel/dependencies.repos
RUN vcs import src < dependencies.repos
# ----------------------------
# 3. Build workspace
# ----------------------------
RUN /bin/bash -c "source /opt/ros/foxy/setup.bash && colcon build --symlink-install"
# ----------------------------
# 4. Auto-source ROS and workspace
# ----------------------------
RUN echo "source /opt/ros/foxy/setup.bash" >> ~/.bashrc
RUN echo "source /root/jackal_ws/install/setup.bash" >> ~/.bashrc
# ----------------------------
# 5. Entrypoint
# ----------------------------
ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["bash"]