FRC 4481 Team Rembrandts | 2024 Build Thread | Open Alliance

Shamper Software

Since the software sub-department got hold of the robot last Sunday, major steps have been made towards properly tuning and automating the Shamper on the alpha bot.

Automation

A big goal for software is making the robot as easy to control as possible. Matches can be super stressful and require a high amount of concentration. As a driver, you don’t want to have to memorize a complex sequence of buttons to control everything. That’s why everything will be mostly automated.

State Machines

Just like our arm from last year, the Shamper is controlled by several state machines. States are manipulated either inside the subsystem itself (sensor values) or through a controller layout (driver/operator interaction). Based on a combination of current states, the robot behaviour will change. Separation of the state machine logic and the individual states greatly decreases complexity in the system. Allowing for less errors and easier debugging. The system currently contains the following state machines:

  • Control State

    • Disabled – disables all motors and puts the system in coast mode
    • Manual – wheel velocity and pivot angle are based on predefined discrete setpoints
    • Automatic – wheel velocity and pivot angle are based on interpolated values from a lookup table
  • Movement State

    • On Target – The error of the system is within the required margin (safe to shoot)
    • Moving – The error is too big, should not be allowed to shoot
  • Position/Velocity State

    • set of states representing the angle and RPM setpoints of the system. Only used in Manual mode

More on this will probably follow in a future episode of the OA show

Motion Control

For the control of the pivot, we implemented a WPILib trapezoidal motion profile as this allows for easier optimization. Once the pivot is tuned to follow one profile, it can easily be adjusted to other profiles if needed. This is especially useful for larger movements such as quickly pointing the entire Shamper upwards for amping.

However, we noticed that this makes the pivot rather jittery for smaller movements. That’s why we’ll disable the motor profile for smaller angles, as well as our auto aim mode. The jittery motion can be seen in the test below:

After removing the jitter, the auto aim looks something like this:

Future Steps

The rest of the week will be spent tuning auto modes as well as “drive by” shooting. So definitely expect some videos of that during the weekend!


“Ik weet niet wat het is, maar het is tuning dus het moet erop”
~ Jochem, Lead Software


Written by:
@Nigelientje - Lead Outreach / Software Mentor
@Jochem - Lead Software

27 Likes