Roboid Control for C++
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
RoboidControl::PoseMsg Class Reference

Detailed Description

Message to communicate the pose of the thing The pose is in local space relative to the parent. If there is not parent (the thing is a root thing), the pose will be in world space.

#include <PoseMsg.h>

Inherits RoboidControl::IMessage.

Public Member Functions

 PoseMsg (unsigned char networkId, Thing *thing, bool force=false)
 Create a new message for sending.
 
 PoseMsg (const char *buffer)
 
virtual ~PoseMsg ()
 Destructor for the message.
 
virtual unsigned char Serialize (char *buffer) override
 

Static Public Member Functions

static unsigned char * ReceiveMsg (unsigned char packetSize)
 

Public Attributes

unsigned char length = 4 + 4 + 4
 The length of the message.
 
unsigned char networkId
 The network ID of the thing.
 
unsigned char thingId
 The ID of the thing.
 
unsigned char poseType
 Bit pattern stating which pose components are available.
 
Spherical position
 The position of the thing in local space in meters.
 
SwingTwist orientation
 The orientation of the thing in local space.
 
Spherical linearVelocity
 The linear velocity of the thing in local space in meters per second.
 
Spherical angularVelocity
 The angular velocity of the thing in local space.
 

Static Public Attributes

static const unsigned char id = 0x10
 The message ID.
 
static const unsigned char Pose_Position = 0x01
 Bit pattern for a pose with position.
 
static const unsigned char Pose_Orientation = 0x02
 Bit pattern for a pose with orientation.
 
static const unsigned char Pose_LinearVelocity = 0x04
 Bit pattern for a pose with linear velocity.
 
static const unsigned char Pose_AngularVelocity = 0x08
 Bit pattern for a pose with angular velocity.
 

Constructor & Destructor Documentation

◆ PoseMsg() [1/2]

RoboidControl::PoseMsg::PoseMsg ( unsigned char  networkId,
Thing thing,
bool  force = false 
)

Create a new message for sending.

Parameters
networkIdhe network ID of the thing
thingThe thing for which the pose shouldbe sent

◆ PoseMsg() [2/2]

RoboidControl::PoseMsg::PoseMsg ( const char *  buffer)

Member Function Documentation

◆ Serialize()

unsigned char RoboidControl::PoseMsg::Serialize ( char *  buffer)
overridevirtual