Just changed OUTPUT_SIZE and INPUT_SIZE in ros/node_handle.h
Dependents: WRS2020_mecanum_node
ShapeResult.h
00001 #ifndef _ROS_turtle_actionlib_ShapeResult_h 00002 #define _ROS_turtle_actionlib_ShapeResult_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 00009 namespace turtle_actionlib 00010 { 00011 00012 class ShapeResult : public ros::Msg 00013 { 00014 public: 00015 typedef float _interior_angle_type; 00016 _interior_angle_type interior_angle; 00017 typedef float _apothem_type; 00018 _apothem_type apothem; 00019 00020 ShapeResult(): 00021 interior_angle(0), 00022 apothem(0) 00023 { 00024 } 00025 00026 virtual int serialize(unsigned char *outbuffer) const 00027 { 00028 int offset = 0; 00029 union { 00030 float real; 00031 uint32_t base; 00032 } u_interior_angle; 00033 u_interior_angle.real = this->interior_angle; 00034 *(outbuffer + offset + 0) = (u_interior_angle.base >> (8 * 0)) & 0xFF; 00035 *(outbuffer + offset + 1) = (u_interior_angle.base >> (8 * 1)) & 0xFF; 00036 *(outbuffer + offset + 2) = (u_interior_angle.base >> (8 * 2)) & 0xFF; 00037 *(outbuffer + offset + 3) = (u_interior_angle.base >> (8 * 3)) & 0xFF; 00038 offset += sizeof(this->interior_angle); 00039 union { 00040 float real; 00041 uint32_t base; 00042 } u_apothem; 00043 u_apothem.real = this->apothem; 00044 *(outbuffer + offset + 0) = (u_apothem.base >> (8 * 0)) & 0xFF; 00045 *(outbuffer + offset + 1) = (u_apothem.base >> (8 * 1)) & 0xFF; 00046 *(outbuffer + offset + 2) = (u_apothem.base >> (8 * 2)) & 0xFF; 00047 *(outbuffer + offset + 3) = (u_apothem.base >> (8 * 3)) & 0xFF; 00048 offset += sizeof(this->apothem); 00049 return offset; 00050 } 00051 00052 virtual int deserialize(unsigned char *inbuffer) 00053 { 00054 int offset = 0; 00055 union { 00056 float real; 00057 uint32_t base; 00058 } u_interior_angle; 00059 u_interior_angle.base = 0; 00060 u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); 00061 u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00062 u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00063 u_interior_angle.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00064 this->interior_angle = u_interior_angle.real; 00065 offset += sizeof(this->interior_angle); 00066 union { 00067 float real; 00068 uint32_t base; 00069 } u_apothem; 00070 u_apothem.base = 0; 00071 u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); 00072 u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00073 u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00074 u_apothem.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00075 this->apothem = u_apothem.real; 00076 offset += sizeof(this->apothem); 00077 return offset; 00078 } 00079 00080 const char * getType(){ return "turtle_actionlib/ShapeResult"; }; 00081 const char * getMD5(){ return "b06c6e2225f820dbc644270387cd1a7c"; }; 00082 00083 }; 00084 00085 } 00086 #endif
Generated on Tue Jul 12 2022 18:49:20 by 1.7.2