-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
accel and gyro calibration move to msg/ #9553
Conversation
23d578e
to
755df64
Compare
@dagar Do you have an update here? |
e42711a
to
c62d95a
Compare
I haven't been able to reproduce the original problem seen in #9474 from a good vehicle calibration state. |
This needs a quick line by line review, but should otherwise be safe to merge. |
6e6962e
to
544a1a3
Compare
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 not convinced by this:
- The topic does not have a device identifier
- More generally, why adding another topic for that which the sensors module needs to fill from params? Why not letting a driver read the calibration params directly (through a shared base class)?
There's not much to be convinced of here, at the moment it's simply a helper for debugging and printing what each individual driver instance is actually doing internally. In the referenced issue I'm fairly certain there's a weird edge case where the intended calibration parameters weren't loaded. In the future I'd like to have the drivers start reading directly from params, but even in that case this might be useful. My next incremental step towards that was going to be refactoring the existing sensors module calibration parameter reading centrally so that a helper can fill this struct directly. Then gradually have the drivers themselves move to a base class that provides the functionality directly instead of via IOCTL. I also want to explore some ideas for publishing an extremely low rate Worst case it's easy to move these out of msg/ later and back into a real header. |
Good, the PR and description suggested otherwise. The topic is not required for that, but if you think it helps with debugging, fine (the referenced issue is already closed). I do however request better topic descriptions: what are they used for, who publishes (or will publish) them? Our sensor pipeline regarding calibration is already complex, and adding these topics does not make it simpler. |
Rebased on master and added calibration printing to a number of accels and gyros. |
The reference issue wasn't really resolved properly, but got confused with other issues during someone's attempted reproduce. If you're curious take a look starting here #9474 (comment). It appears that the calibrations changed as the result of an unrelated parameter update. I want to get the pieces in place so we can begin to investigate in place if this reoccurs in the field. |
Rebased on master. Can I get another review? I'd like to keep going with this for debugging short term, and longer term getting away from IOCTL calls for calibration. |
9a2ee6f
to
7cb6eba
Compare
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.
@dagar - I know this is for debugging and these changes make sense in the context of what was discussed. Can we add documentation to add that context. Describe the problem and the choices we may have to resolve the issues.
7cb6eba
to
488d6e1
Compare
Debugging possible issues with applying sensor calibrations.
Moving the calibration structs (accel_calibration, gyro_calibration, etc) allows for easy printing (print_message()) and debugging. It also lays the groundwork for moving to something entirely uORB based.
In this PR
mpu6000 status
ormpu9250 status
will now print the actual calibrations used internally.This also unifies how calibrations are applied at the end of a successful calibration between nuttx, linux, qurt.