Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Extract sensor reading, calibration, and health checks #57

Open
kylc opened this issue Apr 13, 2016 · 2 comments
Open

Extract sensor reading, calibration, and health checks #57

kylc opened this issue Apr 13, 2016 · 2 comments
Assignees
Milestone

Comments

@kylc
Copy link
Member

kylc commented Apr 13, 2016

Every vehicle system does not need to be responsible for juggling a list of optional sensors. A common sensor reader should be created that can read all available sensors, can perform sensor calibrations, and can reason about aggregate sensor health.

@kylc kylc self-assigned this Apr 13, 2016
@kylc kylc added this to the v1.0 milestone Apr 13, 2016
@kylc
Copy link
Member Author

kylc commented Apr 14, 2016

@yoos any ideas on how to pull the calibration out of the vehicle system? Check out the branch to see the new aggregate sensor interface.

My current thought is to add a calibrateStep method to the Sensor interface that would be called every controller step. Then we can add a calibrated? check to the interface. The vehicle system would call calibrateStep until all active sensors have calibrated? = true. This would likely be implemented as a separate state in the system state machine.

switch(mode) {
case CALIBRATING:
  sensors.calibrateStep();
  if (sensors.calibrated()) {
    mode = ...;
  }
  break;

case ...:
}

yoos added a commit that referenced this issue Apr 18, 2016
yoos added a commit that referenced this issue Apr 28, 2016
See comment in `sensor/sensor.hpp` - hopefully this axis config scheme is more
intuitive. Note this updates only the MPU-9250 driver. Also updates icarus axis
config.

Sensor calibration removes preset offsets while calibrating.
@yoos
Copy link
Member

yoos commented Apr 28, 2016

Calibration must remove preset offsets to measure the chip's inherent bias. This also means the Sensor's internal offset should not be modified until calibration is complete - otherwise we'd be calibrating against a moving target.

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

No branches or pull requests

2 participants