DEWBOT VI Programming

From DEW Robotics
Jump to: navigation, search

Programming Overview

Programming for this years robot is more complex than any other year. While there are two modes, an autonomous mode where the robot drives itself and a teleop mode where roboteers drive the robot, there is a huge amount of shared programming.

The largest amount of programming is used to manage the drive train. As chronicled above we have a pivot drive. Each pivot has it's own drive motor to move the robot. By varying the speed of each wheel the robot direction can be changed. If you make the right side drive motors go faster than the left the robot moves in a gentle arc to the left.

The pivots also turn 360 degrees. Each pivot has it's own steering motor and a magnetic sensor. The sensor tells us what "direction" the pivot wheel is turning. So if we want to move to the left, we rotate the wheels 90 degrees to the left and apply power and the robot moves, looking like a crab. This is motion is call strafing, allowing us to quickly move side to side across the field.

The wheels can turn at any angle, allowing the robot to go in any direction. This crab like motion allows us to get to the ball while keeping the front kicker towards the goal. We strafe or crab over, align and kick.

On the fly we can change modes to "snake mode." This allows the robot to act like a snake going after prey. In our case the ball is the prey, snake mode keeps the ball in front of the robot (snake) while the back of the robot moves around. This allows us to herd balls into the goal.

Since the wheels can turn 360 degrees the robot can spin around on it's axis allowing us to reorient directions quickly.

Finally while there is a "front" on DEWBOT VI where the kicker is, as far as the drive system is concerned there is no front. If you rotate the robot 90 degrees to the right, what was the left side is now the front.

So it's like rubbing your stomach while patting your head while chewing gum while running!

Driver Control Documentation showing how the buttons are mapped to control functions See DEWBOT VI Code Functional Specifications for complete breakdown.

Autonomous Mode

At the start of the match the robot has 15 seconds to try to score on it's own. The plan sounds simple: Roll forward, find a ball, align the robot, kick the ball and SCORE! In reality we need to move forward so far, use the IR sensors to find the ball, use the camera and the gyrocompass to find the target, use the drive system to line up the shot and fire the kicker. Easy Peasy!

Teleop Mode

This is where the two person drive team gets to show their stuff. They move the robot around, find balls and shoot them into the goal. Wait, that sounds like the autonomous mode, just use that. Well we do, the targeting system shows us where the goal is and when we are aligned. The reason the roboteers are needed is that under autonomous the balls are sitting still, now they are moving. And there is not just one ball there could be 12 of them on the field. Oh did we mention the other 5 robots?
So it gets a little wild and crazy and while our programmers are good, the roboteers drive the show. The robot is still doing a lot of work, it's doing the drive train, tracking the goal and automatically cycling the kicker. There is lots of teamwork going on!


Safety is important to our programming efforts. The initial robot code is responsible for enable and disable functions. It connects to the driver station and follows it's control sequences.

At the end of the match it is possible that the robot is in a armed state with the kicker pulled back. This represents a hazard to the people moving the robot after the match. When the robot receives the end-of-match signal it releases the kicker, allowing the robot to be moved safely.

How to Create a Custom Dashboard

Instructions on how to create a custom dashboard in LabVIEW. (Thanks Mark McLeod)

  • Exit the Driver account to close everything (Setup tab -> Exit)
  • Login to the Developer Account
  • Use LabVIEW and create a new Dashboard project.
  • You'll then need to create an exe
    • Right click on Build Specifications -> New -> Application (EXE)
    • In the Popup:
      • "target filename" - change the name to Dashboard.exe
      • Change the Destination Directory to "C:\Program Files\FRC Dashboard"
    • Tell it where to begin:
      • In the left list click on "Source Files"
      • Click on "Dashboard"
      • Click on the right pointing arrow that will highlight
      • You should see Dashboard Main appear on the right hand side under "Startup VIs"
    • Click on "Build" at the bottom to create your exe
  • Login to the Driver account to start up the new dashboard and see if it works.

Labview links

FIRST Robotics Software 2010 - Windows - LabVIEW & NI Utilities - this is the initial release, Do not use the serial number that comes in the software kit for activation. You MUST use the following Serial Number to activate LabVIEW: L13R00000

Link to the FIRST FRC Software Page that has all the programming information on the 2010 software packages.

LabVIEW Tutorials to learn some LabVIEW

FRC 2010 Training Tutorials to learn the 2010 LabVIEW

FRC 2010 Driver Station to learn the 2010 Driver Station

FIRST Community National Instrument's FIRST Community

Programming Forum from Chief Delphi - Chief Delphi Programming