Welcome to RobotBuilder

Currently, there is alot of development going on. For the latest most accurate information, please go to screenstepslive.com. Once that documentation settles down, we hope to include it here.

What is it?

RobotBuilder is an application designed to aid the robot development process. Robot builder can help you:

Getting Started

This section will take you through the basics of using RobotBuilder to develop a simple robot with tank drive. We will cover:

Subsystems

Subsystems are RobotBuilders way of organizing your robot. A subsystem should represent a distinct part of the robot that performs a particular subset of tasks. For example, a Drive Train consists of a series of motors that drive it and maybe some encoders to measure it's speed and distance. For more, see: Subsystems and Subsystem

Creating the Drive Train

The first step on the way to a fully functional subsystem is to create the subsystem, so that it exists in your robot tree.

To create the Drive Train subsystem:

  1. Click on "Subsystem" in the palette on the left.
  2. Drag it over Subsystems in the robot tree and release.
  3. A new subystem has been created.

Naming the Drive Train

After you have a subsytem created, it is very helpful to give it a name.

To name the subsystem:

  1. Click on the newly created "Subsystem".
  2. It's properties will appear on the right.

  3. Double click the cell to the right of name, that contains "Subsystem".
  4. Edit it to read "Drive Train".
  5. It's new name appears in the tree.

Adding a Robot Drive to the Drive Train

The easiest way to make your robot drive is to us the RobotDrive object in WPILib. It provides methods for tank drive, arcade drive and mecanum drive.

To add a robot drive to your Drive Train:

  1. Click on "Robot Drive 2" in the palette on the left.
  2. Drag it over "Drive Train" in the robot tree and release.
  3. Your Drive Train now has a robot drive object.

  4. Rename it to "Robot Drive", the same way you renamed the "Drive Train".

Adding Motors to the Robot Drive

The RobotDrive object needs motors for both it's left and and it's right side.

To add motors to your robot drive:

  1. Click on "Jaguar" in the palette on the left.
  2. Drag it over "Robot Drive" in the robot tree and release.
  3. Rename it to "Left Jaguar", the same way you renamed the "Drive Train".
  4. Click on "Jaguar" in the palette on the left.
  5. Drag it over "Robot Drive" in the robot tree and release.
  6. Rename it to "Right Jaguar", the same way you renamed the "Drive Train".

Checking That the Motors are Correctly Assigned

The RobotDrive object tries to guess which motors are which, but it's helpful to check that they are correctly assigned to the proper side.

To add motors to your robot drive:

  1. Click on "Robot Drive".
  2. Make sure that the "Left Motor" property is set to "Left Jaguar", if not click on it and select "Left Jaguar".
  3. Make sure that the "Right Motor" property is set to "Right Jaguar", if not click on it and select "Right Jaguar".

You now have a subsystem representing your robots Drive Train!

Commands

Commands are a way of representing actions that your robot can take. Commands can be bound to buttons and other triggers to run under certain conditions. They can also be chained in command groups to perform a more complex series of actions built from existing commands. For more, see: Commands and Command

Creating the Tank Drive Command

The first step to create a command is to add it to the robot tree under commands.

To create the command:

  1. Click on "Command" in the palette on the left.
  2. Drag it over Commands in the robot tree and release.
  3. A new command has been created.

Naming the Tank Drive Command

After you have a command created, it is very helpful to give it a meaningful name.

To name the command:

  1. Click on the newly created "Command".
  2. It's properties will appear on the right.

  3. Double click the cell to the right of name, that contains "Command".
  4. Edit it to read "Tank Drive".
  5. It's new name appears in the tree.

Requiring the Drive Train

After you have a command created and named, you must indicate which subsystem it requires.

To require a subsystem:

  1. Click on the "Tank Drive".
  2. It's properties will appear on the right.

  3. Click the cell to the right of requires, that contains "None".
  4. Select "Drive Train".

Creating the Slow Tank Drive Command

Follow the steps above to create a command named "Slow Tank Drive"

Setting the Default Command for Drive Train

Subsystems can have default commands that run when no other command is running that performs the default behaviour.

To set the default command:

  1. Click on the "Drive Train".
  2. It's properties will appear on the right.

  3. Click the cell to the right of default command, that contains "None".
  4. Select "Tank Drive".

Operator Interface

The operator interface is the glue that connects the buttons on the operator interface to the commands that make the robot act in interesting ways. For more, see: Operator Interface

Adding Joysticks to the Operator Interface

The operator interface needs some joysticks to control driving and other commands.

To add joysticks to the operator interface:

  1. Click on "Joystick" in the palette on the left.
  2. Drag it over "Operator Interface" in the robot tree and release.
  3. Rename it to "Left Joystick".
  4. Check that it is Number 0.
  5. Click on "Joystick" in the palette on the left.
  6. Drag it over "Operator Interface" in the robot tree and release.
  7. Rename it to "Right Joystick".
  8. Check that it is Number 1.

Adding a Joystick Button to the Operator Interface

Joystick buttons allow you to bind actions to buttons on a joystick.

To add a joystick button to the operator interface:

  1. Click on "Joystick Button" in the palette on the left.
  2. Drag it over "Operator Interface" in the robot tree and release.
  3. Rename it to "Slow Tank Drive Button".

Configuring the Joystick Button

For the joystick button to do anything interesting, you have to configure it to run a command.

To configure a joystick button:

  1. Click on "Slow Tank Drive Button" in the robot tree.
  2. It's properties will appear on the right.

  3. Click the cell to the right of joystick, that contains "None".
  4. Select "Left Joystick".
  5. Click the cell to the right of button.
  6. Select "1".
  7. Click the cell to the right of Command, that contains "None".
  8. Select "Slow Tank Drive".
  9. Click the cell to the right of when to run.
  10. Select "whileHeld".

Generating Code

Once you've filled in RobotBuilder with the information you want, it can generate all of the important files and the bulk of code for an existing java project

Telling RobotBuilder Where to put the Project

In order to export to java, RobotBuilder needs to know where your java project should be.

To tell RobotBuilder about the java project:

  1. Select the root of your robot tree.
  2. Select the folder for the Java Project property.

Exporting to Java

RobotBuilder can generate the skeleton robot code from your robot model for you.

To generate the code with RobotBuilder for java:

  1. Open up RobotBuilder.
  2. Click Generate > Java.

Generating Wiring Tables

RobotBuilder can generate wiring tables to simplify wiring of the robot.

Telling RobotBuilder Where to put the Table

In order to export th table, RobotBuilder needs to know where to put it.

To tell RobotBuilder where to put the wiring table:

  1. Open up RobotBuilder.
  2. Select the root of your robot tree.
  3. Click where it says "Click to Select" next to "wiring file location".
  4. Select or create a file to export to.

Exporting to a Wiring Table

RobotBuilder can generate a wiring table for you.

To generate the wiring with RobotBuilder :

  1. Open up RobotBuilder.
  2. Click Generate > Wiring Table.

Filling in the Code

RobotBuilder is an application designed to aid the robot development process. Robot builder can help you: