Increasing Mavlink Message Stream Rate from PX4 to VOXL2
-
Background: Sentinel running SDK 1.1.2. I'm developing an attitude controller that runs as a voxl-service, similar to how the existing offboard modes work inside of vvh, but I need to be able to stream attitude and/or attitude_quaternion topics at at least 100 Hz from PX4. I found the section of what I'm assuming is the px4 start script that sets these values here starting at line 225:
I've figured out that I can change the stream rate when the vehicle is running from the shell via px4-mavlink commands, but this resets every time I boot obviously. I have a couple of related questions:
-
Is the script I found indeed the only place where this value is set and is the only way to permanently change the stream rate by editing this start script and rebuilding voxl-px4? Would it be reasonable to build a service that sleeps on start until px4 has time to boot then runs the same mavlink commands to reconfigure the stream rates?
-
Is there any reason why I should avoid streaming at a higher rates for a handful of topics?
-
Is the existing process of the mavlink-server parsing messages from px4 and writing them to pipes to be read elsewhere sufficient to support real time data monitoring at 100 HZ without adjusting thread priorities?
-
-
Background: Sentinel running SDK 1.1.2. I'm developing an attitude controller that runs as a voxl-service, similar to how the existing offboard modes work inside of vvh, but I need to be able to stream attitude and/or attitude_quaternion topics at at least 100 Hz from PX4. I found the section of what I'm assuming is the px4 start script that sets these values here starting at line 225:
I've figured out that I can change the stream rate when the vehicle is running from the shell via px4-mavlink commands, but this resets every time I boot obviously. I have a couple of related questions:
-
Is the script I found indeed the only place where this value is set and is the only way to permanently change the stream rate by editing this start script and rebuilding voxl-px4? Would it be reasonable to build a service that sleeps on start until px4 has time to boot then runs the same mavlink commands to reconfigure the stream rates?
-
Is there any reason why I should avoid streaming at a higher rates for a handful of topics?
-
Is the existing process of the mavlink-server parsing messages from px4 and writing them to pipes to be read elsewhere sufficient to support real time data monitoring at 100 HZ without adjusting thread priorities?
@jmltt That start script is just a bash script. There is no need to rebuild anything. That is a reference script that we use for the drones we support but you may need to change it if you are working on a custom setup. The streaming rates are setup for two different mavlink endpoints. One is intended for onboard use only and the other is for streaming over the network to a connected ground control station. The endpoint for onboard use can support very high streaming rates since it is only being used locally and not being sent over the air. You can very easily try monitoring at 100 Hz and see if it causes any issues.
-
-
@jmltt That start script is just a bash script. There is no need to rebuild anything. That is a reference script that we use for the drones we support but you may need to change it if you are working on a custom setup. The streaming rates are setup for two different mavlink endpoints. One is intended for onboard use only and the other is for streaming over the network to a connected ground control station. The endpoint for onboard use can support very high streaming rates since it is only being used locally and not being sent over the air. You can very easily try monitoring at 100 Hz and see if it causes any issues.
Reading along? Create a free ModalAI Forum account to join in.
With an account you can reply, ask your own question, get an email when a ModalAI engineer answers, and mark the reply that solved it. Your place in each thread is saved between visits.
Questions about VOXL, Flight Core, ESCs and ModalAI drones are answered here by the engineers who build them.
Register Login