Go to the documentation of this file.00001 #ifndef _ROS_object_recognition_msgs_ObjectInformation_h
00002 #define _ROS_object_recognition_msgs_ObjectInformation_h
00003
00004 #include <stdint.h>
00005 #include <string.h>
00006 #include <stdlib.h>
00007 #include "ros/msg.h"
00008 #include "shape_msgs/Mesh.h"
00009 #include "sensor_msgs/PointCloud2.h"
00010
00011 namespace object_recognition_msgs
00012 {
00013
00014 class ObjectInformation : public ros::Msg
00015 {
00016 public:
00017 const char* name;
00018 shape_msgs::Mesh ground_truth_mesh;
00019 sensor_msgs::PointCloud2 ground_truth_point_cloud;
00020
00021 virtual int serialize(unsigned char *outbuffer) const
00022 {
00023 int offset = 0;
00024 uint32_t length_name = strlen(this->name);
00025 memcpy(outbuffer + offset, &length_name, sizeof(uint32_t));
00026 offset += 4;
00027 memcpy(outbuffer + offset, this->name, length_name);
00028 offset += length_name;
00029 offset += this->ground_truth_mesh.serialize(outbuffer + offset);
00030 offset += this->ground_truth_point_cloud.serialize(outbuffer + offset);
00031 return offset;
00032 }
00033
00034 virtual int deserialize(unsigned char *inbuffer)
00035 {
00036 int offset = 0;
00037 uint32_t length_name;
00038 memcpy(&length_name, (inbuffer + offset), sizeof(uint32_t));
00039 offset += 4;
00040 for(unsigned int k= offset; k< offset+length_name; ++k){
00041 inbuffer[k-1]=inbuffer[k];
00042 }
00043 inbuffer[offset+length_name-1]=0;
00044 this->name = (char *)(inbuffer + offset-1);
00045 offset += length_name;
00046 offset += this->ground_truth_mesh.deserialize(inbuffer + offset);
00047 offset += this->ground_truth_point_cloud.deserialize(inbuffer + offset);
00048 return offset;
00049 }
00050
00051 const char * getType(){ return "object_recognition_msgs/ObjectInformation"; };
00052 const char * getMD5(){ return "921ec39f51c7b927902059cf3300ecde"; };
00053
00054 };
00055
00056 }
00057 #endif