Recent Updates
-
Writing the code for a PIDSubsystem in C++
Updated on: Jan 20, 2023
-
Writing the code for a command in C++
Updated on: Jan 20, 2023
-
Generating C++ code for a project
Updated on: Jan 20, 2023
-
Operating a PIDSubsystem from a command in Java
Updated on: Jan 20, 2023
<p>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 t... -
Writing the code for a PIDSubystem in Java
Updated on: Jan 20, 2023
<p>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... -
Writing the code for a simple command in Java
Updated on: Jan 20, 2023
<p>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 o... -
Writing the code for a subsystem in Java
Updated on: Jan 20, 2023
<p>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 o... -
Generating Netbeans project files
Updated on: Jan 20, 2023
<p>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 late... -
Using PIDSubsystems to control actuators with feedback from sensors
Updated on: Jan 20, 2023
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.
-
Creating a command that runs other commands
Updated on: Jan 20, 2023
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.