Fawkes API  Fawkes Development Version
fawkes::Position3DInterface Class Reference

Position3DInterface Fawkes BlackBoard Interface. More...

#include <>>

Inheritance diagram for fawkes::Position3DInterface:

List of all members.

Classes

struct  Position3DInterface_data_t
 Internal data storage, do NOT modify! More...

Public Member Functions

virtual bool message_valid (const Message *message) const
 Check if message is valid and can be enqueued.
char * frame () const
 Get frame value.
void set_frame (const char *new_frame)
 Set frame value.
size_t maxlenof_frame () const
 Get maximum length of frame value.
int32_t visibility_history () const
 Get visibility_history value.
void set_visibility_history (const int32_t new_visibility_history)
 Set visibility_history value.
size_t maxlenof_visibility_history () const
 Get maximum length of visibility_history value.
double * rotation () const
 Get rotation value.
double rotation (unsigned int index) const
 Get rotation value at given index.
void set_rotation (unsigned int index, const double new_rotation)
 Set rotation value at given index.
void set_rotation (const double *new_rotation)
 Set rotation value.
size_t maxlenof_rotation () const
 Get maximum length of rotation value.
double * translation () const
 Get translation value.
double translation (unsigned int index) const
 Get translation value at given index.
void set_translation (unsigned int index, const double new_translation)
 Set translation value at given index.
void set_translation (const double *new_translation)
 Set translation value.
size_t maxlenof_translation () const
 Get maximum length of translation value.
virtual Messagecreate_message (const char *type) const
 Create message based on type name.
virtual void copy_values (const Interface *other)
 Copy values from other interface.
virtual const char * enum_tostring (const char *enumtype, int val) const
 Convert arbitrary enum value to string.

Detailed Description

Position3DInterface Fawkes BlackBoard Interface.

Storage for a 3D pose in Euclidean space.


Member Function Documentation

void fawkes::Position3DInterface::copy_values ( const Interface other) [virtual]

Copy values from other interface.

Parameters:
otherother interface to copy values from

Implements fawkes::Interface.

Definition at line 292 of file Position3DInterface.cpp.

References fawkes::Interface::type().

Message * fawkes::Position3DInterface::create_message ( const char *  type) const [virtual]

Create message based on type name.

This will create a new message of the given type. The type must be given without the InterfaceName:: prefix but just the plain class name of the message.

Parameters:
typemessage type
Returns:
message of the given type, empty
Exceptions:
UnknownTypeExceptionthrown if this interface cannot create a message of the given type.

Implements fawkes::Interface.

Definition at line 281 of file Position3DInterface.cpp.

const char * fawkes::Position3DInterface::enum_tostring ( const char *  enumtype,
int  val 
) const [virtual]

Convert arbitrary enum value to string.

Given the string representation of the enum type and the value this method returns the string representation of the specific value, or the string UNKNOWN if the value is not defined. An exception is thrown if the enum type is invalid.

Parameters:
enumtypeenum type as string
valvalue to convert
Returns:
string representation of value
Exceptions:
UnknownTypeExceptionthrown if enumtype is not specified for interface.

Implements fawkes::Interface.

Definition at line 303 of file Position3DInterface.cpp.

char * fawkes::Position3DInterface::frame ( ) const

Get frame value.

Reference coordinate frame for the data.

Returns:
frame value

Definition at line 72 of file Position3DInterface.cpp.

size_t fawkes::Position3DInterface::maxlenof_frame ( ) const

Get maximum length of frame value.

Returns:
length of frame value, can be length of the array or number of maximum number of characters for a string

Definition at line 82 of file Position3DInterface.cpp.

size_t fawkes::Position3DInterface::maxlenof_rotation ( ) const

Get maximum length of rotation value.

Returns:
length of rotation value, can be length of the array or number of maximum number of characters for a string

Definition at line 177 of file Position3DInterface.cpp.

size_t fawkes::Position3DInterface::maxlenof_translation ( ) const

Get maximum length of translation value.

Returns:
length of translation value, can be length of the array or number of maximum number of characters for a string

Definition at line 245 of file Position3DInterface.cpp.

size_t fawkes::Position3DInterface::maxlenof_visibility_history ( ) const

Get maximum length of visibility_history value.

Returns:
length of visibility_history value, can be length of the array or number of maximum number of characters for a string

Definition at line 121 of file Position3DInterface.cpp.

bool fawkes::Position3DInterface::message_valid ( const Message message) const [virtual]

Check if message is valid and can be enqueued.

Parameters:
messageMessage to check
Returns:
true if the message is valid, false otherwise.

Implements fawkes::Interface.

Definition at line 314 of file Position3DInterface.cpp.

double * fawkes::Position3DInterface::rotation ( ) const

Get rotation value.

Rotation quaternion relative to reference frame, ordered as (x, y, z, w).

Returns:
rotation value

Definition at line 150 of file Position3DInterface.cpp.

double fawkes::Position3DInterface::rotation ( unsigned int  index) const

Get rotation value at given index.

Rotation quaternion relative to reference frame, ordered as (x, y, z, w).

Parameters:
indexindex of value
Returns:
rotation value
Exceptions:
Exceptionthrown if index is out of bounds

Definition at line 164 of file Position3DInterface.cpp.

void fawkes::Position3DInterface::set_frame ( const char *  new_frame)

Set frame value.

Reference coordinate frame for the data.

Parameters:
new_framenew frame value

Definition at line 94 of file Position3DInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::Position3DInterface::set_rotation ( unsigned int  index,
const double  new_rotation 
)

Set rotation value at given index.

Rotation quaternion relative to reference frame, ordered as (x, y, z, w).

Parameters:
new_rotationnew rotation value
indexindex for of the value

Definition at line 203 of file Position3DInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by AmclThread::loop(), MapLaserGenThread::loop(), and TabletopObjectsThread::init().

void fawkes::Position3DInterface::set_rotation ( const double *  new_rotation)

Set rotation value.

Rotation quaternion relative to reference frame, ordered as (x, y, z, w).

Parameters:
new_rotationnew rotation value

Definition at line 189 of file Position3DInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::Position3DInterface::set_translation ( unsigned int  index,
const double  new_translation 
)

Set translation value at given index.

Translation vector from the reference frame's origin, ordered as (x, y, z).

Parameters:
new_translationnew translation value
indexindex for of the value

Definition at line 271 of file Position3DInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by AmclThread::loop(), and MapLaserGenThread::loop().

void fawkes::Position3DInterface::set_translation ( const double *  new_translation)

Set translation value.

Translation vector from the reference frame's origin, ordered as (x, y, z).

Parameters:
new_translationnew translation value

Definition at line 257 of file Position3DInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::Position3DInterface::set_visibility_history ( const int32_t  new_visibility_history)

Set visibility_history value.

The visibilitiy history indicates the number of consecutive positive or negative sightings. If the history is negative, there have been as many negative sightings (object not visible) as the absolute value of the history. A positive value denotes as many positive sightings. 0 shall only be used during the initialization of the interface or if the visibility history is not updated.

Parameters:
new_visibility_historynew visibility_history value

Definition at line 137 of file Position3DInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by AmclThread::loop().

double * fawkes::Position3DInterface::translation ( ) const

Get translation value.

Translation vector from the reference frame's origin, ordered as (x, y, z).

Returns:
translation value

Definition at line 218 of file Position3DInterface.cpp.

double fawkes::Position3DInterface::translation ( unsigned int  index) const

Get translation value at given index.

Translation vector from the reference frame's origin, ordered as (x, y, z).

Parameters:
indexindex of value
Returns:
translation value
Exceptions:
Exceptionthrown if index is out of bounds

Definition at line 232 of file Position3DInterface.cpp.

int32_t fawkes::Position3DInterface::visibility_history ( ) const

Get visibility_history value.

The visibilitiy history indicates the number of consecutive positive or negative sightings. If the history is negative, there have been as many negative sightings (object not visible) as the absolute value of the history. A positive value denotes as many positive sightings. 0 shall only be used during the initialization of the interface or if the visibility history is not updated.

Returns:
visibility_history value

Definition at line 111 of file Position3DInterface.cpp.

Referenced by AmclThread::loop().


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