![]() |
Finding distance using accelerometer..
I am trying to use the data from the accelerometer to find the distance the robot has traveled, but I'm not sure how to do this.
Help? I am using labview. |
Re: Finding distance using accelerometer..
Be very careful about this.
In the world that a high school physics class exists in, it is quite simple. Integrate acceleration once and you get velocity. Integrate velocity and you get position. Done and Done. Unfortunately, the real world is a jerk and gravity keeps on keeping us down. If your accelerometer isn't perfectly aligned, gravity will affect your side to side acceleration. This will show up as a constant small acceleration. Your velocity will continue to climb and your calculated position will soon be in a different country. Assuming you can compensate for gravity, you will probably need to use the gyro as well to detect orientation. If you turn 90 degrees, X becomes Y and vis-versa. The gyro will help you with this. The accelerometer is very good at sensing acceleration, impacts and tilt.I think it will mostly be used for traction control and "I just hit something in autonomous, RUN AWAY" applications this year. It is sketchy for velocity and a pain in the butt for position. That being said, go for it. |
Re: Finding distance using accelerometer..
Thanks, but I should of made myself clearer.
I am asking for help on the actual programming in labview. And about the gyro, is it absolutely necessary? I thought that the axis rotated with the the accelerometer. I'm not looking for actual position so much as just knowing the actual distance traveled. |
Re: Finding distance using accelerometer..
To "integrate" a signal, just keep adding it to an accumulator on a regular basis. Use a timed loop (there's one provided for you in the Basic robot template) with a shift register to hold the accumulated value.
Quote:
If your wheels don't slip, encoders on the axle or gearbox give a much easier way to measure distance traveled. That's not a good assumption with acetal wheels on FRP, though. |
Re: Finding distance using accelerometer..
Quote:
If you want to know the distance you traveled along a given axis and not your position you could probably do w/o a gyro. If you want to do any sort of positioning I would suggest using a gyro. Now, Eric is correct when he says they have to be mounted flush, the exception being that you could write code to auto zero it at the beginning of a match. Your code is going to look similar to this: Code:
vel //Your old velocity |
Re: Finding distance using accelerometer..
Quote:
|
| All times are GMT -5. The time now is 10:31. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi