![]() |
ros2_offboard_drone_control repositorystate-machine motion-planning path-planning px4 ros2 autonomous-drone motion-platform offboard-control xrce-dds |
No version for distro humble. Known supported distros are highlighted in the buttons above.
![]() |
ros2_offboard_drone_control repositorystate-machine motion-planning path-planning px4 ros2 autonomous-drone motion-platform offboard-control xrce-dds |
No version for distro jazzy. Known supported distros are highlighted in the buttons above.
![]() |
ros2_offboard_drone_control repositorystate-machine motion-planning path-planning px4 ros2 autonomous-drone motion-platform offboard-control xrce-dds |
No version for distro kilted. Known supported distros are highlighted in the buttons above.
![]() |
ros2_offboard_drone_control repositorystate-machine motion-planning path-planning px4 ros2 autonomous-drone motion-platform offboard-control xrce-dds |
No version for distro rolling. Known supported distros are highlighted in the buttons above.
![]() |
ros2_offboard_drone_control repositorystate-machine motion-planning path-planning px4 ros2 autonomous-drone motion-platform offboard-control xrce-dds drone_control |
Repository Summary
Description | ROS2 Off-board drone control with a companion computer and PX4 over DDS (serial). Autonomous drone with path planning. |
Checkout URI | https://github.com/marnonel6/ros2_offboard_drone_control.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2023-12-08 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | state-machine motion-planning path-planning px4 ros2 autonomous-drone motion-platform offboard-control xrce-dds |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
Name | Version |
---|---|
drone_control | 0.0.1 |
README
ROS2 Off-board drone control with DDS and PX4
High-level path planning and off-board control of a Pixhawk flight computer running PX4 with a Raspberry Pi 4B. The code is written in C++ and Python in a ROS2 Humble interface.
Custom drone built from scratch
- T-Motor motors, ESCs and propellers
- Pixhawk 6X Flight computer (PX4 v1.14)
- Raspberry Pi 4B (Ubuntu 22.04, ROS2 HUMBLE)
- RTK + Base station
- Tarot 680 Pro Sport frame
Simple take-off -> hover -> land
https://github.com/Marnonel6/ROS2_offboard_drone_control/assets/60977336/db2df724-b563-46df-b42c-d3180baed4ce
Prerequisites:
- Ubuntu 22.04
- Python3
- C++
- ROS2 Humble
Installation & Setup guide
Ground control station
- Install Qgroundcontrol
Pixhawk 6X setup
- PX4 v1.14 for new Micro XRCE-DDS capabilities
-
NOTE
version 1.14 is now a stable version so do not have to build from source anymore you can use QGC to install it -
Build v1.14 instructions here
git clone https://github.com/PX4/PX4-Autopilot.git --recursive git checkout release/v1.14 make px4_fmu-v6x_default upload # Plug in Pixhawk before running this
-
If not using DDS, but serial and mavsdk then PX4 v1.13 -> This enables HITL <!– - TODO: Params to set in QGC
LIST PARAMS HER __________________________________________________________________________________________________________________________________ -->
Setup on drone control computer (Laptop for SITL or RPi 4 on drone)
- Install ROS2 Humble
-
git clone git@github.com:Marnonel6/ROS2_offboard_drone_control.git
-
To clone the ROS2 control package an alias with the deployment key also exists on the Pi. Use:
osprey_code_pull
-
-
git clone https://github.com/eProsima/Micro-XRCE-DDS-Agent.git cd Micro-XRCE-DDS-Agent mkdir build cd build cmake .. make sudo make install sudo ldconfig /usr/local/lib/
-
Fields2Cover Fork or Fields2Cover
sudo apt-get update sudo apt-get install --no-install-recommends software-properties-common sudo add-apt-repository ppa:ubuntugis/ppa sudo apt-get update sudo apt-get install --no-install-recommends build-essential ca-certificates cmake \ doxygen g++ git libeigen3-dev libgdal-dev libpython3-dev python3 python3-pip \ python3-matplotlib python3-tk lcov libgtest-dev libtbb-dev swig libgeos-dev python3 -m pip install gcovr git clone git@github.com:Marnonel6/Fields2Cover.git cd Fields2Cover mkdir -p build; cd build; cmake -DCMAKE_BUILD_TYPE=Release ..; make -j$(nproc); sudo make install;
- On RPi I have a deployment key with an alias in the
.bashrc
file to clone the repo. Use: fields2cover_code_pull
- On RPi I have a deployment key with an alias in the
PX4 SITL Simulation with (Ignition) Gazebo setup (On Ubuntu Laptop)
-
Install PX4 development environment
cd git clone https://github.com/PX4/PX4-Autopilot.git --recursive bash ./PX4-Autopilot/Tools/setup/ubuntu.sh !!! Relogin or reboot computer before proceeding !!! cd PX4-Autopilot/ make px4_sitl
SITL simulation:
-
Start the simulation (On Ubuntu Laptop):
make px4_sitl gz_x500
File truncated at 100 lines see the full file
CONTRIBUTING
![]() |
ros2_offboard_drone_control repositorystate-machine motion-planning path-planning px4 ros2 autonomous-drone motion-platform offboard-control xrce-dds |
No version for distro galactic. Known supported distros are highlighted in the buttons above.
![]() |
ros2_offboard_drone_control repositorystate-machine motion-planning path-planning px4 ros2 autonomous-drone motion-platform offboard-control xrce-dds |
No version for distro iron. Known supported distros are highlighted in the buttons above.
![]() |
ros2_offboard_drone_control repositorystate-machine motion-planning path-planning px4 ros2 autonomous-drone motion-platform offboard-control xrce-dds |
No version for distro melodic. Known supported distros are highlighted in the buttons above.
![]() |
ros2_offboard_drone_control repositorystate-machine motion-planning path-planning px4 ros2 autonomous-drone motion-platform offboard-control xrce-dds |
No version for distro noetic. Known supported distros are highlighted in the buttons above.