public class Pose
extends java.lang.Object
Constructor and Description |
---|
Pose()
Makes new pose using current robot encoder values and angles.
|
Pose(double x,
double y,
double angle,
int leftEncoderPosition,
int rightEncoderPosition,
double leftVelocity,
double rightVelocity) |
Pose(double x,
double y,
double angle,
int leftEncoderPosition,
int rightEncoderPosition,
int leftVelocity,
int rightVelocity) |
Pose(long lEncoderTick,
long rEncoderTick,
double angle,
double leftVelocity,
double rightVelocity) |
Pose(long lEncoderTick,
long rEncoderTick,
double angle,
long currRobotX,
long currRobotY,
int leftVelocity,
int rightVelocity) |
Modifier and Type | Method and Description |
---|---|
double |
averagedAngle() |
Pose |
clone()
Returns a copy of this Pose
|
double |
getLeftEncoderTick()
The left tick value in Mustang Encoder ticks
|
double |
getLeftVelocity()
Gets the left side of the robot's velocity at the time of the pose in ticks/second using Mustang Encoder ticks
|
long |
getPosX()
The X Position in Mustang encoder ticks
|
long |
getPosY()
The Y Position in Mustang Encoder ticks
|
double |
getRightEncoderTick()
The right tick value in Mustang Encoder ticks
|
double |
getRightVelocity()
Gets the right side of the robot's velocity at the time of the pose in ticks/second using Mustang Encoder ticks
|
double |
getRobotAngle() |
long |
getTimeOfPose() |
void |
update() |
void |
update(long newLeftEncoderTick,
long newRightEncoderTick,
double newAngle,
double leftVelocity,
double rightVelocity)
Updates the Pose's position and angle corresponding to the drivebase's ticks
and NavX gyro reading.
|
public Pose()
public Pose(long lEncoderTick, long rEncoderTick, double angle, double leftVelocity, double rightVelocity)
lEncoderTick
- Encoder ticks -> forward = positive, backwards = negativerEncoderTick
- Encoder ticks -> forward = positive, backwards = negativeangle
- Angle in degrees -> left = negative, right = positivepublic Pose(double x, double y, double angle, int leftEncoderPosition, int rightEncoderPosition, int leftVelocity, int rightVelocity)
public Pose(double x, double y, double angle, int leftEncoderPosition, int rightEncoderPosition, double leftVelocity, double rightVelocity)
public Pose(long lEncoderTick, long rEncoderTick, double angle, long currRobotX, long currRobotY, int leftVelocity, int rightVelocity)
public void update(long newLeftEncoderTick, long newRightEncoderTick, double newAngle, double leftVelocity, double rightVelocity)
public void update()
public long getPosX()
public long getPosY()
public double getLeftEncoderTick()
public double getRightEncoderTick()
public double getRobotAngle()
public long getTimeOfPose()
public double getLeftVelocity()
public double getRightVelocity()
public double averagedAngle()
public Pose clone()
clone
in class java.lang.Object