Robotsystem of the Robot Group Leipzig: AxisOrientationSensor Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# AxisOrientationSensor Class Reference

Class for sensing the axis orienation of a primitive (robot). More...

`#include <axisorientationsensor.h>`

Inherits Sensor.

Inheritance diagram for AxisOrientationSensor:

[legend]
Collaboration diagram for AxisOrientationSensor:

[legend]
List of all members.

## Public Types
| OnlyZAxis
| Z axis in word coordinated (Dimension select components of this vector).
| ZProjection
| z-component of each axis (Dimension select components of this vector)
| Axis
| for each dimension one orienation vector, i.e. for X | Y | Z it is a 3x3 rotation matrix
enum | Mode { OnlyZAxis, ZProjection, Axis }
| Sensor mode. More...
## Public Member Functions
| AxisOrientationSensor (Mode mode, short dimensions=X|Y|Z)
virtual | ~AxisOrientationSensor ()
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< sensor > | get () 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

## Detailed Description

Class for sensing the axis orienation of a primitive (robot).

Examples:

  template_sphererobot/main.cpp.

## Member Enumeration Documentation

enum Mode

Sensor mode.

Enumerator:

  OnlyZAxis | Z axis in word coordinated (Dimension select components of this vector).
  ZProjection | z-component of each axis (Dimension select components of this vector)
  Axis | for each dimension one orienation vector, i.e. for X | Y | Z it is a 3x3 rotation matrix

## Constructor & Destructor Documentation

AxisOrientationSensor | ( | Mode | mode,
|  | short | dimensions = `X|Y|Z` |
| ) |  |  |

Parameters:

  | mode | how to measure the axis orientation
  | dimensions | bit mask for the dimensions to sense. Default: X | Y | Z (all dimensions)

See also:
  Sensor::Dimensions

  Mode

virtual ~AxisOrientationSensor | ( |  | ) | `[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.

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.

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

- axisorientationsensor.h
- axisorientationsensor.cpp