Repository Summary
Description | |
Checkout URI | https://github.com/ark-electronics/tracktor-beam.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-04-01 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
Name | Version |
---|---|
aruco_tracker | 0.0.1 |
precision_land | 0.0.1 |
README
ROS2 & PX4 Precision Landing with ArUco Markers
Master the integration of ROS2, PX4, and OpenCV to achieve precision landing using ArUco marker detection. This tutorial delves into how to leverage ROS2’s robust communication framework and PX4’s flight control system to implement highly accurate landings for autonomous drones. You’ll learn how to configure your environment, process camera feeds, and detect ArUco markers in real-time, enabling your drone to land precisely at designated targets. Whether you’re new to drone development or an experienced engineer, this guide provides a step-by-step approach to achieving reliable precision landing with seamless integration into your ROS2 and PX4 projects.
ArUco Markers
Aruco markers are square fiducial markers used in computer vision for tasks like pose estimation, camera calibration, and augmented reality (AR). Each marker has a unique binary pattern inside a black border, allowing it to be easily detected and identified. They help in determining the position and orientation of cameras or objects in a scene, making them valuable in robotics, navigation, and AR applications. https://docs.opencv.org/4.x/d5/dae/tutorial_aruco_detection.html
Video Walkthrough
Prerequisites
- Ubuntu 22.04
- ROS2 Humble
- PX4 Autopilot with an ArUco Marker and downward facing camera
- Micro XRCE-DDS Agent
- QGroundControl Daily Build
- OpenCV 4.10.0
- ROS_GZ bridge
You can find the required instructions collected below
https://docs.px4.io/main/en/ros2/user_guide.html https://docs.qgroundcontrol.com/master/en/qgc-user-guide/releases/daily_builds.html
You need the lates PX4-Autopilot, that will contain the required drone with the downward facing camera and the world that has the aruco marker in it To get ros_gz bridge
sudo apt install ros-humble-ros-gzgarden
https://github.com/gazebosim/ros_gz
For the OpenCV part follow the instructions below
Usage
Setup the Workspace
Make sure you source ROS2 Humble in the terminal you are using.
source /opt/ros/humble/setup.bash
OR Just add the line above to your bashrc, in that case it is going to be sourced every time you open a terminal.
nano ~/.bashrc
Navigate to the directory you would like to place the worskpace and then run the following
git clone https://github.com/ARK-Electronics/tracktor-beam.git
Then navigate into the workspace:
cd tracktor-beam
Install OpenCV from source
./install_opencv.sh
Install the submoduls
git submodule update --init --recursive
Build the workspace
colcon build
After this runs, we do not need to build the whole workspace again, you can just build the individual packages you have modified
colcon build --packages-select precision_land
Source the workspace
source install/setup.bash
Run the example
Run the simulation environment
Launch PX4 sim
make px4_sitl gz_x500_mono_cam_down_aruco
Launch micro dds
MicroXRCEAgent udp4 -p 8888
Launch the ros_gz_bridge for getting the camera topic
ros2 run ros_gz_bridge parameter_bridge /camera@sensor_msgs/msg/Image@gz.msgs.Image
Launch the ros_gz_bridge for getting the camera info topic (this is how we get camera intrinsics)
```
File truncated at 100 lines see the full file