Package ftclib.sensor
Class FtcPinpointOdometry
java.lang.Object
ftclib.sensor.FtcPinpointOdometry
- All Implemented Interfaces:
TrcDriveBaseOdometry
This class implements a wrapper to the GoBilda Pinpoint Odometry Computer that supports two Odometry wheels and
a built-in IMU.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final GoBildaPinpointDriver
final TrcDbgTrace
-
Constructor Summary
ConstructorsConstructorDescriptionFtcPinpointOdometry
(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap, String instanceName, FtcPinpointOdometry.Config config) Constructor: Creates an instance of the object.FtcPinpointOdometry
(String instanceName, FtcPinpointOdometry.Config config) Constructor: Creates an instance of the object. -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the DriveBase position.This method returns the DriveBase velocity.void
reset()
This method resets the DriveBase position.void
setPosition
(TrcPose2D pose) This method sets the DriveBase position.toString()
This method returns the instance name.void
This method is called once at the beginning of the INPUT_TASK loop.
-
Field Details
-
tracer
-
instanceName
-
ppOdo
-
-
Constructor Details
-
FtcPinpointOdometry
public FtcPinpointOdometry(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap, String instanceName, FtcPinpointOdometry.Config config) Constructor: Creates an instance of the object.- Parameters:
hardwareMap
- specifies the global hardware map.instanceName
- specifies the instance name.config
- specifies the sensor configuration.
-
FtcPinpointOdometry
Constructor: Creates an instance of the object.- Parameters:
instanceName
- specifies the instance name.config
- specifies the sensor configuration.
-
-
Method Details
-
toString
This method returns the instance name. -
updateCache
public void updateCache()This method is called once at the beginning of the INPUT_TASK loop. Odometry device can update their cache at this time.- Specified by:
updateCache
in interfaceTrcDriveBaseOdometry
-
reset
public void reset()This method resets the DriveBase position.- Specified by:
reset
in interfaceTrcDriveBaseOdometry
-
getPosition
This method returns the DriveBase position.- Specified by:
getPosition
in interfaceTrcDriveBaseOdometry
- Returns:
- DriveBase position.
-
setPosition
This method sets the DriveBase position.- Specified by:
setPosition
in interfaceTrcDriveBaseOdometry
- Parameters:
pose
- specifies the DriveBase position.
-
getVelocity
This method returns the DriveBase velocity.- Specified by:
getVelocity
in interfaceTrcDriveBaseOdometry
- Returns:
- DriveBase velocity.
-