RectangularRegionConstraint

class wpimath.RectangularRegionConstraint(rectangle: wpimath._wpimath.Rectangle2d, constraint: wpimath._wpimath.TrajectoryConstraint)

Bases: TrajectoryConstraint

Enforces a particular constraint only within a rectangular region.

Constructs a new RectangularRegionConstraint.

Parameters:
  • rectangle – The rectangular region in which to enforce the constraint.

  • constraint – The constraint to enforce when the robot is within the region.

maxVelocity(pose: wpimath._wpimath.Pose2d, curvature: wpimath.units.radians_per_meter, velocity: wpimath.units.meters_per_second) wpimath.units.meters_per_second
minMaxAcceleration(pose: wpimath._wpimath.Pose2d, curvature: wpimath.units.radians_per_meter, velocity: wpimath.units.meters_per_second) wpimath._wpimath.TrajectoryConstraint.MinMax