Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

OdometrySensor Struct Reference

Odometry is presently only used for the Create robot, which reports cumulative distances and angles. More...

#include <SensorInfo.h>

Inheritance diagram for OdometrySensor:

Detailed Description

Odometry is presently only used for the Create robot, which reports cumulative distances and angles.

Definition at line 173 of file SensorInfo.h.

List of all members.

Public Member Functions

 OdometrySensor ()
 constructor
 OdometrySensor (const OdometrySensor &s)
 copy constructor for cloning
virtual void declareValues (DynamicRobotState &values)
 Subclass should add name/value pairs to the dictionary to allow variable number of values per Sensor, as well as fast filtering and serialization to subscribers.
virtual void reclaimValues (DynamicRobotState &values)
 Subclass should remove values added via previous declareValues().
virtual OdometrySensorclone () const __attribute__((warn_unused_result))
 clone implementation for Dictionary

Public Attributes

plist::Primitive< std::string > forwardSensorName
 Name of the sensor instance, to match up with the sensorNames[] in RobotInfo header.
plist::Primitive< std::string > leftSensorName
 Name of the sensor instance, to match up with the sensorNames[] in RobotInfo header.
plist::Primitive< std::string > upSensorName
 Name of the sensor instance, to match up with the sensorNames[] in RobotInfo header.
plist::Primitive< std::string > headingSensorName
 Name of the sensor instance, to match up with the sensorNames[] in RobotInfo header.
plist::Primitive< std::string > leftEncoderSensorName
 Name of the left encoder instance, to match up with the SensorNames[] in RobotInfo header.
plist::Primitive< std::string > rightEncoderSensorName
 Name of the right encoder instance, to match up with the SensorNames[] in RobotInfo header.
float lastX
 previous displacement along the X axis
float lastY
 previous displacement along the Y axis
float lastZ
 previous displacement along the Z axis
float lastHeading
 previous heading
float deltaX
 current displacement along the X axis
float deltaY
 current displacement along the Y axis
float deltaZ
 current displacement along the Z axis
float deltaHeading
 current heading change
plist::Primitive< floatcumX
 cumulative displacement along the X axis
plist::Primitive< floatcumY
 cumulative displacement along the Y axis
plist::Primitive< floatcumZ
 cumulative displacement along the Z axis
plist::Primitive< floatcumHeading
 cumulative heading change
plist::Primitive< floatwheelCircumference
 wheel circumference in mm (72.0 for Create2)
plist::Primitive< floatwheelBase
 wheel base in mm (235.0 for Create2)
plist::Primitive< floatencoderTicksPerRev
 number of encoder ticks per revolution (508.8 for Create2)
plist::Primitive< floatleftEncoder
 left encoder value for Create-like robots
plist::Primitive< floatrightEncoder
 rightencoder value for Create-like robots

Static Public Attributes

static const std::string autoRegister = FamilyFactory<SensorInfo>::getRegistry().registerType<OdometrySensor>("Odometry")
 Provides registration with FamilyFactory<SensorInfo>

Protected Member Functions

void init ()
 performs common initialization

Constructor & Destructor Documentation

OdometrySensor::OdometrySensor (  ) 

constructor

Definition at line 175 of file SensorInfo.h.

OdometrySensor::OdometrySensor ( const OdometrySensor s  ) 

copy constructor for cloning

Definition at line 186 of file SensorInfo.h.


Member Function Documentation

OdometrySensor * OdometrySensor::clone (  )  const [virtual]

clone implementation for Dictionary

implements the clone function for dictionary

Implements SensorInfo.

Definition at line 12 of file SensorInfo.cc.

virtual void OdometrySensor::declareValues ( DynamicRobotState values  )  [virtual]

Subclass should add name/value pairs to the dictionary to allow variable number of values per Sensor, as well as fast filtering and serialization to subscribers.

A reference to a permanent plist::Primitive<float> instance should be added, this is how values are extracted from the sensor via this shared value.

Implements SensorInfo.

Definition at line 196 of file SensorInfo.h.

void OdometrySensor::init (  )  [protected]

performs common initialization

Reimplemented from SensorInfo.

Definition at line 253 of file SensorInfo.h.

Referenced by OdometrySensor().

virtual void OdometrySensor::reclaimValues ( DynamicRobotState values  )  [virtual]

Subclass should remove values added via previous declareValues().

Implements SensorInfo.

Definition at line 211 of file SensorInfo.h.


Member Data Documentation

const std::string OdometrySensor::autoRegister = FamilyFactory<SensorInfo>::getRegistry().registerType<OdometrySensor>("Odometry") [static]

Provides registration with FamilyFactory<SensorInfo>

Definition at line 249 of file SensorInfo.h.

cumulative heading change

Definition at line 243 of file SensorInfo.h.

Referenced by declareValues().

cumulative displacement along the X axis

Definition at line 240 of file SensorInfo.h.

Referenced by declareValues().

cumulative displacement along the Y axis

Definition at line 241 of file SensorInfo.h.

Referenced by declareValues().

cumulative displacement along the Z axis

Definition at line 242 of file SensorInfo.h.

Referenced by declareValues().

current heading change

Definition at line 239 of file SensorInfo.h.

current displacement along the X axis

Definition at line 236 of file SensorInfo.h.

current displacement along the Y axis

Definition at line 237 of file SensorInfo.h.

current displacement along the Z axis

Definition at line 238 of file SensorInfo.h.

number of encoder ticks per revolution (508.8 for Create2)

Definition at line 246 of file SensorInfo.h.

Referenced by init().

Name of the sensor instance, to match up with the sensorNames[] in RobotInfo header.

Definition at line 226 of file SensorInfo.h.

Referenced by declareValues(), init(), and reclaimValues().

Name of the sensor instance, to match up with the sensorNames[] in RobotInfo header.

Definition at line 229 of file SensorInfo.h.

Referenced by declareValues(), init(), and reclaimValues().

previous heading

Definition at line 235 of file SensorInfo.h.

previous displacement along the X axis

Definition at line 232 of file SensorInfo.h.

previous displacement along the Y axis

Definition at line 233 of file SensorInfo.h.

previous displacement along the Z axis

Definition at line 234 of file SensorInfo.h.

left encoder value for Create-like robots

Definition at line 247 of file SensorInfo.h.

Referenced by declareValues().

Name of the left encoder instance, to match up with the SensorNames[] in RobotInfo header.

Definition at line 230 of file SensorInfo.h.

Referenced by declareValues(), init(), and reclaimValues().

Name of the sensor instance, to match up with the sensorNames[] in RobotInfo header.

Definition at line 227 of file SensorInfo.h.

Referenced by declareValues(), init(), and reclaimValues().

rightencoder value for Create-like robots

Definition at line 248 of file SensorInfo.h.

Referenced by declareValues().

Name of the right encoder instance, to match up with the SensorNames[] in RobotInfo header.

Definition at line 231 of file SensorInfo.h.

Referenced by declareValues(), init(), and reclaimValues().

Name of the sensor instance, to match up with the sensorNames[] in RobotInfo header.

Definition at line 228 of file SensorInfo.h.

Referenced by declareValues(), init(), and reclaimValues().

wheel base in mm (235.0 for Create2)

Definition at line 245 of file SensorInfo.h.

Referenced by init().

wheel circumference in mm (72.0 for Create2)

Definition at line 244 of file SensorInfo.h.

Referenced by init().


The documentation for this struct was generated from the following files:

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:13 2016 by Doxygen 1.6.3