Open jimmyli97 opened 10 years ago
Should be used to stabilize against pushing by other robots when we dump balls in as well.
Also we can write a calibration program for the gyro and the accelerometer that calibrates them using the encoder distance (or something guaranteed to always read relative changes accurately, such as the EOPD sensor, the compass sensor, or the mindsensor's high precision distance sensor).
Helpful posts: -Using the gyro -Using the ultrasonic for range mapping -Calibrating accelerometer -Filtering gyro and accelerometer
Useful sensors -IMU
This should most likely be implemented as a task that constantly reads/writes current velocity, position, and rotation. Care should be taken with the structure storing data (e.g. use a semaphore)
See this link for sample implementation of rotational stabilization.
See this link for an example of how to integrate the values outputted in order to determine velocity and position.
This link probably has the most advanced code (I haven't looked at it yet)