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

Use ground truth data for ground truth mavlink message #14806

Merged
merged 1 commit into from
May 2, 2020

Conversation

kamilritz
Copy link
Contributor

Previously the ground truth data that is published over the mavlink hil_state_quaternion message, were filled with information from non-groundtruth messages. Some of them such as vehicle_global_position message is sent by the EKF only after the passing checks. The ground truth gps coordinate was therefore not available from beginning and only for vehicle flying using GPS data for estimation. This is causing issues during integration tests. #14760
Is there a reason why the non groundtruth messages were used?

This PR solves this by using the data from the already existing groundtruth variants that are available during simulation. This message is during simulation runs immediately available. From a conceptually standpoint this is also the correct choice. Since the vehicle_global_position is filled with the output from the estimator, it is not ground truth data. It is the estimator output which we want to check against some ground truth data.

Issues:
In the ground truth information from the simulator is no acceleration information available. This was previously available from the estimator.
It could be that there is a static offset in the global position between groundtruth and the output of the estimator. For the existing checks in the mavsdk tests, this is not a problem, since only groundtruth data is compared to groundtruth data.

Testing:
Visualized message fields through mavlink inspector for ground_truth (plot 1) and estimate (plot) by running iris model in simulation.

Latitude (Attention: offset is visible)
PX4_Latitude

Velocity (Attention: HIL_STATE_QUATERNION's velocitty is in cm/s)
PX4_vel

Quaternion q0
PX4_quaternion

Yawspeed
PX4_yawspeed

All tests are passing now with speedfactor 1:
Before:
Screenshot from 2020-05-01 17-10-36

After:
Screenshot from 2020-05-01 16-31-28

For the non-gps model it is also not comparing 0 against 0 anymore.
Screenshot from 2020-05-01 15-17-00

@dagar
Copy link
Member

dagar commented May 1, 2020

This certainly sounds like the correct thing to do, I'm not sure if this previously made sense for some use case.

@dagar dagar merged commit 0cdf2c2 into PX4:master May 2, 2020
@TSC21 TSC21 added this to the Release v1.11.0 milestone May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants