EllipticalRegionConstraint

class wpimath.trajectory.constraint.EllipticalRegionConstraint(center: wpimath.geometry._geometry.Translation2d, xWidth: wpimath.units.meters, yWidth: wpimath.units.meters, rotation: wpimath.geometry._geometry.Rotation2d, constraint: wpimath._controls._controls.constraint.TrajectoryConstraint)

Bases: TrajectoryConstraint

Enforces a particular constraint only within an elliptical region.

Constructs a new EllipticalRegionConstraint.

Parameters:
  • center – The center of the ellipse in which to enforce the constraint.

  • xWidth – The width of the ellipse in which to enforce the constraint.

  • yWidth – The height of the ellipse in which to enforce the constraint.

  • rotation – The rotation to apply to all radii around the origin.

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

static fromFeet(center: wpimath.geometry._geometry.Translation2d, xWidth: wpimath.units.feet, yWidth: wpimath.units.feet, rotation: wpimath.geometry._geometry.Rotation2d, constraint: wpimath._controls._controls.constraint.TrajectoryConstraint) wpimath._controls._controls.constraint.EllipticalRegionConstraint
isPoseInRegion(pose: wpimath.geometry._geometry.Pose2d) bool

Returns whether the specified robot pose is within the region that the constraint is enforced in.

Parameters:

pose – The robot pose.

Returns:

Whether the robot pose is within the constraint 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