AGHSEagleRobotics / frc1388-2015

Automatically exported from code.google.com/p/frc1388-2015
1 stars 0 forks source link

Robot gyro #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The robot will need to know its current heading in order to implement 
driver-perspective mecanum control.

The MecanumDrive method in the RobotDrive class includes functionality to 
correct for the robot's heading.  The intent is to connect a Z-axis gyro's 
angle indicator to this input.  This is the simple solution.

Past robots have experienced issues with gyro heading inaccuracies, which we've 
typically chalked up to "gyro drift".  While gyros do indeed drift over time, 
the inaccuracies we've seen are more (sometimes significantly more) than would 
be expected by simple drift.  Some possible explanations:

- Robot exceeded the limit of gyro spin rate.  Gyros have a maximum angular 
rate (degrees per second) that they can measure.  With Chaos, it was estimated 
that the robot was capable of far exceeding the max rate that its gyro could 
measure.

- 3-D motion with a 1-D sensor.  We're interested in the Z-axis rotation of the 
robot.  However, the robot can rotate along any axis.  Thus, the robot's Z axis 
rotation is not always equal to the robot's horizontal component of rotation.  
For example, consider a robot that's sitting at a heading of 0 degrees.
  Now, tip the robot on its back (no rotation in the Z axis or horizontal plane).
  Now, rotate the robot 90 degrees on the floor (no rotation in the robot's Z axis, 90 degrees of rotation in the horizontal plane).
  Now, tip the robot back upright (no rotation in the robot's Z axis or horizontal plane).
The robot is now at a heading of 90 degrees; however, the Z-axis gryo did not 
detect any rotation.
This problem should be solvable by using a 3-axis gryo and tracking the robot's 
orientation in 3-D space.

- Analog noise.  The gryos we've used in the past have an analog interface to 
the robot controller.  Any noise on this signal (for example, due to 
magnetically induced interference from motors) would affect the detected gryo 
readings.

So, an advanced solution to robot heading would be to find an appropriate gyro 
that would address some or all of these issues, and determine how to write the 
code to utilize that sensor.

Original issue reported on code.google.com by jtec...@gmail.com on 15 Jan 2015 at 6:27

GoogleCodeExporter commented 9 years ago

Original comment by jtec...@gmail.com on 4 Feb 2015 at 4:58

GoogleCodeExporter commented 9 years ago
We have decided to use the gyro given to the team in the kit of parts because 
of ease of coding. Currently the gyro works, but our driver, Andrew Golassi, 
doesn't want to use it because he is more used to driving without one. However 
I am keeping this issue open in case Andrew wants to use the gyro ever.

Original comment by Thomk...@gmail.com on 20 Feb 2015 at 2:26

GoogleCodeExporter commented 9 years ago

Original comment by Thomk...@gmail.com on 20 Feb 2015 at 3:53