I am new to using px4 and QGroundControl and would appreciate suggestions on how to structure my autonomous drone mission project. The mission involves:
- Taking off the drone
- Flying to a user-specified waypoint using the QGC interface
- Activating a special mode (mode A) for the drone to search for an object using a camera, handled by a companion computer
- Moving into mode B to pick up the object, also handled by the companion computer with computer vision
- Flying to a second user-specified waypoint using QGC
- Activating mode C to release the object, again with the help of the companion computer and computer vision
- Returning the drone to its starting position and landing
Given the use of computer vision and following suggestions from the px4 page, I plan to use ROS2 to facilitate communication between the companion computer and the Pixhawk.
However, I’m unsure how to structure the code to synchronize the different modes of the mission and switch between QGC waypoints and companion computer instructions. I would appreciate any tips, suggestions, and relevant links on tackling this kind of project.
Thank you in advance for your help!