Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
SnapItRequest.h
00001 #ifndef _ROS_jsk_recognition_msgs_SnapItRequest_h 00002 #define _ROS_jsk_recognition_msgs_SnapItRequest_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 #include "std_msgs/Header.h" 00009 #include "geometry_msgs/PolygonStamped.h" 00010 #include "geometry_msgs/PointStamped.h" 00011 #include "geometry_msgs/Vector3Stamped.h" 00012 00013 namespace jsk_recognition_msgs 00014 { 00015 00016 class SnapItRequest : public ros::Msg 00017 { 00018 public: 00019 typedef std_msgs::Header _header_type; 00020 _header_type header; 00021 typedef uint8_t _model_type_type; 00022 _model_type_type model_type; 00023 typedef geometry_msgs::PolygonStamped _target_plane_type; 00024 _target_plane_type target_plane; 00025 typedef geometry_msgs::PointStamped _center_type; 00026 _center_type center; 00027 typedef geometry_msgs::Vector3Stamped _direction_type; 00028 _direction_type direction; 00029 typedef double _radius_type; 00030 _radius_type radius; 00031 typedef double _height_type; 00032 _height_type height; 00033 typedef double _max_distance_type; 00034 _max_distance_type max_distance; 00035 typedef double _eps_angle_type; 00036 _eps_angle_type eps_angle; 00037 enum { MODEL_PLANE = 0 }; 00038 enum { MODEL_CYLINDER = 1 }; 00039 00040 SnapItRequest(): 00041 header(), 00042 model_type(0), 00043 target_plane(), 00044 center(), 00045 direction(), 00046 radius(0), 00047 height(0), 00048 max_distance(0), 00049 eps_angle(0) 00050 { 00051 } 00052 00053 virtual int serialize(unsigned char *outbuffer) const 00054 { 00055 int offset = 0; 00056 offset += this->header.serialize(outbuffer + offset); 00057 *(outbuffer + offset + 0) = (this->model_type >> (8 * 0)) & 0xFF; 00058 offset += sizeof(this->model_type); 00059 offset += this->target_plane.serialize(outbuffer + offset); 00060 offset += this->center.serialize(outbuffer + offset); 00061 offset += this->direction.serialize(outbuffer + offset); 00062 union { 00063 double real; 00064 uint64_t base; 00065 } u_radius; 00066 u_radius.real = this->radius; 00067 *(outbuffer + offset + 0) = (u_radius.base >> (8 * 0)) & 0xFF; 00068 *(outbuffer + offset + 1) = (u_radius.base >> (8 * 1)) & 0xFF; 00069 *(outbuffer + offset + 2) = (u_radius.base >> (8 * 2)) & 0xFF; 00070 *(outbuffer + offset + 3) = (u_radius.base >> (8 * 3)) & 0xFF; 00071 *(outbuffer + offset + 4) = (u_radius.base >> (8 * 4)) & 0xFF; 00072 *(outbuffer + offset + 5) = (u_radius.base >> (8 * 5)) & 0xFF; 00073 *(outbuffer + offset + 6) = (u_radius.base >> (8 * 6)) & 0xFF; 00074 *(outbuffer + offset + 7) = (u_radius.base >> (8 * 7)) & 0xFF; 00075 offset += sizeof(this->radius); 00076 union { 00077 double real; 00078 uint64_t base; 00079 } u_height; 00080 u_height.real = this->height; 00081 *(outbuffer + offset + 0) = (u_height.base >> (8 * 0)) & 0xFF; 00082 *(outbuffer + offset + 1) = (u_height.base >> (8 * 1)) & 0xFF; 00083 *(outbuffer + offset + 2) = (u_height.base >> (8 * 2)) & 0xFF; 00084 *(outbuffer + offset + 3) = (u_height.base >> (8 * 3)) & 0xFF; 00085 *(outbuffer + offset + 4) = (u_height.base >> (8 * 4)) & 0xFF; 00086 *(outbuffer + offset + 5) = (u_height.base >> (8 * 5)) & 0xFF; 00087 *(outbuffer + offset + 6) = (u_height.base >> (8 * 6)) & 0xFF; 00088 *(outbuffer + offset + 7) = (u_height.base >> (8 * 7)) & 0xFF; 00089 offset += sizeof(this->height); 00090 union { 00091 double real; 00092 uint64_t base; 00093 } u_max_distance; 00094 u_max_distance.real = this->max_distance; 00095 *(outbuffer + offset + 0) = (u_max_distance.base >> (8 * 0)) & 0xFF; 00096 *(outbuffer + offset + 1) = (u_max_distance.base >> (8 * 1)) & 0xFF; 00097 *(outbuffer + offset + 2) = (u_max_distance.base >> (8 * 2)) & 0xFF; 00098 *(outbuffer + offset + 3) = (u_max_distance.base >> (8 * 3)) & 0xFF; 00099 *(outbuffer + offset + 4) = (u_max_distance.base >> (8 * 4)) & 0xFF; 00100 *(outbuffer + offset + 5) = (u_max_distance.base >> (8 * 5)) & 0xFF; 00101 *(outbuffer + offset + 6) = (u_max_distance.base >> (8 * 6)) & 0xFF; 00102 *(outbuffer + offset + 7) = (u_max_distance.base >> (8 * 7)) & 0xFF; 00103 offset += sizeof(this->max_distance); 00104 union { 00105 double real; 00106 uint64_t base; 00107 } u_eps_angle; 00108 u_eps_angle.real = this->eps_angle; 00109 *(outbuffer + offset + 0) = (u_eps_angle.base >> (8 * 0)) & 0xFF; 00110 *(outbuffer + offset + 1) = (u_eps_angle.base >> (8 * 1)) & 0xFF; 00111 *(outbuffer + offset + 2) = (u_eps_angle.base >> (8 * 2)) & 0xFF; 00112 *(outbuffer + offset + 3) = (u_eps_angle.base >> (8 * 3)) & 0xFF; 00113 *(outbuffer + offset + 4) = (u_eps_angle.base >> (8 * 4)) & 0xFF; 00114 *(outbuffer + offset + 5) = (u_eps_angle.base >> (8 * 5)) & 0xFF; 00115 *(outbuffer + offset + 6) = (u_eps_angle.base >> (8 * 6)) & 0xFF; 00116 *(outbuffer + offset + 7) = (u_eps_angle.base >> (8 * 7)) & 0xFF; 00117 offset += sizeof(this->eps_angle); 00118 return offset; 00119 } 00120 00121 virtual int deserialize(unsigned char *inbuffer) 00122 { 00123 int offset = 0; 00124 offset += this->header.deserialize(inbuffer + offset); 00125 this->model_type = ((uint8_t) (*(inbuffer + offset))); 00126 offset += sizeof(this->model_type); 00127 offset += this->target_plane.deserialize(inbuffer + offset); 00128 offset += this->center.deserialize(inbuffer + offset); 00129 offset += this->direction.deserialize(inbuffer + offset); 00130 union { 00131 double real; 00132 uint64_t base; 00133 } u_radius; 00134 u_radius.base = 0; 00135 u_radius.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00136 u_radius.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00137 u_radius.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00138 u_radius.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00139 u_radius.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00140 u_radius.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00141 u_radius.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00142 u_radius.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00143 this->radius = u_radius.real; 00144 offset += sizeof(this->radius); 00145 union { 00146 double real; 00147 uint64_t base; 00148 } u_height; 00149 u_height.base = 0; 00150 u_height.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00151 u_height.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00152 u_height.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00153 u_height.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00154 u_height.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00155 u_height.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00156 u_height.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00157 u_height.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00158 this->height = u_height.real; 00159 offset += sizeof(this->height); 00160 union { 00161 double real; 00162 uint64_t base; 00163 } u_max_distance; 00164 u_max_distance.base = 0; 00165 u_max_distance.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00166 u_max_distance.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00167 u_max_distance.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00168 u_max_distance.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00169 u_max_distance.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00170 u_max_distance.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00171 u_max_distance.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00172 u_max_distance.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00173 this->max_distance = u_max_distance.real; 00174 offset += sizeof(this->max_distance); 00175 union { 00176 double real; 00177 uint64_t base; 00178 } u_eps_angle; 00179 u_eps_angle.base = 0; 00180 u_eps_angle.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00181 u_eps_angle.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00182 u_eps_angle.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00183 u_eps_angle.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00184 u_eps_angle.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00185 u_eps_angle.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00186 u_eps_angle.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00187 u_eps_angle.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00188 this->eps_angle = u_eps_angle.real; 00189 offset += sizeof(this->eps_angle); 00190 return offset; 00191 } 00192 00193 virtual const char * getType(){ return "jsk_recognition_msgs/SnapItRequest"; }; 00194 virtual const char * getMD5(){ return "5733f480694296678d81cff0483b399b"; }; 00195 00196 }; 00197 00198 } 00199 #endif
Generated on Mon Sep 26 2022 13:47:03 by
