SpeedSensor Class Reference

Class for speed sensing of robots. More...

#include <speedsensor.h>

Inherits Sensor.

Inheritance diagram for SpeedSensor:

Inheritance graph
[legend]
Collaboration diagram for SpeedSensor:

Collaboration graph
[legend]
List of all members.

Public Types

 Translational
 measures translational speed in world coordinates (Linear velocity)
 TranslationalRel
 measures translational speed in body coordinates (Linear velocity)
 Rotational
 measures roational velocity around the world axis
 RotationalRel
 measures roational velocity around the body axis
enum  Mode { Translational, TranslationalRel, Rotational, RotationalRel }
 Sensor mode. More...

Public Member Functions

 SpeedSensor (double maxSpeed, Mode mode=Translational, short dimensions=X|Y|Z)
virtual ~SpeedSensor ()
virtual void init (Primitive *own)
 initialises sensor with body of robot.
virtual int getSensorNumber () const
 returns the number of sensors values produced by this sensor
virtual bool sense (const GlobalData &globaldata)
 performs sense action
virtual std::list< sensorget () const
 returns a list of sensor values (usually in the range [0,1] )
virtual int get (sensor *sensors, int length) const
 writes the sensor values (usually in the range [0,1] ) into the giben sensor array and returns the number of sensors written

Protected Member Functions

matrix::Matrix getSenseMatrix () const

Protected Attributes

double maxSpeed
Mode mode
short dimensions
Primitiveown

Detailed Description

Class for speed sensing of robots.

The sensor values are normalised speeds, either translational or rotational


Member Enumeration Documentation

enum Mode

Sensor mode.

Enumerator:
Translational  measures translational speed in world coordinates (Linear velocity)
TranslationalRel  measures translational speed in body coordinates (Linear velocity)
Rotational  measures roational velocity around the world axis
RotationalRel  measures roational velocity around the body axis


Constructor & Destructor Documentation

SpeedSensor ( double  maxSpeed,
Mode  mode = Translational,
short  dimensions = X|Y|Z 
)

Parameters:
maxSpeed maximal speed that is expected used for normalisation of sensor value
dimensions bit mask for the dimensions to sense. Default: X | Y | Z (all dimensions)
See also:
Dimensions

virtual ~SpeedSensor (  )  [inline, virtual]


Member Function Documentation

int get ( sensor sensors,
int  length 
) const [virtual]

writes the sensor values (usually in the range [0,1] ) into the giben sensor array and returns the number of sensors written

Parameters:
sensors call by refernce array which received the values
length capacity of sensors array
Returns:
number of sensor values written

Implements Sensor.

std::list< sensor > get (  )  const [virtual]

returns a list of sensor values (usually in the range [0,1] )

Implements Sensor.

Matrix getSenseMatrix (  )  const [protected]

int getSensorNumber (  )  const [virtual]

returns the number of sensors values produced by this sensor

Implements Sensor.

void init ( Primitive own  )  [virtual]

initialises sensor with body of robot.

This is usually done by the robot itself.

Implements Sensor.

bool sense ( const GlobalData globaldata  )  [virtual]

performs sense action

Implements Sensor.


Member Data Documentation

short dimensions [protected]

double maxSpeed [protected]

Mode mode [protected]

Primitive* own [protected]


The documentation for this class was generated from the following files:
Generated on Fri Oct 30 16:29:04 2009 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.4.7