Class FieldObject2d
java.lang.Object
org.wpilib.smartdashboard.FieldObject2d
Game field object on a Field2d.
-
Method Summary
Modifier and TypeMethodDescriptiongetPose()Get the pose.getPoses()Get multiple poses.voidsetPose(double x, double y, Rotation2d rotation) Set the pose from x, y, and rotation.voidSet the pose from a Pose object.voidsetPose(Distance x, Distance y, Rotation2d rotation) Set the pose from x, y, and rotation.voidSet multiple poses from a list of Pose objects.voidSet multiple poses from a list of Pose objects.<SampleType extends HolonomicSample>
voidsetTrajectory(Trajectory<SampleType> trajectory) Sets poses from a trajectory.
-
Method Details
-
setPose
-
setPose
Set the pose from x, y, and rotation.- Parameters:
x- X location, in metersy- Y location, in metersrotation- rotation
-
setPose
Set the pose from x, y, and rotation.- Parameters:
x- X locationy- Y locationrotation- rotation
-
getPose
-
setPoses
-
setPoses
Set multiple poses from a list of Pose objects. The total number of poses is limited to 85.- Parameters:
poses- list of 2D poses
-
setTrajectory
Sets poses from a trajectory.- Type Parameters:
SampleType- The type of the trajectory sample.- Parameters:
trajectory- The trajectory from which the poses should be added.
-
getPoses
-