Hello everyone, I hope you’re all doing well.
I am working on a custom project and have encountered some confusion regarding MavLink messages. To briefly explain the developments I have made so far:
Objective:
My goal is to integrate a Route Planner (e.g., Dubins Airplane Path, etc.) into ArduPlane and ensure the aircraft follows the generated path. To achieve this, my key objectives are:
- Adding a new Dubins path planning library to ArduPlane.
- Implementing a new flight mode (I preferred adding a new mode instead of modifying the existing ones).
- Creating a custom MavLink message to receive target position and heading angle in the global frame.
- Using the received target position to generate a path and select waypoints along this path to ensure the aircraft follows the planned trajectory.
Progress So Far:
- I started development on ArduPlane 4.3 and successfully integrated the Dubins path planning library.
- I implemented the new flight mode by leveraging Auto and Guided modes. Currently, it works similarly to Auto mode, but I haven’t made extensive modifications yet.
The Issue I Am Facing:
I am unsure about how to properly handle the target position coming from the Companion Computer. My envisioned data flow is as follows:
- The Companion Computer calculates the target position (including the heading angle) and sends it to the autopilot.
- The autopilot processes the incoming message and generates a trajectory based on the received target position. No new trajectory is created unless a new target position is received. (I am unsure whether this is the correct approach.)
- Let’s say the newly added mode is called IMAMIM. When the aircraft is in IMAMIM mode, it should continuously select new waypoints along the generated trajectory and assign them as the target waypoint for the L1 controller.
Main Challenge:
The core issue I am struggling with is how to properly handle the new MavLink message. Could you provide guidance on this?
I might not have explained the problem perfectly, so please feel free to ask if anything is unclear. Also, I am open to any suggestions regarding the overall project structure—feel free to share your thoughts!
Best regards,