-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
60 lines (42 loc) · 2.56 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM ros:humble
SHELL ["/bin/bash", "-c"]
# FROM dustynv/ros:humble-pytorch-l4t-r35.3.1 # when using pytorch (image is larger though)
# Add system packages to be installed here
RUN apt-get update && apt-get install -y git vim
#RUN mkdir -p /opt/robomaster/src
#COPY src /opt/root_ws/src
#WORKDIR /opt/root_ws
#RUN source /opt/ros/humble/install/setup.sh && colcon build --symlink-install --packages-select robomaster_msgs freyja_msgs state_manager lqg_control robomaster_handler sensing_msgs control waypoint_manager
#COPY cyclone_dds_profile.xml /opt/robomaster
WORKDIR /opt/root_ws
# Install Pangolin
RUN mkdir thirdparty && cd thirdparty
RUN git clone --recursive https://github.com/stevenlovegrove/Pangolin.git --depth 1 \
&& cd Pangolin \
&& yes | ./scripts/install_prerequisites.sh required \
&& cmake -B build \
&& cmake --build build -j 4 \
&& cmake --install build
# Install cv_bridge
RUN sudo apt install -y ros-humble-cv-bridge
# install interactive_markers
RUN sudo apt install -y ros-humble-interactive-markers
# install image_transport
RUN sudo apt install -y ros-humble-image-transport
# Build part II project
RUN apt-get update && yes | apt-get install libboost-all-dev
RUN cd /opt/root_ws \
&& source /opt/ros/humble/setup.bash \
&& git clone https://github.com/jyjblrd/part_II_project \
&& cd part_II_project \
&& git config --global --add safe.directory /opt/root_ws/part_II_project \
&& MAKEFLAGS="-j 4" colcon build
RUN tar -xvzf /opt/root_ws/part_II_project/src/slam_system/orb_slam3/Vocabulary/ORBvoc.txt.tar.gz -C /opt/root_ws/part_II_project/src/slam_system/orb_slam3/Vocabulary/
# ros2 run slam_system ros_mono --ros-args -p agentId:=1 -p config:=/opt/root_ws/part_II_project/src/slam_system/configs/robomaster.yaml -p imageTopic:=/robomaster_0/camera_0/image_raw -p vocFile:=/opt/root_ws/part_II_project/src/slam_system/orb_slam3/Vocabulary/ORBvoc.txt -p useViewer:=false
# ros2 run motion_controller follow_the_leader --ros-args -p agentId:=2 -p positionOffsetX:=0.0 -p positionOffsetY:=0.0 -p rotationOffset:=0.0 -p linearGain:=1.0 -p angularGain:=1.0 -p cmdVelTopic:=/robomaster_1/cmd_vel
# ros2 run motion_controller collision_avoidance --ros-args -p agentId:=2 -p linearGain:=.5 -p angularGain:=0.1 -p agentRadius:=0.05 -p cmdVelTopic:=/robomaster_1/cmd_vel -p Qc:=4.0 -p kappa:=15.0 -p staticKappa:=60.0
#ENV CYCLONEDDS_URI=/opt/robomaster/cyclone_dds_profile.xml
#COPY ros_entrypoint.sh /opt/robomaster/ros_entrypoint.sh
#COPY launch /opt/robomaster/launch
#ENTRYPOINT ["/opt/robomaster/ros_entrypoint.sh"]
#CMD ["/bin/bash"]