Just changed OUTPUT_SIZE and INPUT_SIZE in ros/node_handle.h
Dependents: WRS2020_mecanum_node
ProjectedMap.h
00001 #ifndef _ROS_map_msgs_ProjectedMap_h 00002 #define _ROS_map_msgs_ProjectedMap_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 #include "nav_msgs/OccupancyGrid.h" 00009 00010 namespace map_msgs 00011 { 00012 00013 class ProjectedMap : public ros::Msg 00014 { 00015 public: 00016 typedef nav_msgs::OccupancyGrid _map_type; 00017 _map_type map; 00018 typedef double _min_z_type; 00019 _min_z_type min_z; 00020 typedef double _max_z_type; 00021 _max_z_type max_z; 00022 00023 ProjectedMap(): 00024 map(), 00025 min_z(0), 00026 max_z(0) 00027 { 00028 } 00029 00030 virtual int serialize(unsigned char *outbuffer) const 00031 { 00032 int offset = 0; 00033 offset += this->map.serialize(outbuffer + offset); 00034 union { 00035 double real; 00036 uint64_t base; 00037 } u_min_z; 00038 u_min_z.real = this->min_z; 00039 *(outbuffer + offset + 0) = (u_min_z.base >> (8 * 0)) & 0xFF; 00040 *(outbuffer + offset + 1) = (u_min_z.base >> (8 * 1)) & 0xFF; 00041 *(outbuffer + offset + 2) = (u_min_z.base >> (8 * 2)) & 0xFF; 00042 *(outbuffer + offset + 3) = (u_min_z.base >> (8 * 3)) & 0xFF; 00043 *(outbuffer + offset + 4) = (u_min_z.base >> (8 * 4)) & 0xFF; 00044 *(outbuffer + offset + 5) = (u_min_z.base >> (8 * 5)) & 0xFF; 00045 *(outbuffer + offset + 6) = (u_min_z.base >> (8 * 6)) & 0xFF; 00046 *(outbuffer + offset + 7) = (u_min_z.base >> (8 * 7)) & 0xFF; 00047 offset += sizeof(this->min_z); 00048 union { 00049 double real; 00050 uint64_t base; 00051 } u_max_z; 00052 u_max_z.real = this->max_z; 00053 *(outbuffer + offset + 0) = (u_max_z.base >> (8 * 0)) & 0xFF; 00054 *(outbuffer + offset + 1) = (u_max_z.base >> (8 * 1)) & 0xFF; 00055 *(outbuffer + offset + 2) = (u_max_z.base >> (8 * 2)) & 0xFF; 00056 *(outbuffer + offset + 3) = (u_max_z.base >> (8 * 3)) & 0xFF; 00057 *(outbuffer + offset + 4) = (u_max_z.base >> (8 * 4)) & 0xFF; 00058 *(outbuffer + offset + 5) = (u_max_z.base >> (8 * 5)) & 0xFF; 00059 *(outbuffer + offset + 6) = (u_max_z.base >> (8 * 6)) & 0xFF; 00060 *(outbuffer + offset + 7) = (u_max_z.base >> (8 * 7)) & 0xFF; 00061 offset += sizeof(this->max_z); 00062 return offset; 00063 } 00064 00065 virtual int deserialize(unsigned char *inbuffer) 00066 { 00067 int offset = 0; 00068 offset += this->map.deserialize(inbuffer + offset); 00069 union { 00070 double real; 00071 uint64_t base; 00072 } u_min_z; 00073 u_min_z.base = 0; 00074 u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00075 u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00076 u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00077 u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00078 u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00079 u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00080 u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00081 u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00082 this->min_z = u_min_z.real; 00083 offset += sizeof(this->min_z); 00084 union { 00085 double real; 00086 uint64_t base; 00087 } u_max_z; 00088 u_max_z.base = 0; 00089 u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00090 u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00091 u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00092 u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00093 u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00094 u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00095 u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00096 u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00097 this->max_z = u_max_z.real; 00098 offset += sizeof(this->max_z); 00099 return offset; 00100 } 00101 00102 const char * getType(){ return "map_msgs/ProjectedMap"; }; 00103 const char * getMD5(){ return "7bbe8f96e45089681dc1ea7d023cbfca"; }; 00104 00105 }; 00106 00107 } 00108 #endif
Generated on Tue Jul 12 2022 18:49:19 by 1.7.2