Fawkes API  Fawkes Development Version
fawkes::LocalizationInterface::SetInitialPoseMessage Class Reference

SetInitialPoseMessage Fawkes BlackBoard Interface Message. More...

#include <>>

Inheritance diagram for fawkes::LocalizationInterface::SetInitialPoseMessage:

Public Member Functions

 SetInitialPoseMessage (const char *ini_frame, const double *ini_rotation, const double *ini_translation, const double *ini_covariance)
 Constructor with initial values. More...
 
 SetInitialPoseMessage ()
 Constructor. More...
 
 ~SetInitialPoseMessage ()
 Destructor. More...
 
 SetInitialPoseMessage (const SetInitialPoseMessage *m)
 Copy constructor. More...
 
char * frame () const
 Get frame value. More...
 
void set_frame (const char *new_frame)
 Set frame value. More...
 
size_t maxlenof_frame () const
 Get maximum length of frame value. More...
 
double * rotation () const
 Get rotation value. More...
 
double rotation (unsigned int index) const
 Get rotation value at given index. More...
 
void set_rotation (unsigned int index, const double new_rotation)
 Set rotation value at given index. More...
 
void set_rotation (const double *new_rotation)
 Set rotation value. More...
 
size_t maxlenof_rotation () const
 Get maximum length of rotation value. More...
 
double * translation () const
 Get translation value. More...
 
double translation (unsigned int index) const
 Get translation value at given index. More...
 
void set_translation (unsigned int index, const double new_translation)
 Set translation value at given index. More...
 
void set_translation (const double *new_translation)
 Set translation value. More...
 
size_t maxlenof_translation () const
 Get maximum length of translation value. More...
 
double * covariance () const
 Get covariance value. More...
 
double covariance (unsigned int index) const
 Get covariance value at given index. More...
 
void set_covariance (unsigned int index, const double new_covariance)
 Set covariance value at given index. More...
 
void set_covariance (const double *new_covariance)
 Set covariance value. More...
 
size_t maxlenof_covariance () const
 Get maximum length of covariance value. More...
 
virtual Messageclone () const
 Clone this message. More...
 
- Public Member Functions inherited from fawkes::Message
 Message (const char *type)
 Constructor. More...
 
 Message (const Message *mesg)
 Copy constructor. More...
 
 Message (const Message &mesg)
 Copy constructor. More...
 
virtual ~Message ()
 Destructor. More...
 
Messageoperator= (const Message &m)
 Assign this message to given message. More...
 
unsigned int id () const
 Get message ID. More...
 
void set_id (unsigned int message_id)
 Set message ID. More...
 
void mark_enqueued ()
 Mark message as being enqueued. More...
 
bool enqueued () const
 Check is message has been enqueued. More...
 
const Timetime_enqueued () const
 Get time when message was enqueued. More...
 
unsigned int sender_id () const
 Get ID of sender. More...
 
const char * sender_thread_name () const
 Get sender of message. More...
 
Interfaceinterface () const
 Get transmitting interface. More...
 
const char * type () const
 Get message type. More...
 
InterfaceFieldIterator fields ()
 Get iterator over all fields of this interface instance. More...
 
InterfaceFieldIterator fields_end ()
 Invalid iterator. More...
 
unsigned int num_fields () const
 Get the number of fields in the message. More...
 
const void * datachunk () const
 Get pointer to data. More...
 
unsigned int datasize () const
 Get size of data. More...
 
unsigned int hops () const
 Get number of hops. More...
 
void set_hops (unsigned int hops)
 Set number of hops. More...
 
void set_from_chunk (const void *chunk)
 Set from raw data chunk. More...
 
unsigned int recipient () const
 Get recipient memory serial. More...
 
template<class MessageType >
bool is_of_type ()
 Check if message has desired type. More...
 
template<class MessageType >
MessageType * as_type ()
 Cast message to given type if possible. More...
 
- Public Member Functions inherited from fawkes::RefCount
 RefCount ()
 Constructor. More...
 
virtual ~RefCount ()
 Destructor. More...
 
void ref ()
 Increment reference count. More...
 
void unref ()
 Decrement reference count and conditionally delete this instance. More...
 
unsigned int refcount ()
 Get reference count for this instance. More...
 

Additional Inherited Members

- Protected Member Functions inherited from fawkes::Message
void add_fieldinfo (interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0, const interface_enum_map_t *enum_map=0)
 Add an entry to the info list. More...
 
- Protected Attributes inherited from fawkes::Message
void * data_ptr
 Pointer to memory that contains local data. More...
 
unsigned int data_size
 Size of memory needed to hold all data. More...
 
message_data_ts_tdata_ts
 data timestamp aliasing pointer More...
 

Detailed Description

Constructor & Destructor Documentation

◆ SetInitialPoseMessage() [1/3]

fawkes::LocalizationInterface::SetInitialPoseMessage::SetInitialPoseMessage ( const char *  ini_frame,
const double *  ini_rotation,
const double *  ini_translation,
const double *  ini_covariance 
)

Constructor with initial values.

Parameters
ini_frameinitial value for frame
ini_rotationinitial value for rotation
ini_translationinitial value for translation
ini_covarianceinitial value for covariance

Definition at line 145 of file LocalizationInterface.cpp.

References fawkes::Message::add_fieldinfo(), fawkes::Message::data_ptr, fawkes::Message::data_size, fawkes::Message::data_ts, fawkes::IFT_DOUBLE, and fawkes::IFT_STRING.

◆ SetInitialPoseMessage() [2/3]

fawkes::LocalizationInterface::SetInitialPoseMessage::SetInitialPoseMessage ( )

◆ ~SetInitialPoseMessage()

fawkes::LocalizationInterface::SetInitialPoseMessage::~SetInitialPoseMessage ( )

Destructor.

Definition at line 176 of file LocalizationInterface.cpp.

References fawkes::Message::data_ptr.

◆ SetInitialPoseMessage() [3/3]

fawkes::LocalizationInterface::SetInitialPoseMessage::SetInitialPoseMessage ( const SetInitialPoseMessage m)

Copy constructor.

Parameters
mmessage to copy from

Definition at line 184 of file LocalizationInterface.cpp.

References fawkes::Message::data_ptr, fawkes::Message::data_size, and fawkes::Message::data_ts.

Member Function Documentation

◆ clone()

Message * fawkes::LocalizationInterface::SetInitialPoseMessage::clone ( ) const
virtual

Clone this message.

Produces a message of the same type as this message and copies the data to the new message.

Returns
clone of this message

Reimplemented from fawkes::Message.

Definition at line 444 of file LocalizationInterface.cpp.

◆ covariance() [1/2]

double * fawkes::LocalizationInterface::SetInitialPoseMessage::covariance ( ) const

Get covariance value.

Row-major representation of the 6x6 covariance matrix. The orientation parameters use a fixed-axis representation. In order, the parameters are: (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis).

Returns
covariance value

Definition at line 370 of file LocalizationInterface.cpp.

Referenced by AmclThread::finalize().

◆ covariance() [2/2]

double fawkes::LocalizationInterface::SetInitialPoseMessage::covariance ( unsigned int  index) const

Get covariance value at given index.

Row-major representation of the 6x6 covariance matrix. The orientation parameters use a fixed-axis representation. In order, the parameters are: (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis).

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

Definition at line 387 of file LocalizationInterface.cpp.

◆ frame()

char * fawkes::LocalizationInterface::SetInitialPoseMessage::frame ( ) const

Get frame value.

Reference coordinate frame for the data.

Returns
frame value

Definition at line 201 of file LocalizationInterface.cpp.

Referenced by AmclThread::finalize().

◆ maxlenof_covariance()

size_t fawkes::LocalizationInterface::SetInitialPoseMessage::maxlenof_covariance ( ) const

Get maximum length of covariance value.

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

Definition at line 400 of file LocalizationInterface.cpp.

◆ maxlenof_frame()

size_t fawkes::LocalizationInterface::SetInitialPoseMessage::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 211 of file LocalizationInterface.cpp.

◆ maxlenof_rotation()

size_t fawkes::LocalizationInterface::SetInitialPoseMessage::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 262 of file LocalizationInterface.cpp.

◆ maxlenof_translation()

size_t fawkes::LocalizationInterface::SetInitialPoseMessage::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 328 of file LocalizationInterface.cpp.

◆ rotation() [1/2]

double * fawkes::LocalizationInterface::SetInitialPoseMessage::rotation ( ) const

Get rotation value.

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

Returns
rotation value

Definition at line 235 of file LocalizationInterface.cpp.

Referenced by AmclThread::finalize().

◆ rotation() [2/2]

double fawkes::LocalizationInterface::SetInitialPoseMessage::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 249 of file LocalizationInterface.cpp.

◆ set_covariance() [1/2]

void fawkes::LocalizationInterface::SetInitialPoseMessage::set_covariance ( unsigned int  index,
const double  new_covariance 
)

Set covariance value at given index.

Row-major representation of the 6x6 covariance matrix. The orientation parameters use a fixed-axis representation. In order, the parameters are: (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis).

Parameters
new_covariancenew covariance value
indexindex for of the value

Definition at line 431 of file LocalizationInterface.cpp.

Referenced by AmclROSThread::publish_map().

◆ set_covariance() [2/2]

void fawkes::LocalizationInterface::SetInitialPoseMessage::set_covariance ( const double *  new_covariance)

Set covariance value.

Row-major representation of the 6x6 covariance matrix. The orientation parameters use a fixed-axis representation. In order, the parameters are: (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis).

Parameters
new_covariancenew covariance value

Definition at line 415 of file LocalizationInterface.cpp.

◆ set_frame()

void fawkes::LocalizationInterface::SetInitialPoseMessage::set_frame ( const char *  new_frame)

Set frame value.

Reference coordinate frame for the data.

Parameters
new_framenew frame value

Definition at line 223 of file LocalizationInterface.cpp.

Referenced by AmclROSThread::publish_map().

◆ set_rotation() [1/2]

void fawkes::LocalizationInterface::SetInitialPoseMessage::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 287 of file LocalizationInterface.cpp.

Referenced by AmclROSThread::publish_map().

◆ set_rotation() [2/2]

void fawkes::LocalizationInterface::SetInitialPoseMessage::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 274 of file LocalizationInterface.cpp.

◆ set_translation() [1/2]

void fawkes::LocalizationInterface::SetInitialPoseMessage::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 353 of file LocalizationInterface.cpp.

Referenced by AmclROSThread::publish_map().

◆ set_translation() [2/2]

void fawkes::LocalizationInterface::SetInitialPoseMessage::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 340 of file LocalizationInterface.cpp.

◆ translation() [1/2]

double * fawkes::LocalizationInterface::SetInitialPoseMessage::translation ( ) const

Get translation value.

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

Returns
translation value

Definition at line 301 of file LocalizationInterface.cpp.

Referenced by AmclThread::finalize().

◆ translation() [2/2]

double fawkes::LocalizationInterface::SetInitialPoseMessage::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 315 of file LocalizationInterface.cpp.


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