To use generated trajectories for more than just travelling in a straight line, we need to know the robot's effective trackwidth. The effective trackwidth is often slightly different than the actual robot's width measured with a ruler, due to center of gravity, differences in traction, etc. So we determine the effective trackwidth by using a gyro and encoders.
Install the navX and update program to read the gyro angle and display on dashboard. Note the starting values of the encoders. Make the robot spin in place 10 times (i.e. 3600 degrees as reported by the navX getAngle()). Use the new encoder values to determine how many encoder ticks each side traveled to make the robot spin 10x. Convert that to inches (see code comments for conversions)
effective trackwidth in inches = (inches traveled) / (10pi)
Update the DriveTrain.java subsystem to include a constant for the effective trackwidth, and add comments noting the number of encoder ticks and distance in inches recorded for the 10 turns.
To use generated trajectories for more than just travelling in a straight line, we need to know the robot's effective trackwidth. The effective trackwidth is often slightly different than the actual robot's width measured with a ruler, due to center of gravity, differences in traction, etc. So we determine the effective trackwidth by using a gyro and encoders.
Install the navX and update program to read the gyro angle and display on dashboard. Note the starting values of the encoders. Make the robot spin in place 10 times (i.e. 3600 degrees as reported by the navX getAngle()). Use the new encoder values to determine how many encoder ticks each side traveled to make the robot spin 10x. Convert that to inches (see code comments for conversions)
effective trackwidth in inches = (inches traveled) / (10pi)
Update the DriveTrain.java subsystem to include a constant for the effective trackwidth, and add comments noting the number of encoder ticks and distance in inches recorded for the 10 turns.