00001
00002 #ifndef ARM_NAVIGATION_MSGS_MESSAGE_SHAPE_H
00003 #define ARM_NAVIGATION_MSGS_MESSAGE_SHAPE_H
00004 #include <string>
00005 #include <vector>
00006 #include <map>
00007 #include <ostream>
00008 #include "ros/serialization.h"
00009 #include "ros/builtin_message_traits.h"
00010 #include "ros/message_operations.h"
00011 #include "ros/time.h"
00012
00013 #include "ros/macros.h"
00014
00015 #include "ros/assert.h"
00016
00017 #include "geometry_msgs/Point.h"
00018
00019 namespace arm_navigation_msgs
00020 {
00021 template <class ContainerAllocator>
00022 struct Shape_ {
00023 typedef Shape_<ContainerAllocator> Type;
00024
00025 Shape_()
00026 : type(0)
00027 , dimensions()
00028 , triangles()
00029 , vertices()
00030 {
00031 }
00032
00033 Shape_(const ContainerAllocator& _alloc)
00034 : type(0)
00035 , dimensions(_alloc)
00036 , triangles(_alloc)
00037 , vertices(_alloc)
00038 {
00039 }
00040
00041 typedef int8_t _type_type;
00042 int8_t type;
00043
00044 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _dimensions_type;
00045 std::vector<double, typename ContainerAllocator::template rebind<double>::other > dimensions;
00046
00047 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _triangles_type;
00048 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > triangles;
00049
00050 typedef std::vector< ::geometry_msgs::Point_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point_<ContainerAllocator> >::other > _vertices_type;
00051 std::vector< ::geometry_msgs::Point_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point_<ContainerAllocator> >::other > vertices;
00052
00053 enum { SPHERE = 0 };
00054 enum { BOX = 1 };
00055 enum { CYLINDER = 2 };
00056 enum { MESH = 3 };
00057
00058 ROS_DEPRECATED uint32_t get_dimensions_size() const { return (uint32_t)dimensions.size(); }
00059 ROS_DEPRECATED void set_dimensions_size(uint32_t size) { dimensions.resize((size_t)size); }
00060 ROS_DEPRECATED void get_dimensions_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->dimensions; }
00061 ROS_DEPRECATED void set_dimensions_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->dimensions = vec; }
00062 ROS_DEPRECATED uint32_t get_triangles_size() const { return (uint32_t)triangles.size(); }
00063 ROS_DEPRECATED void set_triangles_size(uint32_t size) { triangles.resize((size_t)size); }
00064 ROS_DEPRECATED void get_triangles_vec(std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) const { vec = this->triangles; }
00065 ROS_DEPRECATED void set_triangles_vec(const std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) { this->triangles = vec; }
00066 ROS_DEPRECATED uint32_t get_vertices_size() const { return (uint32_t)vertices.size(); }
00067 ROS_DEPRECATED void set_vertices_size(uint32_t size) { vertices.resize((size_t)size); }
00068 ROS_DEPRECATED void get_vertices_vec(std::vector< ::geometry_msgs::Point_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point_<ContainerAllocator> >::other > & vec) const { vec = this->vertices; }
00069 ROS_DEPRECATED void set_vertices_vec(const std::vector< ::geometry_msgs::Point_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point_<ContainerAllocator> >::other > & vec) { this->vertices = vec; }
00070 private:
00071 static const char* __s_getDataType_() { return "arm_navigation_msgs/Shape"; }
00072 public:
00073 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00074
00075 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00076
00077 private:
00078 static const char* __s_getMD5Sum_() { return "59935940044147de75e7523b5d37c4d7"; }
00079 public:
00080 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00081
00082 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00083
00084 private:
00085 static const char* __s_getMessageDefinition_() { return "byte SPHERE=0\n\
00086 byte BOX=1\n\
00087 byte CYLINDER=2\n\
00088 byte MESH=3\n\
00089 \n\
00090 byte type\n\
00091 \n\
00092 \n\
00093 #### define sphere, box, cylinder ####\n\
00094 # the origin of each shape is considered at the shape's center\n\
00095 \n\
00096 # for sphere\n\
00097 # radius := dimensions[0]\n\
00098 \n\
00099 # for cylinder\n\
00100 # radius := dimensions[0]\n\
00101 # length := dimensions[1]\n\
00102 # the length is along the Z axis\n\
00103 \n\
00104 # for box\n\
00105 # size_x := dimensions[0]\n\
00106 # size_y := dimensions[1]\n\
00107 # size_z := dimensions[2]\n\
00108 float64[] dimensions\n\
00109 \n\
00110 \n\
00111 #### define mesh ####\n\
00112 \n\
00113 # list of triangles; triangle k is defined by tre vertices located\n\
00114 # at indices triangles[3k], triangles[3k+1], triangles[3k+2]\n\
00115 int32[] triangles\n\
00116 geometry_msgs/Point[] vertices\n\
00117 \n\
00118 ================================================================================\n\
00119 MSG: geometry_msgs/Point\n\
00120 # This contains the position of a point in free space\n\
00121 float64 x\n\
00122 float64 y\n\
00123 float64 z\n\
00124 \n\
00125 "; }
00126 public:
00127 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00128
00129 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00130
00131 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00132 {
00133 ros::serialization::OStream stream(write_ptr, 1000000000);
00134 ros::serialization::serialize(stream, type);
00135 ros::serialization::serialize(stream, dimensions);
00136 ros::serialization::serialize(stream, triangles);
00137 ros::serialization::serialize(stream, vertices);
00138 return stream.getData();
00139 }
00140
00141 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00142 {
00143 ros::serialization::IStream stream(read_ptr, 1000000000);
00144 ros::serialization::deserialize(stream, type);
00145 ros::serialization::deserialize(stream, dimensions);
00146 ros::serialization::deserialize(stream, triangles);
00147 ros::serialization::deserialize(stream, vertices);
00148 return stream.getData();
00149 }
00150
00151 ROS_DEPRECATED virtual uint32_t serializationLength() const
00152 {
00153 uint32_t size = 0;
00154 size += ros::serialization::serializationLength(type);
00155 size += ros::serialization::serializationLength(dimensions);
00156 size += ros::serialization::serializationLength(triangles);
00157 size += ros::serialization::serializationLength(vertices);
00158 return size;
00159 }
00160
00161 typedef boost::shared_ptr< ::arm_navigation_msgs::Shape_<ContainerAllocator> > Ptr;
00162 typedef boost::shared_ptr< ::arm_navigation_msgs::Shape_<ContainerAllocator> const> ConstPtr;
00163 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00164 };
00165 typedef ::arm_navigation_msgs::Shape_<std::allocator<void> > Shape;
00166
00167 typedef boost::shared_ptr< ::arm_navigation_msgs::Shape> ShapePtr;
00168 typedef boost::shared_ptr< ::arm_navigation_msgs::Shape const> ShapeConstPtr;
00169
00170
00171 template<typename ContainerAllocator>
00172 std::ostream& operator<<(std::ostream& s, const ::arm_navigation_msgs::Shape_<ContainerAllocator> & v)
00173 {
00174 ros::message_operations::Printer< ::arm_navigation_msgs::Shape_<ContainerAllocator> >::stream(s, "", v);
00175 return s;}
00176
00177 }
00178
00179 namespace ros
00180 {
00181 namespace message_traits
00182 {
00183 template<class ContainerAllocator> struct IsMessage< ::arm_navigation_msgs::Shape_<ContainerAllocator> > : public TrueType {};
00184 template<class ContainerAllocator> struct IsMessage< ::arm_navigation_msgs::Shape_<ContainerAllocator> const> : public TrueType {};
00185 template<class ContainerAllocator>
00186 struct MD5Sum< ::arm_navigation_msgs::Shape_<ContainerAllocator> > {
00187 static const char* value()
00188 {
00189 return "59935940044147de75e7523b5d37c4d7";
00190 }
00191
00192 static const char* value(const ::arm_navigation_msgs::Shape_<ContainerAllocator> &) { return value(); }
00193 static const uint64_t static_value1 = 0x59935940044147deULL;
00194 static const uint64_t static_value2 = 0x75e7523b5d37c4d7ULL;
00195 };
00196
00197 template<class ContainerAllocator>
00198 struct DataType< ::arm_navigation_msgs::Shape_<ContainerAllocator> > {
00199 static const char* value()
00200 {
00201 return "arm_navigation_msgs/Shape";
00202 }
00203
00204 static const char* value(const ::arm_navigation_msgs::Shape_<ContainerAllocator> &) { return value(); }
00205 };
00206
00207 template<class ContainerAllocator>
00208 struct Definition< ::arm_navigation_msgs::Shape_<ContainerAllocator> > {
00209 static const char* value()
00210 {
00211 return "byte SPHERE=0\n\
00212 byte BOX=1\n\
00213 byte CYLINDER=2\n\
00214 byte MESH=3\n\
00215 \n\
00216 byte type\n\
00217 \n\
00218 \n\
00219 #### define sphere, box, cylinder ####\n\
00220 # the origin of each shape is considered at the shape's center\n\
00221 \n\
00222 # for sphere\n\
00223 # radius := dimensions[0]\n\
00224 \n\
00225 # for cylinder\n\
00226 # radius := dimensions[0]\n\
00227 # length := dimensions[1]\n\
00228 # the length is along the Z axis\n\
00229 \n\
00230 # for box\n\
00231 # size_x := dimensions[0]\n\
00232 # size_y := dimensions[1]\n\
00233 # size_z := dimensions[2]\n\
00234 float64[] dimensions\n\
00235 \n\
00236 \n\
00237 #### define mesh ####\n\
00238 \n\
00239 # list of triangles; triangle k is defined by tre vertices located\n\
00240 # at indices triangles[3k], triangles[3k+1], triangles[3k+2]\n\
00241 int32[] triangles\n\
00242 geometry_msgs/Point[] vertices\n\
00243 \n\
00244 ================================================================================\n\
00245 MSG: geometry_msgs/Point\n\
00246 # This contains the position of a point in free space\n\
00247 float64 x\n\
00248 float64 y\n\
00249 float64 z\n\
00250 \n\
00251 ";
00252 }
00253
00254 static const char* value(const ::arm_navigation_msgs::Shape_<ContainerAllocator> &) { return value(); }
00255 };
00256
00257 }
00258 }
00259
00260 namespace ros
00261 {
00262 namespace serialization
00263 {
00264
00265 template<class ContainerAllocator> struct Serializer< ::arm_navigation_msgs::Shape_<ContainerAllocator> >
00266 {
00267 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00268 {
00269 stream.next(m.type);
00270 stream.next(m.dimensions);
00271 stream.next(m.triangles);
00272 stream.next(m.vertices);
00273 }
00274
00275 ROS_DECLARE_ALLINONE_SERIALIZER;
00276 };
00277 }
00278 }
00279
00280 namespace ros
00281 {
00282 namespace message_operations
00283 {
00284
00285 template<class ContainerAllocator>
00286 struct Printer< ::arm_navigation_msgs::Shape_<ContainerAllocator> >
00287 {
00288 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::arm_navigation_msgs::Shape_<ContainerAllocator> & v)
00289 {
00290 s << indent << "type: ";
00291 Printer<int8_t>::stream(s, indent + " ", v.type);
00292 s << indent << "dimensions[]" << std::endl;
00293 for (size_t i = 0; i < v.dimensions.size(); ++i)
00294 {
00295 s << indent << " dimensions[" << i << "]: ";
00296 Printer<double>::stream(s, indent + " ", v.dimensions[i]);
00297 }
00298 s << indent << "triangles[]" << std::endl;
00299 for (size_t i = 0; i < v.triangles.size(); ++i)
00300 {
00301 s << indent << " triangles[" << i << "]: ";
00302 Printer<int32_t>::stream(s, indent + " ", v.triangles[i]);
00303 }
00304 s << indent << "vertices[]" << std::endl;
00305 for (size_t i = 0; i < v.vertices.size(); ++i)
00306 {
00307 s << indent << " vertices[" << i << "]: ";
00308 s << std::endl;
00309 s << indent;
00310 Printer< ::geometry_msgs::Point_<ContainerAllocator> >::stream(s, indent + " ", v.vertices[i]);
00311 }
00312 }
00313 };
00314
00315
00316 }
00317 }
00318
00319 #endif // ARM_NAVIGATION_MSGS_MESSAGE_SHAPE_H
00320