Drake
PoseStampedTPoseVectorTranslator Class Reference

The translator that converts from/to rendering::PoseVector<double> to/from lcm message bytes which encodes robotlocomotion::pose_stamped_t. More...

#include <systems/rendering/pose_stamped_t_pose_vector_translator.h>

Inheritance diagram for PoseStampedTPoseVectorTranslator:
[legend]
Collaboration diagram for PoseStampedTPoseVectorTranslator:
[legend]

Public Member Functions

 PoseStampedTPoseVectorTranslator (const std::string &frame_name)
 
void Deserialize (const void *lcm_message_bytes, int lcm_message_length, VectorBase< double > *vector_base) const override
 Translates LCM message bytes into a drake::systems::VectorBase object. More...
 
void Serialize (double time, const VectorBase< double > &vector_base, std::vector< uint8_t > *lcm_message_bytes) const override
 Translates a drake::systems::VectorBase object into LCM message bytes. More...
 
std::unique_ptr< BasicVector< double > > AllocateOutputVector () const override
 Allocates the vector storage for an output port of our LCM message type, in case special storage is needed. More...
 
Does not allow copy, move, or assignment
 PoseStampedTPoseVectorTranslator (const PoseStampedTPoseVectorTranslator &)=delete
 
PoseStampedTPoseVectorTranslatoroperator= (const PoseStampedTPoseVectorTranslator &)=delete
 
 PoseStampedTPoseVectorTranslator (PoseStampedTPoseVectorTranslator &&)=delete
 
PoseStampedTPoseVectorTranslatoroperator= (PoseStampedTPoseVectorTranslator &&)=delete
 
- Public Member Functions inherited from LcmAndVectorBaseTranslator
 LcmAndVectorBaseTranslator (int size)
 The constructor. More...
 
virtual ~LcmAndVectorBaseTranslator ()
 
int get_vector_size () const
 Returns the size of the vector in the drake::systems::VectorBase object. More...
 
 LcmAndVectorBaseTranslator (const LcmAndVectorBaseTranslator &)=delete
 
LcmAndVectorBaseTranslatoroperator= (const LcmAndVectorBaseTranslator &)=delete
 
 LcmAndVectorBaseTranslator (LcmAndVectorBaseTranslator &&)=delete
 
LcmAndVectorBaseTranslatoroperator= (LcmAndVectorBaseTranslator &&)=delete
 

Detailed Description

The translator that converts from/to rendering::PoseVector<double> to/from lcm message bytes which encodes robotlocomotion::pose_stamped_t.

Constructor & Destructor Documentation

PoseStampedTPoseVectorTranslator ( const std::string &  frame_name)
explicit

Member Function Documentation

std::unique_ptr< BasicVector< double > > AllocateOutputVector ( ) const
overridevirtual

Allocates the vector storage for an output port of our LCM message type, in case special storage is needed.

A result of nullptr indicates that no special vector is needed; the calling code can and should use a default vector implementation such as BasicVector.

The default implementation in this class returns nullptr. Subclasses that require custom VectorBase subtypes should override it.

Reimplemented from LcmAndVectorBaseTranslator.

void Deserialize ( const void *  lcm_message_bytes,
int  lcm_message_length,
VectorBase< double > *  vector_base 
) const
overridevirtual

Translates LCM message bytes into a drake::systems::VectorBase object.

Parameters
[in]lcm_message_bytesA pointer to a buffer holding the LCM message's data.
[in]lcm_message_lengthThe number of bytes pointed to by the lcm_message_bytes.
[out]vector_baseA pointer to where the translation of the LCM message should be stored. This pointer must not be nullptr.
Exceptions
runtime_errorIf a received LCM message failed to be decoded, or if the decoded LCM message is incompatible with the vector_base. This often occurs when the size of the vector_base does not equal or is incompatible with the size of the decoded LCM message.

Implements LcmAndVectorBaseTranslator.

Here is the call graph for this function:

void Serialize ( double  time,
const VectorBase< double > &  vector_base,
std::vector< uint8_t > *  lcm_message_bytes 
) const
overridevirtual

Translates a drake::systems::VectorBase object into LCM message bytes.

Parameters
[in]timeThe current time in seconds. This value is typically obtained from drake::systems::Context::get_time().
[in]vector_baseThe object to convert into an LCM message.
[out]lcm_message_bytesThe LCM message bytes. This pointer must not be nullptr.

Implements LcmAndVectorBaseTranslator.

Here is the call graph for this function:


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