Package trclib.sensor
Class TrcOdometrySensor.Odometry
java.lang.Object
trclib.sensor.TrcOdometrySensor.Odometry
- Enclosing interface:
- TrcOdometrySensor
This class implements the generic sensor odometry. It consists of the position, velocity as well as
acceleration info. If the sensor does not support velocity data. This class keeps track of the previous
timestamp and position so we can calculate the velocity ourselves.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondouble
double
double
double
double
double
private static final boolean
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
VERBOSE
private static final boolean VERBOSE- See Also:
-
sensor
-
prevTimestamp
public double prevTimestamp -
currTimestamp
public double currTimestamp -
prevPos
public double prevPos -
currPos
public double currPos -
velocity
public double velocity -
acceleration
public double acceleration
-
-
Constructor Details
-
Odometry
public Odometry(Object sensor, double prevTimestamp, double currTimestamp, double prevPos, double currPos, double velocity, double acceleration) Constructor: Create an instance of the object.- Parameters:
sensor
- specifies the sensor object.prevTimestamp
- specifies the timestamp of the previous data.currTimestamp
- specifies the timestamp of the current data.prevPos
- specifies the previous position data.currPos
- specifies the current position data.velocity
- specifies the velocity data. This data may be considered redundant because one can derive velocity from (deltaPosition/deltaTime). However, some sensors may support velocity data, so this field may contain sensor reported velocity or derived velocity.acceleration
- specifies the acceleration data. This data may be considered redundant because one can derive velocity from (deltaVelocity/deltaTime). However, some sensors may support acceleration data, so this field may contain sensor reported acceleration or derived acceleration.
-
Odometry
Constructor: Create an instance of the object.- Parameters:
sensor
- specifies the sensor object.
-
-
Method Details