Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using message_interval on any message stops sys_status from being transmitted #13055

Closed
Crowdedlight opened this issue Sep 30, 2019 · 7 comments

Comments

@Crowdedlight
Copy link

Describe the bug
sys_status do not get transmitted after using a message_interval to limit any message. I have tried limiting different messages, but no change, and sys_status is still not being transmitted. I have also tried to send message_interval for sys_status to try and force it to 1 or 5hz. But didn't have any impact.

I checked with QGC and mavlink_inspector to verify if the message gets output.

To Reproduce
Steps to reproduce the behavior:

  1. Drone switched on
  2. Send a message_interval to limit some message
  3. Open QGC and mavlink_inspector and sys_status isn't being transmitted, or with very low rate. (I sometimes got 1 maybe 2 messages over 30-40sec, but often didn't get any at all)

Rebooting the PX4 to output default messages makes the sys_status show up again, right until the next time you send message_interval.

Expected behavior
sys_status should not be "removed" when limiting some other message with message_interval.
Using message_interval for the sys_status message should correctly set the rate of the sys_status message.

Drone (please complete the following information):

  • Hexacopter platform, PX4 1.9.2.
@dagar
Copy link
Member

dagar commented Sep 30, 2019

Could you try this in current master (or v1.10 beta)?

@Crowdedlight
Copy link
Author

Tested on current master and tag: v1.10.0-beta1.
Same experience. After limiting any message I do not get sys_status. I sometimes get a single sys_status 15s after the limit, but nothing more than that.

We have also experienced that certain messages output by default can not be throttled by the message_interval command. Just gives MAV_RESULT_FAILED. Seems like it is because they are not defined as a streamlist_item if I read the source code correct.

We experienced it with the following msg ids:
MAVLINK_MSG_ID_RC_CHANNELS_SCALED = 34 # kept failing
MAVLINK_MSG_ID_RC_CHANNELS_RAW = 35 # kept failing
MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE = 70 # kept failing
MAVLINK_MSG_ID_BATTERY_STATUS = 147 # kept failing
MAVLINK_MSG_ID_ESTIMATOR_STATUS = 230 # kept failing

(I know this is probably another issue, but trying to give as much information as possible, if it helps)

@Crowdedlight
Copy link
Author

Crowdedlight commented Oct 3, 2019

Today we have experienced that using the message_interval mess with the output rate of global_position_int. When no message_interval has been sent so it output at default rates I receive global_position_int with 2hz, but as soon as message_interval is used, it drops down to inconsistent 0.3hz.

This has only been tested on PX4 1.9.2.

@dagar
Copy link
Member

dagar commented Oct 3, 2019

Could you try running mavlink status + mavlink status streams on the command line and capture the output before and after altering a message_interval?

@Crowdedlight
Copy link
Author

Crowdedlight commented Oct 4, 2019

The console didn't let me copy, so I captured it as images. It clearly show that something happens with sys_status which makes it go down to a rate of 0.05hz. Global_position_int also gets limited to 0.5hz without being told to. There also seems to be some odd values at system_time, altitude, extended_sys_state and estimator_status. However, they are all messages I try to limit to 1hz. I am gonna investigate if I send a wrong interval value for those messages.

Before limiting

Instance 0, is the one connected to my laptop when testing
mavlink_status
mavlink_stream

After limiting

mavlink_status_limited
mavlink_status_streams_limited

@Crowdedlight
Copy link
Author

Crowdedlight commented Oct 4, 2019

It would appear that if I send 1000000 as rate for altitude then it gets limited to 1hz.

I sent the following:

[[MAVLINK_MSG_ID_SYSTEM_TIME, 1000000],
[MAVLINK_MSG_ID_ALTITUDE, 1000000],
[MAVLINK_MSG_ID_EXTENDED_SYS_STATE, 2000000]]

Which resulted in the following output. So it seems like some of the streams use a different unit for rate? Or that it somehow is backwards?
mavlink_limit_values

EDIT: I am being stupid here. I somehow missed that the unit was in us, and not hz.... disregard that part of the error

@Crowdedlight
Copy link
Author

It would appear that sys_status works as expected. The issue was me using the wrong unit for other messages. As such I assume it started to limits messages to stay below the overall limit of bytes/s, as it expected to send other messages with a million Hz.

Apologies for the stupid error. Gonna close the issue here. Thanks for the help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants