Package trclib.drivebase
Class TrcDriveBase.Odometry
java.lang.Object
trclib.drivebase.TrcDriveBase.Odometry
- Enclosing class:
- TrcDriveBase
This class implements the drive base odometry. It consists of the position as well as velocity info in all
three degrees of movement (x, y, angle).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
This method creates and returns a copy of this odometry.(package private) void
setPositionAs
(TrcPose2D pose) This method sets the position info of the odometry to the given pose.(package private) void
setVelocityAs
(TrcPose2D pose) This method sets the velocity info of the odometry to the given pose.toString()
This method returns the string representation of the object.
-
Field Details
-
position
-
velocity
-
-
Constructor Details
-
Odometry
public Odometry()Constructor: Create an instance of the object. -
Odometry
Constructor: Create an instance of the object.- Parameters:
position
- specifies the initial position.velocity
- specifies the initial velocity.
-
-
Method Details
-
toString
This method returns the string representation of the object. -
clone
This method creates and returns a copy of this odometry. -
setPositionAs
This method sets the position info of the odometry to the given pose.- Parameters:
pose
- specifies the pose to set the position info to.
-
setVelocityAs
This method sets the velocity info of the odometry to the given pose.- Parameters:
pose
- specifies the pose to set the velocity info to.
-