FieldObject2d
- class wpilib.FieldObject2d
Bases:
pybind11_object
Game field object on a Field2d.
- getPose() wpimath.geometry._geometry.Pose2d
Get the pose.
- Returns:
2D pose, or 0,0,0 if unknown / does not exist
- getPoses() list[wpimath.geometry._geometry.Pose2d]
Get multiple poses.
- Returns:
vector of 2D poses
- setPose(*args, **kwargs)
Overloaded function.
setPose(self: wpilib._wpilib.FieldObject2d, pose: wpimath.geometry._geometry.Pose2d) -> None
Set the pose from a Pose object.
- Parameters:
pose – 2D pose
setPose(self: wpilib._wpilib.FieldObject2d, x: wpimath.units.meters, y: wpimath.units.meters, rotation: wpimath.geometry._geometry.Rotation2d) -> None
Set the pose from x, y, and rotation.
- Parameters:
x – X location
y – Y location
rotation – rotation
- setPoses(poses: List[wpimath.geometry._geometry.Pose2d]) None
Set multiple poses from an array of Pose objects. The total number of poses is limited to 85.
- Parameters:
poses – array of 2D poses
- setTrajectory(trajectory: wpimath._controls._controls.trajectory.Trajectory) None
Sets poses from a trajectory.
- Parameters:
trajectory – The trajectory from which poses should be added.