-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathautonav.Dockerfile
92 lines (65 loc) · 2.1 KB
/
autonav.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
FROM ros:humble
SHELL ["/bin/bash", "-c"]
RUN apt-get update && apt-get install -y \
ros-humble-nav2-bringup \
ros-humble-ros2-control* \
ros-humble-slam-toolbox* \
ros-humble-example-interfaces* \
ros-humble-robot-localization* \
ros-humble-xacro \
ros-humble-rmw-cyclonedds-cpp \
ros-humble-cartographer* \
ros-humble-rviz2* \
ros-humble-cv-bridge
RUN apt-get update && apt-get install -y \
python3-pip \
&& python3 -m pip install -U \
smbus \
pyserial==3.4 \
pynput
RUN git clone https://github.com/YDLIDAR/YDLidar-SDK.git \
&& cd YDLidar-SDK \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& make install
RUN apt-get update && apt-get install -y \
ros-humble-tf-transformations \
uvicorn
RUN python3 -m pip install -U \
fastapi \
pymongo
COPY /serial /serial
RUN source /opt/ros/humble/setup.sh \
&& cd /serial \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& make install
COPY /autonav_controller /colcon_ws/src/autonav_controller
COPY /autonav_description /colcon_ws/src/autonav_description
COPY /autonav_firmware /colcon_ws/src/autonav_firmware
COPY /autonav_bringup /colcon_ws/src/autonav_bringup
COPY /autonav_localization /colcon_ws/src/autonav_localization
COPY /autonav_navigation /colcon_ws/src/autonav_navigation
COPY /autonav_perception /colcon_ws/src/autonav_perception
COPY /bno055 /colcon_ws/src/bno055
COPY /ydlidar_ros2_driver /colcon_ws/src/ydlidar_ros2_driver
COPY /WebServer /WebServer
COPY autonav_entrypoint.bash /autonav_entrypoint.bash
RUN chmod +x /autonav_entrypoint.bash
WORKDIR /colcon_ws
RUN /bin/bash -c 'source /opt/ros/humble/setup.bash \
&& colcon build --symlink-install'
# RUN source /opt/ros/humble/setup.sh \
# && colcon build --executor sequential \
# && rm -rf log/ build/ src/ \
# && apt-get autoremove -y \
# && apt-get autoclean -y \
# && rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/autonav_entrypoint.bash"]
WORKDIR /WebServer
EXPOSE 8000
CMD ["uvicorn", "index:app", "--host", "0.0.0.0", "--port", "8000"]