FieldObject2d

class wpilib.FieldObject2d

Bases: pybind11_builtins.pybind11_object

Game field object on a Field2d.

getPose(self: wpilib.FieldObject2d)wpimath.geometry.Pose2d

Get the pose.

Returns

2D pose, or 0,0,0 if unknown / does not exist

getPoses(*args, **kwargs)

Overloaded function.

  1. getPoses(self: wpilib._wpilib.FieldObject2d) -> List[wpimath.geometry._geometry.Pose2d]

Get multiple poses.

Parameters

obj – Object entry

Returns

vector of 2D poses

  1. getPoses(self: wpilib._wpilib.FieldObject2d, out: List[wpimath.geometry._geometry.Pose2d]) -> List[wpimath.geometry._geometry.Pose2d]

Get multiple poses.

Parameters
  • obj – Object entry

  • out – output SmallVector to hold 2D poses

Returns

ArrayRef referring to output SmallVector

setPose(*args, **kwargs)

Overloaded function.

  1. setPose(self: wpilib._wpilib.FieldObject2d, pose: wpimath.geometry._geometry.Pose2d) -> None

Set the pose from a Pose object.

Parameters

pose – 2D pose

  1. setPose(self: wpilib._wpilib.FieldObject2d, x: meters, y: 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(self: wpilib.FieldObject2d, poses: List[wpimath.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