Use these sensors to keep track of your location on a virtual grid.
Keep the calculations to the basic right triangle trig calculations.
I am still thinking about it but the best way i think is to know the angle <90 of the robot direction to parallel of the field. This is done by adding and subtracting the gyro values. Then use sin and cos to calulate the change in x and y based on the distance you traveled in that direction. The accelerometer will help you with this.
In my experience, an inertial measurements unit is difficult to keep accurate if you integrate over a long period without a Kalman filter. Also, keeping track of the inertial measurements will consume a lot of your processing time, so depending on what else you plan to do, it may not be worth it. This year’s challenge seems like it is far less necessary to know exactly where you are. It should be sufficient to be able to see your target and at least keep facing toward the correct end of the field.
We built a 4-wheel omni two years ago. We placed a small pair of free-wheeling omni-wheels (~2" dia) underneath the center of the chassis pan, and oriented them at 90deg. Each omni had a Grayhill optical encoder. This gave us local x and y movement of the chassis. Using an additional Analog Devices yaw rate sensor and integrating the yaw rate for yaw angle, we had the info we needed for field position. Any binding or slippage in the wheels, of course, led to error, but it worked OK for us.
There are many sensors listed on Kevin’s site. Which are you referring to?
The gyro and accelerometer, that they asked for.
I’m not sure can follow your explanation. Could you please elaborate? I see a few key words but not a clear picture of what is to be done and what each component is used for.
\ x |
\ | y
\ 0 |
The y axis should be kept parallel to partiquar side of the field. The gyro will give you theta(0) and the hypotenuse is the distance traveled, the accelerometer will give you this value or more accurately you have to calculate it. Form these two values you can calculate the change in x and y.
Then if you know your point on the field, you can calculate your distance away form the target.
There is more to it which has to modified based on the direcition you are facing. I am still trying to figure it out. This will keep getting more inaccurate as the match goes on.
This is for a tank dirve. For the omni drive, if you don’t want to turn, all you need the accelerometer to keep track of you position. The angle you traveled and the ammount you traveled.
I thought this up a couple days ago. Still have no cule how to impliement the code. The picture is mess up becaues it dosen’t keep the spacing.