Recent Updates

  • PIDSubsystems use feedback to control the actuator and drive it to a particular position. In this example we use an elevator with a 10-turn potentiometer connected to it to give feedback on the height. The skeleton of the PIDSubsystem is generated by the RobotBuilder and we have to fill in the rest of the code to provide the potentiometer value and drive the motor with the output of the imbedded PIDController.

    Manual RobotBuilder
  • Updated on: Jan 20, 2023

    Writing the code for a command in C++

    Manual RobotBuilder
  • Updated on: Jan 20, 2023

    Generating C++ code for a project

    Adding code to create an actual working subsystem is very straightforward. For simple subsystems that don't use feedback it turns out to be extremely simple. In this section we will look at an example of a Claw subsystem that operates the motor for some amount of time to open or close a claw on the robot arm.

    Manual RobotBuilder
  • A PIDSubsystem will automatically control the operation of an actuator with sensor feedback. To actually set the setpoints for the subsystem use a command since commands can be controlled over time and put together to make more complex commands. In this example we move the Elevator subsystem to the pickup (BOTTOM) position. To create the PIDSubsystem for the elevator see: Making a subsystem with feedback from sensors and Writing the code for a PIDSubystem in Java

    Manual RobotBuilder
  • PIDSubsystems use feedback to control the actuator and drive it to a particular position. In this example we use an elevator with a 10-turn potentiometer connected to it to give feedback on the height. The skeleton of the PIDSubsystem is generated by the RobotBuilder and we have to fill in the rest of the code to provide the potentiometer value and drive the motor with the output of the imbedded PIDController.

    Manual RobotBuilder
  • Subsystem classes get the mechanisms on your robot moving, but to get it to stop at the right time and sequence through more complex operations you write Commands. Previously in Writing the code for a subsystem in Java we developed the code for the Claw subsystem on a robot to start the claw opening, closing, or to stop moving. Now we will write the code for a command that will actually run the Claw motor for the right time to get the claw to open and close. Our claw example is a very simple mechanism where we run the motor for 1 second to open it or 0.9 seconds to close it.

    Manual RobotBuilder
  • Updated on: Jan 20, 2023

    Writing the code for a subsystem in Java

    Adding code to create an actual working subsystem is very straightforward. For simple subsystems that don't use feedback it turns out to be extremely simple. In this section we will look at an example of a Claw subsystem that operates the motor for some amount of time to open or close a claw on the robot arm.

    Manual RobotBuilder
  • Updated on: Jan 20, 2023

    Generating Netbeans project files

    After you start getting a significant part of your robot designed in RobotBuilder you can generate a Java project for use with Netbeans. The code that is generated includes project files that will let you just open the project and start adding your robot specific code. In addition, if you later make changes in RobotBuilder, you can regenerate the project again and it will not overwrite your changes. This process is described in detail below.

    Manual RobotBuilder
  • More advanced subsystems will use sensors for feedback to get guaranteed results for operations like setting elevator heights or wrist angles. The PIDSubsystem has a built-in PIDController to automatically set the correct setpoints for these types of mechanisms.

    Manual RobotBuilder
  • Often you will want to run multiple commands, one after another to enable more complex behaviors in your program. Once each of the individual commands have been debugged, you can create a CommandGroup. A CommandGroup is a named set of commands that may be executed sequentially or in parallel.

    Manual RobotBuilder