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

mavlink stream consistency in SITL with 1.10.2 #15337

Open
asherikov opened this issue Jul 15, 2020 · 5 comments
Open

mavlink stream consistency in SITL with 1.10.2 #15337

asherikov opened this issue Jul 15, 2020 · 5 comments

Comments

@asherikov
Copy link

It appears that data can be rather inconsistent between different mavlink streams, for example, 'landed state' flag reported in extended state differs in 'normal' (GCS) and 'onboard' mavlink streams (data is printed from MavlinkStreamExtendedSysState::send()):

1594807716 landed_state: 1 | mavlink type: Onboard
1594807716 landed_state: 1 | mavlink type: Onboard
1594807716 landed_state: 1 | mavlink type: Normal
1594807716 landed_state: 1 | mavlink type: Onboard
1594807716 landed_state: 3 | mavlink type: Onboard
1594807717 landed_state: 3 | mavlink type: Onboard
1594807717 landed_state: 3 | mavlink type: Onboard
1594807717 landed_state: 3 | mavlink type: Onboard
1594807717 landed_state: 1 | mavlink type: Normal
1594807717 landed_state: 3 | mavlink type: Onboard
1594807717 landed_state: 3 | mavlink type: Onboard
1594807718 landed_state: 3 | mavlink type: Onboard
1594807718 landed_state: 3 | mavlink type: Onboard
1594807718 landed_state: 1 | mavlink type: Normal
1594807718 landed_state: 3 | mavlink type: Onboard
1594807718 landed_state: 3 | mavlink type: Onboard
1594807718 landed_state: 3 | mavlink type: Onboard
1594807719 landed_state: 3 | mavlink type: Onboard
1594807719 landed_state: 3 | mavlink type: Onboard
1594807719 landed_state: 3 | mavlink type: Onboard
1594807719 landed_state: 1 | mavlink type: Normal
1594807719 landed_state: 3 | mavlink type: Onboard
1594807719 landed_state: 3 | mavlink type: Onboard
1594807720 landed_state: 3 | mavlink type: Onboard
1594807720 landed_state: 3 | mavlink type: Onboard
1594807720 landed_state: 1 | mavlink type: Normal
1594807720 landed_state: 3 | mavlink type: Onboard
1594807720 landed_state: 2 | mavlink type: Onboard
1594807720 landed_state: 2 | mavlink type: Onboard
1594807721 landed_state: 2 | mavlink type: Onboard
1594807721 landed_state: 2 | mavlink type: Onboard
1594807721 landed_state: 1 | mavlink type: Normal
1594807721 landed_state: 2 | mavlink type: Onboard
1594807721 landed_state: 2 | mavlink type: Onboard
1594807721 landed_state: 2 | mavlink type: Onboard
1594807722 landed_state: 2 | mavlink type: Onboard
1594807722 landed_state: 2 | mavlink type: Onboard
1594807722 landed_state: 2 | mavlink type: Onboard
1594807722 landed_state: 1 | mavlink type: Normal
1594807722 landed_state: 2 | mavlink type: Onboard
1594807722 landed_state: 2 | mavlink type: Onboard
1594807723 landed_state: 2 | mavlink type: Onboard
1594807723 landed_state: 2 | mavlink type: Onboard
1594807723 landed_state: 2 | mavlink type: Onboard
1594807723 landed_state: 1 | mavlink type: Normal
1594807723 landed_state: 2 | mavlink type: Onboard
1594807723 landed_state: 2 | mavlink type: Onboard
1594807724 landed_state: 2 | mavlink type: Onboard
1594807724 landed_state: 2 | mavlink type: Onboard
1594807724 landed_state: 1 | mavlink type: Normal
1594807724 landed_state: 2 | mavlink type: Onboard
1594807724 landed_state: 2 | mavlink type: Onboard
1594807724 landed_state: 2 | mavlink type: Onboard
1594807725 landed_state: 2 | mavlink type: Onboard
1594807725 landed_state: 2 | mavlink type: Onboard
1594807725 landed_state: 2 | mavlink type: Normal

landed state flag values:

   MAV_LANDED_STATE_UNDEFINED=0, /* MAV landed state is unknown | */
   MAV_LANDED_STATE_ON_GROUND=1, /* MAV is landed (on ground) | */                                                    
   MAV_LANDED_STATE_IN_AIR=2, /* MAV is in air | */
   MAV_LANDED_STATE_TAKEOFF=3, /* MAV currently taking off | */
   MAV_LANDED_STATE_LANDING=4, /* MAV currently landing | */
   MAV_LANDED_STATE_ENUM_END=5, /*  | */

Note that in this case 'takeoff' state does not appear in 'normal' stream at all.

The issue is not persistent. Is this expected behavior or a bug?

@julianoes julianoes added the bug label Jul 15, 2020
@julianoes
Copy link
Contributor

Thanks for the issue @asherikov. That's certainly odd but doesn't surprise me as we've seen weird effects in MAVSDK with landed_state before.

Have you checked if this is fixed with v1.11?

@asherikov
Copy link
Author

I haven't tried 1.11, I'll try to find time to check.

@dagar
Copy link
Member

dagar commented Jul 17, 2020

Yes please let us know if this is an issue v1.11 beta or current master. Quite a lot has changed in mavlink this year with moving to the new uORB::Subscription API.

@asherikov
Copy link
Author

  1. I am having issues with AirSim SITL with newer firmware, sorry I don't want to dive into this atm.
  2. In my case changing the mavlink stream mode to onboard resolved the issue, or at least made inconsistencies negligible.

@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Dec 25, 2020
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