Estimating Robot Position Using Accelerometer

Is it viable to use roboRio’s built in accelerometer to find the robot position inside the arena?

Taking into consideration the values of the accelerometer and the time, it would be possible to calculate distance, right? If so, would it be sufficiently precise to provide an accurate position?
We also have two ultrassonic sensors that can help, and we can buy some IR sensors to make the robot align with the rocket or cargo ship.

We got the ultrassonic sensor and the accelerometer to work, we’d only need some way of calculating the distance.

The idea would be to assist the pilot and maybe automate some parts of the process.
Can we achieve that? Should we do that?

Thanks anyway.

In theory yes, you can calculate displacement from a known starting point and velocity, and acceleration over time.

Practically, all sensors have noise. The double-integration of that noise will cause your error to build up a lot over time. The RIO’s onboard accelerator is really not up to the task - our experience is the noise is far too big to be double-integrated and yield an accurate position over a match (certainly outside the couple-inch margin you’d have this year).

Gyro and wheel encoders are the better bet, and has been proven by a number of teams recently.

Thanks for the reply!

What if the accelerometer only had to guide the robot from the starting point/loading station to the rocket/cargo ship and whenever it reaches its destination it uses the line in the floor + an ultrassonic sensor to correct the positioning? Would there still be a lot of error build up?

I would suggest that a “blind” motion profile is going to be more accurate than double integrating the accelerometer in the RoboRIO. For a given drive train, just finding a generally accurate map of motor power to velocity and then using that to track a motion profile may get you close enough to then use a line follow in.

Adding in drivetrain odometry will get you really, really close. You want/need encoders on your drive wheels to increase your accuracy.

No. An accelerometer of sufficient quality to do this would be well outside of the FRC budget limit, and the built-in RoboRIO accelerometer is especially bad.

I think so, though I don’t have the hard data to back myself up.

In general I’ve always been a proponent of “measure what you care about”. In this case, if it’s distance to the rocket/cargo ship, I’d start by looking into ultrasonic/lidar/IR distance solutions to measure the distance number directly. If there’s some reason that won’t work then I’d go to wheel encoders (one step removed - it assumes your wheels don’t slip). If that doesn’t work, only then would the fallback become something requiring a lot of math to derive ( like the double-integrated accelerometer).