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

local position acceleration: use mean value between two publications #24105

Merged
merged 4 commits into from
Jan 3, 2025

Conversation

NicolasM0
Copy link
Contributor

Solved Problem

On our onboard computer, we use the vehicle local position message for estimation and control purpose.
We use the acceleration fields to have a higher order than just velocity and position.

We have observed aliasing on tests with vibrations. The NED acceleration integral become very different from the velocity.

Solution

To avoid aliasing on the NED acceleration, add an accumulation of acceleration to improve the down sampling.

This implementation looks like a hack... Of course, I'm open to any suggestions for a better implementation.

Test coverage

  • Tested on an older branch (v1.14). It fixed our issue.
  • Quickly tested on this commit in SITL, acceleration seems correct.

@bresch
Copy link
Member

bresch commented Dec 13, 2024

For navigation you could also rather use sensor_combined and for control you could get vehicle_acceleration

Copy link
Member

@bresch bresch left a comment

Choose a reason for hiding this comment

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

I think your changes makes sense as it's better to avoid aliasing anyways

src/modules/ekf2/EKF2.cpp Outdated Show resolved Hide resolved
src/modules/ekf2/EKF2.hpp Outdated Show resolved Hide resolved
src/modules/ekf2/EKF2.hpp Outdated Show resolved Hide resolved
src/modules/ekf2/EKF2.cpp Outdated Show resolved Hide resolved
@NicolasM0 NicolasM0 force-pushed the vehicle_local_acceleration branch 3 times, most recently from 02bf276 to 5c1a6bc Compare December 16, 2024 09:20
@NicolasM0
Copy link
Contributor Author

For navigation you could also rather use sensor_combined and for control you could get vehicle_acceleration

@bresch Thank you for the review.
I got the suggestion but to estimate a relative position in NED and generate a trajectory in ROS, I found easier to use only one topic with unbiased acceleration on my nodes than getting sensor_combined at full rate and doing the integration and rotation myself.

Nicolas Martin and others added 3 commits December 17, 2024 14:32
To avoid aliasing on the ned acceleration, add an accumulation of
acceleration to improve the downsampling
Co-authored-by: Mathieu Bresciani <[email protected]>
@NicolasM0 NicolasM0 force-pushed the vehicle_local_acceleration branch from bfd931e to ce6a428 Compare December 17, 2024 13:32
@bresch bresch merged commit 4fe6d69 into PX4:main Jan 3, 2025
57 of 58 checks passed
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