-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (29 loc) · 1.33 KB
/
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
ARG VERSION=latest
ARG REGISTRY
FROM ${REGISTRY}uobflightlabstarling/starling-sim-iris:latest
# Copy in the xacro & bash file to setup the model
# Using ros.env.d automatic sourcing on entrypoint (see /simulator/base/core/Dockerfile)
COPY flightarena /ros.env.d/02_flightarena
COPY systems/models/gimbal_small_2d /ros.env.d/03_gimbal_small_2d
COPY systems/models/gimbal_tripod /ros.env.d/04_gimbal_tripod
# Build gimbal plugin with ROS2 on path and add plugin to path
COPY systems/gimbal_plugin /ros_ws/src/gimbal_plugin
RUN cd /ros_ws \
&& . /opt/ros/foxy/setup.sh \
&& export CMAKE_PREFIX_PATH=$AMENT_PREFIX_PATH:$CMAKE_PREFIX_PATH \
&& colcon build --cmake-force-configure \
&& rm -r build \
&& echo 'export GAZEBO_PLUGIN_PATH=/ros_ws/install/gimbal_plugin/lib:${GAZEBO_PLUGIN_PATH}' >> /ros.env.d/03_gimbal_small_2d/setup.bash
# Build motion tracker simulation rosnode
COPY systems/motion_tracker_sim /ros_ws/src/motion_tracker_sim
RUN cd /ros_ws \
&& . /opt/ros/foxy/setup.sh \
&& export CMAKE_PREFIX_PATH=$AMENT_PREFIX_PATH:$CMAKE_PREFIX_PATH \
&& colcon build --packages-select motion_tracker_sim\
&& rm -r build
# Copy in the vehicle launch file
COPY system.launch.xml /ros_ws/launch/
WORKDIR /ros_ws
ENV GIMBAL_NAMESPACE gimbal_1
# Launch gazebo and spawn model
CMD [ "ros2", "launch", "launch/system.launch.xml" ]