1 #ifndef _ROS_rosabridge_msgs_Odometry_h 2 #define _ROS_rosabridge_msgs_Odometry_h 8 #include "std_msgs/Header.h" 25 virtual int serialize(
unsigned char *outbuffer)
const 28 offset += this->header.serialize(outbuffer + offset);
29 uint32_t length_child_frame_id = strlen(this->child_frame_id);
30 memcpy(outbuffer + offset, &length_child_frame_id,
sizeof(uint32_t));
32 memcpy(outbuffer + offset, this->child_frame_id, length_child_frame_id);
33 offset += length_child_frame_id;
34 offset += this->pose.
serialize(outbuffer + offset);
35 for( uint8_t i = 0; i < 6; i++){
40 u_pose_covariancei.real = this->pose_covariance[i];
41 *(outbuffer + offset + 0) = (u_pose_covariancei.base >> (8 * 0)) & 0xFF;
42 *(outbuffer + offset + 1) = (u_pose_covariancei.base >> (8 * 1)) & 0xFF;
43 *(outbuffer + offset + 2) = (u_pose_covariancei.base >> (8 * 2)) & 0xFF;
44 *(outbuffer + offset + 3) = (u_pose_covariancei.base >> (8 * 3)) & 0xFF;
45 offset +=
sizeof(this->pose_covariance[i]);
47 offset += this->twist.
serialize(outbuffer + offset);
48 for( uint8_t i = 0; i < 6; i++){
52 } u_twist_covariancei;
53 u_twist_covariancei.real = this->twist_covariance[i];
54 *(outbuffer + offset + 0) = (u_twist_covariancei.base >> (8 * 0)) & 0xFF;
55 *(outbuffer + offset + 1) = (u_twist_covariancei.base >> (8 * 1)) & 0xFF;
56 *(outbuffer + offset + 2) = (u_twist_covariancei.base >> (8 * 2)) & 0xFF;
57 *(outbuffer + offset + 3) = (u_twist_covariancei.base >> (8 * 3)) & 0xFF;
58 offset +=
sizeof(this->twist_covariance[i]);
66 offset += this->header.deserialize(inbuffer + offset);
67 uint32_t length_child_frame_id;
68 memcpy(&length_child_frame_id, (inbuffer + offset),
sizeof(uint32_t));
70 for(
unsigned int k= offset; k< offset+length_child_frame_id; ++k){
71 inbuffer[k-1]=inbuffer[k];
73 inbuffer[offset+length_child_frame_id-1]=0;
74 this->child_frame_id = (
char *)(inbuffer + offset-1);
75 offset += length_child_frame_id;
76 offset += this->pose.
deserialize(inbuffer + offset);
77 for( uint8_t i = 0; i < 6; i++){
82 u_pose_covariancei.base = 0;
83 u_pose_covariancei.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
84 u_pose_covariancei.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
85 u_pose_covariancei.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
86 u_pose_covariancei.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
87 this->pose_covariance[i] = u_pose_covariancei.real;
88 offset +=
sizeof(this->pose_covariance[i]);
90 offset += this->twist.
deserialize(inbuffer + offset);
91 for( uint8_t i = 0; i < 6; i++){
95 } u_twist_covariancei;
96 u_twist_covariancei.base = 0;
97 u_twist_covariancei.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
98 u_twist_covariancei.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
99 u_twist_covariancei.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
100 u_twist_covariancei.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
101 this->twist_covariance[i] = u_twist_covariancei.real;
102 offset +=
sizeof(this->twist_covariance[i]);
107 const char *
getType(){
return "rosabridge_msgs/Odometry"; };
108 const char *
getMD5(){
return "3c88d21ba93f27fc21da1718473d3e4e"; };
virtual int serialize(unsigned char *outbuffer) const
float twist_covariance[6]
virtual int deserialize(unsigned char *inbuffer)
rosabridge_msgs::Twist twist
virtual int deserialize(unsigned char *inbuffer)
rosabridge_msgs::Pose pose
const char * child_frame_id
virtual int deserialize(unsigned char *inbuffer)
virtual int serialize(unsigned char *outbuffer) const
virtual int serialize(unsigned char *outbuffer) const