RectangularRegionConstraint

class wpimath.trajectory.constraint.RectangularRegionConstraint(*args, **kwargs)

Bases: TrajectoryConstraint

Enforces a particular constraint only within a rectangular region.

Overloaded function.

  1. __init__(self: wpimath._controls._controls.constraint.RectangularRegionConstraint, bottomLeftPoint: wpimath.geometry._geometry.Translation2d, topRightPoint: wpimath.geometry._geometry.Translation2d, constraint: wpimath._controls._controls.constraint.TrajectoryConstraint) -> None

Constructs a new RectangularRegionConstraint.

Deprecated:

Use constructor taking Rectangle2d instead.

Parameters:
  • bottomLeftPoint – The bottom left point of the rectangular region in which to enforce the constraint.

  • topRightPoint – The top right point of the rectangular region in which to enforce the constraint.

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

  1. __init__(self: wpimath._controls._controls.constraint.RectangularRegionConstraint, rectangle: wpimath.geometry._geometry.Rectangle2d, constraint: wpimath._controls._controls.constraint.TrajectoryConstraint) -> None

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.geometry._geometry.Pose2d, curvature: wpimath.units.radians_per_meter, velocity: wpimath.units.meters_per_second) wpimath.units.meters_per_second
minMaxAcceleration(pose: wpimath.geometry._geometry.Pose2d, curvature: wpimath.units.radians_per_meter, speed: wpimath.units.meters_per_second) wpimath._controls._controls.constraint.TrajectoryConstraint.MinMax