-
Notifications
You must be signed in to change notification settings - Fork 17k
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
Simulate motor noise in the gyros and accels #12431
Conversation
0cb564c
to
bce7eed
Compare
@peterbarker I would be grateful for a review! |
bce7eed
to
f77c0de
Compare
I'm happy with the SITL C++ changes, just needs peters review on autotest changes |
f1b2a2d
to
0e2ff3f
Compare
On Tue, 3 Dec 2019, Andy Piper wrote:
+ vibe_log = self.buildlogs_path("ArduCopter-vibration-log.bin")
I tried current_onboard_log_filepath() but it fails, just going to stick with the current approach
That's fine. What was the failure, 'though?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with the SITL changes.
Something about index out of range |
0e2ff3f
to
92a1195
Compare
Thanks for the logging fix @peterbarker - works well! |
@peterbarker any idea why I would get this:
|
5f6961b
to
c71e033
Compare
Ok I have rebased and made some tweaks and is passing now. Once the final change gets blessed by CI I will drop the matek commit and it will be ready for merge. |
@peterbarker I got this failure again: |
@peterbarker so I just watched this test in progress, there are basically three problems:
|
Yep, it's close! Is it actually running overtime?
Rebooting the vehicle (which you are doing) must start a new log, so it's almost certainly All Your Fault :-P I did suggest the faster way to get the log - reference it directly using
I've been wondering about pushing stream rates way-down and pushing sim-speedup way-up for periods where we don't really care about anything but simple things like this. Long traverals to waypoints (like the quadplane tests) might also be candidates for this. But generally, no - there are hard-wired timeouts in the EKF which makes shortening settle-time problematic. |
Ok I have disabled LOG_DISARMED and that has produced a mcuh smaller log that can be downloaded in 5s. Still timing out though ... |
convert multicopter thrust to rpm per motor
perform FFT analysis on vibration output
Remove sample time error in backend.
c54cf45
to
25a7874
Compare
@peterbarker I got the test working with |
@andyp1per One option might be setting EKF type 10. I'm really not sure, 'though. |
@peterbarker tests are now clean - good enough? 🙂 |
This PR enables the simulation of motor-based noise for multicopters. Noise is created at the motor rotational frequency for each motor and combined. The rotational frequency is estimated from the thrust.
The benefit of this simulation is that it allows filtering targeting motor peaks to be tested in SITL. The support includes a test for the notch filter including dynamic FFT analysis using the batch sampler.
The simulation is controlled by setting
SIM_VIB_MOT_MAX to the maximum frequency expected from the motors at maximum throttle. The amount of noise added is controlled by the regular SIM_GYR_RND and SIM_ACCEL_RND settings.