-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (32 loc) · 986 Bytes
/
Dockerfile
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
FROM ros:humble-ros-base
# environment variables
ENV DEBIAN_FRONTEND=noninteractive
# install dependencies
RUN apt update
RUN apt install -y \
build-essential \
python3 \
git \
xauth \
wget \
python3-rosdep
# init rosdep
RUN rm /etc/ros/rosdep/sources.list.d/20-default.list
RUN rosdep init
RUN rosdep update
# copy the ros package and build it
RUN mkdir -p /ws/src/spac2
RUN git clone https://github.com/FSLART/lart_msgs.git -b dev /ws/src/lart_msgs
COPY . /ws/src/spac2
RUN git clone https://github.com/FSLART/lart_common.git /ws/src/spac2/spac2_0/include/lart_common
WORKDIR /ws
# install dependencies
RUN rosdep install --from-paths /ws --ignore-src -r -y
# build
RUN /bin/bash -c "source /opt/ros/humble/setup.bash && \
cd /ws && \
colcon build --parallel-workers 6 --symlink-install"
# launch the package
CMD /bin/bash -c "source /opt/ros/humble/setup.bash && \
source install/setup.bash && \
ros2 launch spac2_0 drivemodel.launch.xml"