EllipticalRegionConstraint
- class wpimath.trajectory.constraint.EllipticalRegionConstraint(center: wpimath.geometry._geometry.Translation2d, xWidth: meters, yWidth: meters, rotation: wpimath.geometry._geometry.Rotation2d, 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: feet, yWidth: feet, rotation: wpimath.geometry._geometry.Rotation2d, 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: radians_per_meter, velocity: meters_per_second) meters_per_second
- minMaxAcceleration(pose: wpimath.geometry._geometry.Pose2d, curvature: radians_per_meter, speed: meters_per_second) wpimath._controls._controls.constraint.TrajectoryConstraint.MinMax