|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
||||||
|
||||||
|
Re: Compass sensor
Alex,
This would not be very easy for someone without a lot of experience to implement. They might be able to do it, but it will not be easy. Gyros are great since they allow you to track small heading changes at a fast rate. The down side is that since you're using an integral to calculate heading, any small change in the circuit's bias voltage will cause your heading to drift. You can probably expect about 1 degree of heading drift every 5 to 10 seconds. If I were you, this is what I would do: use the gyro to track your heading at a fast rate, and use another method to correct the gyro heading calculation whenever it's able to. You can do this using the magnetic compass (use some logic like if the gyro heading is within a certain tolerance for 1 second and the compass reading is within a tolerance for 1 second, then set the gyro heading to the compass heading). Another method is to have the driver eyeball the robot heading from the driver station, move a pointer connected to a potentiometer in the driver station to coincide with your eyeballed estimation of the driver heading, and then hit a sync button that tells the robot to reset the gyro heading to the pointer heading. Another method would be to eliminate the sync button and have a knob on a potentiometer in the driver station and use it as a "heading trim" knob so that RobotHeading = GyroHeading + HeadingTrim. Yet another method is to eliminate the gyro and put two encoders on some unpowered omni wheels and calculate heading from the difference in the encoder turns. Yet another method is... There are lot's of ways to skin a cat. Play around with some of these ideas or invent your own - whoever gets to do it will have a lot of fun (and a lot of frustration). |
|
#17
|
||||
|
||||
|
Re: Compass sensor
Quote:
Probably your best application is to use the gyro along with the camera to orient your robot in the right direction for kicking or whatever you want your robot to do. The camera will give you an angle, then apply that to the gyro and the drive base to correct the orientation of your robot. You could just do this with the camera, but I think it would be more reliable to do it with both. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [FTC]: Compass Sensor | saaby | FIRST Tech Challenge | 5 | 26-03-2009 19:56 |
| [FTC]: Compass Sensor Interference. | ttldomination | FIRST Tech Challenge | 3 | 02-02-2009 20:19 |
| Devantech CMPS03 compass sensor | eagleslg | Programming | 1 | 24-05-2008 22:00 |
| Where can I get a digital compass sensor? | EHaskins | Technical Discussion | 6 | 26-09-2007 18:33 |
| Compass/direction sensor | Frank(Aflak) | Technical Discussion | 10 | 06-04-2003 09:18 |