-
Notifications
You must be signed in to change notification settings - Fork 0
Ubuntu ‐ Setup Drone Environment
Marshall Vielmetti edited this page Oct 17, 2024
·
11 revisions
mrover
cd ../
Running pwd
should tell you you're in the folder ros2_ws/src
After confirming this, clone the repository:
git clone [email protected]:umrover/mrover-drone.git --recurse-submodules mrover_drone && cd mrover_drone
If submodules / dependencies change:
git submodule update --recursive
ROSDEP Wiki Page Initialize ROSDEP:
sudo rosdep init
rosdep update
Install Dependencies:
cd ~/ros2_ws
rosdep install --from-paths src --ignore-src -r -y
Based on PX4 Build Guide
TODO
Manual build process copied from the above link
cd ~/ros2_ws/src/mrover_drone/deps/
bash ./PX4-Autopilot/Tools/setup/ubuntu.sh
cd PX4-Autopilot/
make px4_sitl
cd ~/ros2_ws/src/mrover_drone/deps/Micro-XRCE-DDS-Agent
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig /usr/local/lib
Start by running the DDS agent. In a new terminal, run:
MicroXRCEAgent udp4 -p 8888
This will start a MicroXRCE DDS agent on port 8888.
We can now start the PX4-sitl ("software in the loop") simulator.
This will start a uXRCe-DDS client automatically on localhost port 8888.
In a new terminal, run the following command:
cd ~/ros2_ws/src/mrover_drone/deps/PX4-Autopilot
make px4_sitl gz_x500
You should now see output in the DDS agent terminal, and Gazebo should launch.
MAVROS should be added by rosdep. However, you must run the following to download a required dataset:
cd ~/ros2_ws/src/mrover_drone
chmod +x ./scripts/install_geographiclib_datasets.sh
sudo ./scripts/install_geographiclib_datasets.sh