TrapezoidProfileSubsystem
- class commands2.TrapezoidProfileSubsystem(*arg, **kwargs)[source]
Bases:
Subsystem
A subsystem that generates and runs trapezoidal motion profiles automatically. The user specifies how to use the current state of the motion profile by overriding the useState method.
Creates a new TrapezoidProfileSubsystem.
- Parameters:
constraints – The constraints (maximum velocity and acceleration) for the profiles.
initial_position – The initial position of the controlled mechanism when the subsystem is constructed.
period – The period of the main robot loop, in seconds.
- periodic()[source]
Executes the TrapezoidProfileSubsystem logic during each periodic update.
This method is called synchronously from the subsystem’s periodic() method.