I’m confused about the best way to enable message streams while using mavros + QGC.
In my typical autonomous use case, ROS nodes act as the backseat (offboard) pilot connected through mavros. Upon launch a ROS node calls
/mavros/set_stream_rate to set several stream rates to 20Hz to get the appropriate telemetry. This works fine.
Often I also launch QGC for manual control before and/or after ROS-driven missions. QGC is talking to mavros via UDP. As soon as QGC starts up it also sends stream rate requests. With the default settings it reduces my telemetry to 1Hz. In the UI I can choose 10Hz or 50Hz for the streams I need – so I settled on 50Hz. This works when I set it in the UI, but when I quit and re-launched QGC I found that it is somehow still requesting the older stream rates. The workaround seems to be to change the stream rates in the UI from 50Hz to something else, then change them back to 50Hz. Is this is a known bug in QGC, or some misunderstanding on my part?
I see that I can use SRx_ parameters to control the ArduPilot stream rates, but the comment in Requesting Data From The Autopilot — Dev documentation seems to suggest that this is a bad idea: “This is not the recommended method because the ground station has no way to determine what “x” should be.” I suppose I can set SRx_ parameters for all values of x to cover my bases. What is the recommended method?