Hello!
I am trying to build a custom state machine around PX4 for my project. The goal is to remote control the drone using the offboard mode and to reliably control autopilot functions, detect errors and i.e. abort missions in case of errors.
The state machine is being built in ROS2 and utilizes Mavlink and Mavros for communication with the FC. It eventually is supposed to run on an onboard Raspberry Pi, for now I use a SITL setup.
To reliably mirror the state of my drone I have been using the state and mode-signals from the Mavlink Heartbeat message as Signals for my Statemachine.
The problem I am facing now is, that the low Frequency of the Heartbeat of 1Hz, is not sufficent to keep my statemachine updated in near Real-Time.
How can I adjust this rate ? Are there perhaps alternative Solutions ?
Thanks in advance!