kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
Pose2D.h
Go to the documentation of this file.
1 #ifndef _ROS_geometry_msgs_Pose2D_h
2 #define _ROS_geometry_msgs_Pose2D_h
3 
4 #include <stdint.h>
5 #include <string.h>
6 #include <stdlib.h>
7 #include "ros/msg.h"
8 
9 namespace geometry_msgs
10 {
11 
12  class Pose2D : public ros::Msg
13  {
14  public:
15  float x;
16  float y;
17  float theta;
18 
19  Pose2D():
20  x(0),
21  y(0),
22  theta(0)
23  {
24  }
25 
26  virtual int serialize(unsigned char *outbuffer) const
27  {
28  int offset = 0;
29  offset += serializeAvrFloat64(outbuffer + offset, this->x);
30  offset += serializeAvrFloat64(outbuffer + offset, this->y);
31  offset += serializeAvrFloat64(outbuffer + offset, this->theta);
32  return offset;
33  }
34 
35  virtual int deserialize(unsigned char *inbuffer)
36  {
37  int offset = 0;
38  offset += deserializeAvrFloat64(inbuffer + offset, &(this->x));
39  offset += deserializeAvrFloat64(inbuffer + offset, &(this->y));
40  offset += deserializeAvrFloat64(inbuffer + offset, &(this->theta));
41  return offset;
42  }
43 
44  const char * getType(){ return "geometry_msgs/Pose2D"; };
45  const char * getMD5(){ return "938fa65709584ad8e77d238529be13b8"; };
46 
47  };
48 
49 }
50 #endif
static int serializeAvrFloat64(unsigned char *outbuffer, const float f)
This tricky function handles promoting a 32bit float to a 64bit double, so that AVR can publish messa...
Definition: msg.h:62
float x
Definition: Pose2D.h:15
const char * getMD5()
Definition: Pose2D.h:45
Pose2D()
Definition: Pose2D.h:19
virtual int serialize(unsigned char *outbuffer) const
Definition: Pose2D.h:26
Definition: Pose2D.h:12
virtual int deserialize(unsigned char *inbuffer)
Definition: Pose2D.h:35
const char * getType()
Definition: Pose2D.h:44
float theta
Definition: Pose2D.h:17
float y
Definition: Pose2D.h:16
Definition: msg.h:43
static int deserializeAvrFloat64(const unsigned char *inbuffer, float *f)
This tricky function handles demoting a 64bit double to a 32bit float, so that AVR can understand mes...
Definition: msg.h:100