![]() ![]() We also pass an argument in telling it not to square the inputs. Here we use the DifferentialDrive arcadeDrive function because it does the straight/rotate math for us. Note that this example is similar to the Gyro article’s rotate to angle function but with the target angle set to 0.ĭepending on the robot, field layout, direction of travel, drift, and more, your gyro may not be zero when you want it to be.Ī good idea would be to zero the gyro reading before starting the drive straight routine. This can be fixed by “gain scheduling”, which is using different values of kP/kI/kD for different situations, or by adding terms to the P loop. Use any of these environments to develop the robotics program you want to run on the CompactRIO device. However, at low speed, small P values may not correct as well. The FIRST Robotics Competition (FRC) software includes three separate programming environmentsLabVIEW, Wind River Workbench, and the Sun SPOT Java Development Kit for FRC. ![]() This works well without much oscillation at speed because most of the nonlinearities in a drivetrain are taken up by the main drive power. A LabVIEW default program download takes 25 sec., but Building it still takes just as long and you want a good computer to run LabVIEW (the default code takes 1 min to build on an i3, but 7 min to compile on a Classmate Atom) Brownout condition 6. arcadeDrive ( power, turn_power, squaredInputs = False ) Function drive_straight_gyro ( power ): error = - gyroAngle # Our target angle is zero turn_power = kP * error drive. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |