Fawkes API
Fawkes Development Version
|
Position3DInterface Fawkes BlackBoard Interface. More...
#include <>>
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 Message * | create_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. |
Position3DInterface Fawkes BlackBoard Interface.
Storage for a 3D pose in Euclidean space.
void fawkes::Position3DInterface::copy_values | ( | const Interface * | other | ) | [virtual] |
Copy values from other interface.
other | other 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.
type | message type |
UnknownTypeException | thrown 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.
enumtype | enum type as string |
val | value to convert |
UnknownTypeException | thrown 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.
Definition at line 72 of file Position3DInterface.cpp.
size_t fawkes::Position3DInterface::maxlenof_frame | ( | ) | const |
Get maximum length of frame value.
Definition at line 82 of file Position3DInterface.cpp.
size_t fawkes::Position3DInterface::maxlenof_rotation | ( | ) | const |
Get maximum length of rotation value.
Definition at line 177 of file Position3DInterface.cpp.
size_t fawkes::Position3DInterface::maxlenof_translation | ( | ) | const |
Get maximum length of translation value.
Definition at line 245 of file Position3DInterface.cpp.
size_t fawkes::Position3DInterface::maxlenof_visibility_history | ( | ) | const |
Get maximum length of visibility_history value.
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.
message | Message to check |
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).
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).
index | index of value |
Exception | thrown 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.
new_frame | new 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).
new_rotation | new rotation value |
index | index 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).
new_rotation | new 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).
new_translation | new translation value |
index | index 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).
new_translation | new 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.
new_visibility_history | new 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).
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).
index | index of value |
Exception | thrown 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.
Definition at line 111 of file Position3DInterface.cpp.
Referenced by AmclThread::loop().