Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages | Examples

AiboSensor Class Reference

#include <aibosensor.h>

Collaboration diagram for AiboSensor:

Collaboration graph
[legend]

Public Member Functions

 AiboSensor ()
virtual ~AiboSensor ()
OPrimitiveID GetPrimitiveID (SENSOR sensor) const
Methods for initialization
bool Initialized () const
void InitSensorIndex (OSensorFrameVectorData *sensorVec)
Methods for terminal output
void PrintSensorValues (OSensorFrameVectorData *sensorVec)
void PrintSensorValue (OSensorFrameVectorData *sensorVec, SENSOR sens)
void PrintJointValue (OSensorFrameVectorData *sensorVec, JOINT_SENSOR joint)
void PrintSeparator () const
Methods for sensor access
slongword GetSensorValue (OSensorFrameVectorData *sensorVec, SENSOR sens)
slongword GetMeanSensorValue (OSensorFrameVectorData *sensorVec, SENSOR index, int numFrames)
double GetDistance (OSensorFrameVectorData *sensorVec)
double GetMeanDistance (OSensorFrameVectorData *sensorVec, int numFrames)
double GetJointValue (OSensorFrameVectorData *sensorVec, JOINT_SENSOR joint)
double GetMeanJointValue (OSensorFrameVectorData *sensorVec, JOINT_SENSOR joint, int numFrames)
double GetRefJointValue (OSensorFrameVectorData *sensorVec, JOINT_SENSOR joint)
double GetMeanRefJointValue (OSensorFrameVectorData *sensorVec, JOINT_SENSOR joint, int numFrames)
double GetTemp (OSensorFrameVectorData *sensorVec)
double GetMeanTemp (OSensorFrameVectorData *sensorVec, int numFrames)
double GetXAccel (OSensorFrameVectorData *sensorVec)
double GetMeanXAccel (OSensorFrameVectorData *sensorVec, int numFrames)
double GetYAccel (OSensorFrameVectorData *sensorVec)
double GetMeanYAccel (OSensorFrameVectorData *sensorVec, int numFrames)
double GetZAccel (OSensorFrameVectorData *sensorVec)
double GetMeanZAccel (OSensorFrameVectorData *sensorVec, int numFrames)
bool IsPressed (OSensorFrameVectorData *sensorVec, SWITCH sw)

Protected Attributes

bool SensorIndexInitialized
int SensorIndex [NUM_SENSORS]
OPrimitiveID SensorID [NUM_SENSORS]

Detailed Description

A class for simplified Aibo Sensor access
Examples:

SensorsExample.h.


Constructor & Destructor Documentation

AiboSensor::AiboSensor  ) 
 

default constructor

virtual AiboSensor::~AiboSensor  )  [inline, virtual]
 

default destructor


Member Function Documentation

bool AiboSensor::Initialized  )  const [inline]
 

Returns if the class is initialized or not

Returns:
bool value of initialization

void AiboSensor::InitSensorIndex OSensorFrameVectorData *  sensorVec  ) 
 

Initializes the sensor Index

Parameters:
sensorVec robot sensor data

void AiboSensor::PrintSensorValues OSensorFrameVectorData *  sensorVec  ) 
 

Prints the last frame of all sensor values on terminal

Parameters:
sensorVec robot sensor data

Here is the call graph for this function:

void AiboSensor::PrintSensorValue OSensorFrameVectorData *  sensorVec,
SENSOR  sens
 

Prints the last frame of sensor values of the sensor corresponding to index on terminal

Parameters:
sensorVec robot sensor data
sens index of the sensor
See also:
SENSOR

Here is the call graph for this function:

void AiboSensor::PrintJointValue OSensorFrameVectorData *  sensorVec,
JOINT_SENSOR  joint
 

Special output method for joint values. Prints the last frame of sensor values of the sensor corresponding to index on terminal

Parameters:
sensorVec robot sensor data
joint index of the joint sensor
See also:
JOINT_SENSOR

Here is the call graph for this function:

void AiboSensor::PrintSeparator  )  const
 

Prints a dashed line to terminal

slongword AiboSensor::GetSensorValue OSensorFrameVectorData *  sensorVec,
SENSOR  sens
 

Returns the last sensor value for the sensor corresponding to index. UNIT: corresponding to the sensor. See Aibo documentation for details.

Parameters:
sensorVec Vector of sensor data
sens index of the sensor
See also:
SENSOR
Returns:
the last value of the sensor. UNIT: corresponding to the sensor

slongword AiboSensor::GetMeanSensorValue OSensorFrameVectorData *  sensorVec,
SENSOR  index,
int  numFrames
 

Returns the mean sensor value for the sensor corresponding to index. If you want to get more than 4 values for mean value calculation, you should tell this "OSensorFrameInfo" in your program!!!

Parameters:
sensorVec Vector of sensor data
index index of the sensor
See also:
SENSOR
Parameters:
numFrames number of frames considered for mean value calculation
Returns:
the mean value of the sensor. UNIT: corresponding to the sensor

double AiboSensor::GetDistance OSensorFrameVectorData *  sensorVec  )  [inline]
 

Returns the last sensor value for the PSD (IR-Sensor)

Parameters:
sensorVec Vector of sensor data
Returns:
the last distance value. UNIT: mm

Here is the call graph for this function:

double AiboSensor::GetMeanDistance OSensorFrameVectorData *  sensorVec,
int  numFrames
[inline]
 

Returns the last sensor value for the PSD (IR-Sensor)

Parameters:
sensorVec Vector of sensor data
numFrames number of frames considered for mean value calculation
Returns:
the mean distance value. UNIT:mm

Here is the call graph for this function:

double AiboSensor::GetJointValue OSensorFrameVectorData *  sensorVec,
JOINT_SENSOR  joint
[inline]
 

Returns the last joint value for the joint corresponding to index. UNIT:rad

Parameters:
sensorVec Vector of sensor data
joint index of the joint sensor
See also:
JOINT_SENSOR
Returns:
the last joint value. UNIT: rad

Here is the call graph for this function:

double AiboSensor::GetMeanJointValue OSensorFrameVectorData *  sensorVec,
JOINT_SENSOR  joint,
int  numFrames
[inline]
 

Returns the mean joint value for the joint corresponding to index

Parameters:
sensorVec Vector of sensor data
joint index of the joint sensor
See also:
JOINT_SENSOR
Parameters:
numFrames number of frames considered for mean value calculation
Returns:
the mean joint value. UNIT: rad

Here is the call graph for this function:

double AiboSensor::GetRefJointValue OSensorFrameVectorData *  sensorVec,
JOINT_SENSOR  joint
 

Returns the last reference joint value for the joint corresponding to index. UNIT:rad

Parameters:
sensorVec Vector of sensor data
joint index of the joint sensor
See also:
JOINT_SENSOR
Returns:
the last joint value. UNIT: rad

double AiboSensor::GetMeanRefJointValue OSensorFrameVectorData *  sensorVec,
JOINT_SENSOR  joint,
int  numFrames
 

Returns the mean reference joint value for the joint corresponding to index

Parameters:
sensorVec Vector of sensor data
joint index of the joint sensor
See also:
JOINT_SENSOR
Parameters:
numFrames number of frames considered for mean value calculation
Returns:
the mean joint value. UNIT: rad

double AiboSensor::GetTemp OSensorFrameVectorData *  sensorVec  )  [inline]
 

Returns the last temperature value.

Parameters:
sensorVec Vector of sensor data
Returns:
the last temperature value UNIT: deg C

Here is the call graph for this function:

double AiboSensor::GetMeanTemp OSensorFrameVectorData *  sensorVec,
int  numFrames
[inline]
 

Returns the mean temperature value over numFrames.

Parameters:
sensorVec Vector of sensor data
numFrames number of frames considered for mean value calculation
Returns:
the mean temperature value UNIT: deg C

Here is the call graph for this function:

double AiboSensor::GetXAccel OSensorFrameVectorData *  sensorVec  )  [inline]
 

Returns the acceleration value for X-Axis.

Parameters:
sensorVec Vector of sensor data
Returns:
the value of the acceleration sensor. UNIT:$ m/sec^2 $

Here is the call graph for this function:

double AiboSensor::GetMeanXAccel OSensorFrameVectorData *  sensorVec,
int  numFrames
[inline]
 

Returns the mean acceleration value for X-Axis over numFrames.

Parameters:
sensorVec Vector of sensor data
numFrames number of frames considered for mean value calculation
Returns:
the mean value of the acceleration sensor. UNIT:$ m/sec^2 $

Here is the call graph for this function:

double AiboSensor::GetYAccel OSensorFrameVectorData *  sensorVec  )  [inline]
 

Returns the acceleration value for Y-Axis.

Parameters:
sensorVec Vector of sensor data
Returns:
the value of the acceleration sensor. UNIT:$ m/sec^2 $

Here is the call graph for this function:

double AiboSensor::GetMeanYAccel OSensorFrameVectorData *  sensorVec,
int  numFrames
[inline]
 

Returns the mean acceleration value for Y-Axis over numFrames.

Parameters:
sensorVec Vector of sensor data
numFrames number of frames considered for mean value calculation
Returns:
the mean value of the acceleration sensor. UNIT:$ m/sec^2 $

Here is the call graph for this function:

double AiboSensor::GetZAccel OSensorFrameVectorData *  sensorVec  )  [inline]
 

Returns the acceleration value for Z-Axis.

Parameters:
sensorVec Vector of sensor data
Returns:
the value of the acceleration sensor. UNIT:$ m/sec^2 $

Here is the call graph for this function:

double AiboSensor::GetMeanZAccel OSensorFrameVectorData *  sensorVec,
int  numFrames
[inline]
 

Returns the mean acceleration value for Z-Axis over numFrames.

Parameters:
sensorVec Vector of sensor data
numFrames number of frames considered for mean value calculation
Returns:
the mean value of the acceleration sensor. UNIT:$ m/sec^2 $

Here is the call graph for this function:

bool AiboSensor::IsPressed OSensorFrameVectorData *  sensorVec,
SWITCH  sw
[inline]
 

Returns weather the switch corresponding to index is pressed or not

Parameters:
sensorVec Vector of sensor data
sw Index of switch
Returns:
the pressed result at bool value

Here is the call graph for this function:

OPrimitiveID AiboSensor::GetPrimitiveID SENSOR  sensor  )  const [inline]
 

Returns the OPrimitiveID of the sensor

Parameters:
sensor 
Returns:
the primitive id for the sensor


Field Documentation

bool AiboSensor::SensorIndexInitialized [protected]
 

Is the sensor index, which holds the correspondencies between SensorID und CommandVector initialiesd?

int AiboSensor::SensorIndex[NUM_SENSORS] [protected]
 

Index of sensors for correspondencies between SenosrID and CommandVector.

OPrimitiveID AiboSensor::SensorID[NUM_SENSORS] [protected]
 

Array for the PrimitiveID's of the sensors


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

tams Tim Baier AiboLib v0.2.4
Generated Thu Jan 19 11:56:04 2006 by doxygen 1.4.3