PDA

View Full Version : Team 1114 Example C++ Code


Pat Fairbank
10-26-2008, 08:59 PM
(Reposted here from the FIRST Forums (http://forums.usfirst.org/showthread.php?t=10251) for better reliability and visibility)

Over the course of the beta test, Team 1114 has been retrofitting the 2007 robot, Simbot Prime, with the new control system. Here is the C++ code we've developed for teleoperated control of the robot. It includes examples of an IterativeRobot with one-joystick drive and simple arm control, as well as some convenience classes we wrote for double solenoids and the Logitech Dual Action Gamepad (unfortunately, we can't distribute the source of the WPILib library we're building against due to the terms of the NDA).

We're currently working on programming an autonomous mode which can score a tube on the rack guided by the green light; the code'll be released in a week or two when we're done.

Travis Hoffman
10-27-2008, 03:39 PM
(Reposted here from the FIRST Forums (http://forums.usfirst.org/showthread.php?t=10251) for better reliability and visibility)

Over the course of the beta test, Team 1114 has been retrofitting the 2007 robot, Simbot Prime, with the new control system. Here is the C++ code we've developed for teleoperated control of the robot. It includes examples of an IterativeRobot with one-joystick drive and simple arm control, as well as some convenience classes we wrote for double solenoids and the Logitech Dual Action Gamepad (unfortunately, we can't distribute the source of the WPILib library we're building against due to the terms of the NDA).

We're currently working on programming an autonomous mode which can score a tube on the rack guided by the green light; the code'll be released in a week or two when we're done.

It's good to see the C++ published beta tester code samples catching up with the LabVIEW - looking forward to the autonomous code sample!

Keep 'em coming, folks. :)

Pat Fairbank
11-12-2008, 09:30 PM
Here's the final version of the code, which has an autonomous mode that tracks the green light and scores a tube on a spider leg. Also included is a class we wrote for doing PID calculations 1114-style. Comments and questions are welcome.