-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathPX4-Dockerfile
More file actions
29 lines (24 loc) · 1.32 KB
/
PX4-Dockerfile
File metadata and controls
29 lines (24 loc) · 1.32 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
### base image containing ROS Melodic and PX4 development environment
FROM px4io/px4-dev-ros-melodic:2021-09-08
# Setting up PX4-Autopilot
RUN mkdir /src &&\
cd /src &&\
git clone --depth 1 --branch v1.12.3 https://github.com/PX4/PX4-Autopilot.git
RUN DONT_RUN=1 make -C /src/PX4-Autopilot/ px4_sitl_default gazebo
# Installing PX4-Avoidance and its dependencies
RUN sudo apt-get update -y &&\
sudo apt-get install python3.7 python3-setuptools python3.7-dev -y &&\
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 &&\
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2 &&\
sudo -H pip3 install --upgrade pip
RUN sudo apt-get update -y &&\
sudo apt-get install python-catkin-tools ros-melodic-mavros ros-melodic-mavros-extras libpcl1 ros-melodic-octomap-* -y
RUN mkdir -p /src/catkin_ws/src &&\
wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh &&\
chmod +x install_geographiclib_datasets.sh &&\
sudo ./install_geographiclib_datasets.sh &&\
cd /src/catkin_ws/src &&\
git clone --depth 1 https://github.com/PX4/avoidance.git
RUN . /opt/ros/melodic/setup.sh &&\
catkin build -w /src/catkin_ws &&\
echo "source /src/catkin_ws/devel/setup.bash" >> ~/.bashrc