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

Don't override MAVLink behavior in SITL .rc file #12672

Closed
wants to merge 1 commit into from

Conversation

pgorczak
Copy link

@pgorczak pgorczak commented Aug 9, 2019

Describe problem solved by the proposed pull request
While testing SITL I discovered that MAVLink is sending some messages at unexpected rates (#12613). The console output indicates a stream with the "normal" profile on port 14570

INFO  [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 14570 remote port 14550

However subsequent mavlink stream commands override the normal mode for some messages and turn rates up to 50 messages per second.

Test data / coverage
I tested the changed SITL setup with Gazebo/QGroundControl and a basic mission. I verified that the normal MAVLink profile is now used by checking QGroundControl's MAVLink Inspector.

Describe your preferred solution
Delete the commands that re-configure MAVLink.

Describe possible alternatives

  • Keep the commands but trigger a warning message at the console from the rc file
  • Raise the log message in Mavlink::configure_stream from debug to info level

@@ -232,15 +232,6 @@ sh etc/init.d/rc.vehicle_setup

# GCS link
mavlink start -x -u $udp_gcs_port_local -r 4000000
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the position and attitude still look smooth in QGC?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should, otherwise we should probably adapt the defaults, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. The default for the position is 5 Hz, which is probably too low. I think that was the original reason to add them here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we raise it in the mavlink config or would that exceed bandwidth on 57600?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to check. Why not keep attitude and position here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to have consistency between SITL and real vehicles as much as possible. And that way we force users like MAVROS, MAVSDK, or QGC to use the commands to request whatever rate they need.

@julianoes
Copy link
Contributor

@dagar I would suggest to get this in.

@stale
Copy link

stale bot commented Feb 9, 2020

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

@LorenzMeier
Copy link
Member

Thanks for originally proposing this! I'm closing this PR as stale - if you still would like to add this, a new, rebased PR would be most welcome! Our apologies for not being more on top of it earlier. Closing stale PRs helps us to make sure that overall we can drive PRs to completion.

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

Successfully merging this pull request may close these issues.

4 participants