docs: clarify SET_MESSAGE_INTERVAL stream rate config per serial port - #694
docs: clarify SET_MESSAGE_INTERVAL stream rate config per serial port#694ARYA-mgc wants to merge 8 commits into
Conversation
08d8a3c to
f24a0b1
Compare
|
I've moved the content from the auto-generated common.md into a dedicated en/guide/stream_rates.md page. I also confirmed the -1 behavior applies to both PX4 and ArduPilot, replaced the ArduPilot-specific SR2_* terminology with stack-neutral language, and clarified the distinction for outbound streams like VISION_POSITION_ESTIMATE. |
f24a0b1 to
16d27ef
Compare
|
Hey @hamishwillee, I have addressed your feedback! Specific fixes included:
The PR in \mavlink/mavlink\ (#2463) has also been rebased and updated to cross-link to this new guide. Ready for another look! |
| | `SCALED_IMU2` (id: 116) | -1 | Disabled | | ||
| | `HIGHRES_IMU` (id: 105) | -1 | Disabled | | ||
|
|
||
| ## Outbound Streams (Sent by Companion Computer) |
There was a problem hiding this comment.
- Outbound stream is not the best terminology here -
VISION_POSITION_ESTIMATEis outbound from a computer but it is inbound to the FC. Similarly GPS_RAW is oubound from the FC but inbound to a GCS. Most of MAVLink is FC centric - so inbound would be more accurate - but it is still wrong. - The fact is that the rate of
VISION_POSITION_ESTIMATEshould theoretically be tunable via the rate setting message from a GCS or whatever manages the link. Generally we don't though because the links are tuned to have an acceptable rate.
The main differentiation here is Telemetry messages vs command like messages - so perhaps "Command-like Messages"
There was a problem hiding this comment.
Generally I am not comfortable with the examples and comments like "you should silence all other stream rates to keep the serial line clean." Because it depends so much on your setup. Happy with general comments at this level about "you can use this for QoS, reducing or increasing the rate of telemetry streams as needed"
hamishwillee
left a comment
There was a problem hiding this comment.
@ARYA-mgc Thanks for this. I've added some point suggestions.
I'm not entirely sure about this - on one hand QoS is a high level guide-like topic, on the other hande we have a bunch of approaches for setting streaming, so we might be better off having that stuff in a Message Streaming Protocol doc.
This would cover
- MAV_CMD_SET_MESSAGE_INTERVAL, but also MESSAGE_INTERVAL, MAV_CMD_REQUEST_MESSAGE (deprecated MAV_CMD_GET_MESSAGE_INTERVAL), DATA_STREAM.
- It would follow the same pattern as other protocol docs. It would have an implementation section covering similarities and differences in the implementations, which is where you could cover the parameters.
I think I prefer that approach.
PR Update - Cleaned UpHi @hamishwillee, I've made the following updates to this PR:
|
|
Hi @hamishwillee, I've addressed the earlier feedback. For the remaining suggestion — would you prefer I expand this into a full Message Streaming Protocol doc covering MAV_CMD_SET_MESSAGE_INTERVAL, MESSAGE_INTERVAL, MAV_CMD_REQUEST_MESSAGE, and DATA_STREAM? Or are the terminology fixes in the current stream_rates.md sufficient to merge? |
16d27ef to
3a286d1
Compare
|
@ARYA-mgc Sorry, I am going to delay this until I have bandwidth. |
|
No worries, take your time! I'll keep the branch rebased in the meantime. Let me know if there's anything I can improve before your review. |
peterbarker
left a comment
There was a problem hiding this comment.
"stream_rates.md" is a little misleading.
ArduPilot still supports the actual MAV_DATA_STREAM scheme. That's where a bunch of different messages are thrown into buckets which. It predates the SET_MESSAGE_INTERVAL stuff by a very long time.
Might I suggest "message_rates.md" instead?
|
|
||
| ## Configuring Stream Rates on a Specific Port | ||
|
|
||
| To avoid buffer overruns on high-baud serial links (e.g. 921600 baud TELEM2), you should explicitly configure only the streams required for your use case using `MAV_CMD_SET_MESSAGE_INTERVAL`. |
There was a problem hiding this comment.
This is a very strange way to put things.
Often people are reducing the rates rather than increasing them with the message.
And the buffer overruns are more likely to happen at low baudrates rather than high?!
Your statement is also ambiguous - in a few ways! It could mean "don't turn on anything you don't need" or "you should only modify the things you care about".
|
|
||
| ## Command-like Messages | ||
|
|
||
| Messages that are injected into the flight controller from a companion computer (such as `VISION_POSITION_ESTIMATE`) are conceptually different from the vehicle telemetry streams configured via `MAV_CMD_SET_MESSAGE_INTERVAL`. |
There was a problem hiding this comment.
No, they're really not.
There's no reason a flight controller couldn't request whoever is sending VISION_POSITION_ESTIMATE to send at a particular rate. I've never seen it, but conceptually it's just the same as a GCS asking for RAW_IMU.
In fact, it would make a lot of sense for a mavlink-connected camera/gimbal combination to ask the autopilot to stream the vehicle's current location to it for metadata tagging. Several other gimbals already request this through their own protocols.
| | `SCALED_IMU2` (id: 116) | -1 | Disabled | | ||
| | `HIGHRES_IMU` (id: 105) | -1 | Disabled | | ||
|
|
||
| ## Command-like Messages |
There was a problem hiding this comment.
AutoPilot Input Messages if you want to keep this section?
534e7f0 to
6683bbd
Compare
- Adds dedicated guide: en/guide/message_rates.md - Adopts stack-neutral QoS language - Adds per-link scoping clarification - Renames section to AutoPilot Input Messages - Uses MAVn_* parameters instead of SR2_* - Adds HIGHRES and TELEM to cspell wordlist
6683bbd to
4a48bc5
Compare
|
Hi @peterbarker , @hamishwillee I've addressed all the feedback: Renamed stream_rates.md ->message_rates.md Ready for another look! |
Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>
Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>
Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>
| @@ -0,0 +1,31 @@ | |||
| # Message Rates | |||
|
|
|||
| This section provides guidance on configuring MAVLink message rates using the `MAV_CMD_SET_MESSAGE_INTERVAL` command. | |||
There was a problem hiding this comment.
In guide generally link first instance of a message to its definition (in the docs, not in the xml)
| Supported on PX4 v1.11+ and ArduPilot v4.0+. | ||
| Behavior on older versions of these two autopilots is undefined. |
There was a problem hiding this comment.
Did you check earlier versions, or is this just the version you checked?
What do you mean by undefined? Not supported?
hamishwillee
left a comment
There was a problem hiding this comment.
I've added a bunch of suggestions. If those are accepted I am coming around to this PR.
FYI However I still think it would be useful to have a separate "Stream Rate Protocol" microservice and cross link.
That would cover this command and all the others - such as requesting a message and getting he current interval.
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Summary
Moves the
MAV_CMD_SET_MESSAGE_INTERVALstream rate configuration detailsto a new dedicated guide (
en/guide/stream_rates.md) to keep the auto-generatedcommon.mdclean.The new guide covers:
interval=-1(and confirms this behavior across PX4 and ArduPilot)VISION_POSITION_ESTIMATE) are independent of stream rates.SR2_*) and replaces it with stack-neutral language.Motivation
Provide developers with actionable instructions on managing stream rates without cluttering
the auto-generated XML/Markdown messages definitions, per reviewer feedback.