00001
00002 #ifndef MAPPING_MSGS_MESSAGE_ATTACHEDCOLLISIONOBJECT_H
00003 #define MAPPING_MSGS_MESSAGE_ATTACHEDCOLLISIONOBJECT_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013 #include "mapping_msgs/CollisionObject.h"
00014
00015 namespace mapping_msgs
00016 {
00017 template <class ContainerAllocator>
00018 struct AttachedCollisionObject_ : public ros::Message
00019 {
00020 typedef AttachedCollisionObject_<ContainerAllocator> Type;
00021
00022 AttachedCollisionObject_()
00023 : link_name()
00024 , object()
00025 , touch_links()
00026 {
00027 }
00028
00029 AttachedCollisionObject_(const ContainerAllocator& _alloc)
00030 : link_name(_alloc)
00031 , object(_alloc)
00032 , touch_links(_alloc)
00033 {
00034 }
00035
00036 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _link_name_type;
00037 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > link_name;
00038
00039 typedef ::mapping_msgs::CollisionObject_<ContainerAllocator> _object_type;
00040 ::mapping_msgs::CollisionObject_<ContainerAllocator> object;
00041
00042 typedef std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > _touch_links_type;
00043 std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > touch_links;
00044
00045 static const std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > REMOVE_ALL_ATTACHED_OBJECTS;
00046
00047 ROS_DEPRECATED uint32_t get_touch_links_size() const { return (uint32_t)touch_links.size(); }
00048 ROS_DEPRECATED void set_touch_links_size(uint32_t size) { touch_links.resize((size_t)size); }
00049 ROS_DEPRECATED void get_touch_links_vec(std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > & vec) const { vec = this->touch_links; }
00050 ROS_DEPRECATED void set_touch_links_vec(const std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > & vec) { this->touch_links = vec; }
00051 private:
00052 static const char* __s_getDataType_() { return "mapping_msgs/AttachedCollisionObject"; }
00053 public:
00054 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00055
00056 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00057
00058 private:
00059 static const char* __s_getMD5Sum_() { return "58c7f119e35988da1dbd450c682308ed"; }
00060 public:
00061 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00062
00063 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00064
00065 private:
00066 static const char* __s_getMessageDefinition_() { return "# The CollisionObject will be attached with a fixed joint to this link\n\
00067 # If link name is set to REMOVE_ALL_ATTACHED_OBJECTS and object.operation \n\
00068 # is set to REMOVE will remove all attached bodies attached to any object\n\
00069 string link_name\n\
00070 \n\
00071 #Reserved for indicating that all attached objects should be removed\n\
00072 string REMOVE_ALL_ATTACHED_OBJECTS = \"all\"\n\
00073 \n\
00074 #This contains the actual shapes and poses for the CollisionObject\n\
00075 #to be attached to the link\n\
00076 #If action is remove and no object.id is set, all objects\n\
00077 #attached to the link indicated by link_name will be removed\n\
00078 CollisionObject object\n\
00079 \n\
00080 # The set of links that the attached objects are allowed to touch\n\
00081 # by default - the link_name is included by default\n\
00082 string[] touch_links\n\
00083 \n\
00084 ================================================================================\n\
00085 MSG: mapping_msgs/CollisionObject\n\
00086 # a header, used for interpreting the poses\n\
00087 Header header\n\
00088 \n\
00089 # the id of the object\n\
00090 string id\n\
00091 \n\
00092 #This contains what is to be done with the object\n\
00093 CollisionObjectOperation operation\n\
00094 \n\
00095 #the shapes associated with the object\n\
00096 geometric_shapes_msgs/Shape[] shapes\n\
00097 \n\
00098 #the poses associated with the shapes - will be transformed using the header\n\
00099 geometry_msgs/Pose[] poses\n\
00100 \n\
00101 ================================================================================\n\
00102 MSG: std_msgs/Header\n\
00103 # Standard metadata for higher-level stamped data types.\n\
00104 # This is generally used to communicate timestamped data \n\
00105 # in a particular coordinate frame.\n\
00106 # \n\
00107 # sequence ID: consecutively increasing ID \n\
00108 uint32 seq\n\
00109 #Two-integer timestamp that is expressed as:\n\
00110 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00111 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00112 # time-handling sugar is provided by the client library\n\
00113 time stamp\n\
00114 #Frame this data is associated with\n\
00115 # 0: no frame\n\
00116 # 1: global frame\n\
00117 string frame_id\n\
00118 \n\
00119 ================================================================================\n\
00120 MSG: mapping_msgs/CollisionObjectOperation\n\
00121 #Puts the object into the environment\n\
00122 #or updates the object if already added\n\
00123 byte ADD=0\n\
00124 \n\
00125 #Removes the object from the environment entirely\n\
00126 byte REMOVE=1\n\
00127 \n\
00128 #Only valid within the context of a CollisionAttachedObject message\n\
00129 #Will be ignored if sent with an CollisionObject message\n\
00130 #Takes an attached object, detaches from the attached link\n\
00131 #But adds back in as regular object\n\
00132 byte DETACH_AND_ADD_AS_OBJECT=2\n\
00133 \n\
00134 #Only valid within the context of a CollisionAttachedObject message\n\
00135 #Will be ignored if sent with an CollisionObject message\n\
00136 #Takes current object in the environment and removes it as\n\
00137 #a regular object\n\
00138 byte ATTACH_AND_REMOVE_AS_OBJECT=3\n\
00139 \n\
00140 # Byte code for operation\n\
00141 byte operation\n\
00142 \n\
00143 ================================================================================\n\
00144 MSG: geometric_shapes_msgs/Shape\n\
00145 byte SPHERE=0\n\
00146 byte BOX=1\n\
00147 byte CYLINDER=2\n\
00148 byte MESH=3\n\
00149 \n\
00150 byte type\n\
00151 \n\
00152 \n\
00153 #### define sphere, box, cylinder ####\n\
00154 # the origin of each shape is considered at the shape's center\n\
00155 \n\
00156 # for sphere\n\
00157 # radius := dimensions[0]\n\
00158 \n\
00159 # for cylinder\n\
00160 # radius := dimensions[0]\n\
00161 # length := dimensions[1]\n\
00162 # the length is along the Z axis\n\
00163 \n\
00164 # for box\n\
00165 # size_x := dimensions[0]\n\
00166 # size_y := dimensions[1]\n\
00167 # size_z := dimensions[2]\n\
00168 float64[] dimensions\n\
00169 \n\
00170 \n\
00171 #### define mesh ####\n\
00172 \n\
00173 # list of triangles; triangle k is defined by tre vertices located\n\
00174 # at indices triangles[3k], triangles[3k+1], triangles[3k+2]\n\
00175 int32[] triangles\n\
00176 geometry_msgs/Point[] vertices\n\
00177 \n\
00178 ================================================================================\n\
00179 MSG: geometry_msgs/Point\n\
00180 # This contains the position of a point in free space\n\
00181 float64 x\n\
00182 float64 y\n\
00183 float64 z\n\
00184 \n\
00185 ================================================================================\n\
00186 MSG: geometry_msgs/Pose\n\
00187 # A representation of pose in free space, composed of postion and orientation. \n\
00188 Point position\n\
00189 Quaternion orientation\n\
00190 \n\
00191 ================================================================================\n\
00192 MSG: geometry_msgs/Quaternion\n\
00193 # This represents an orientation in free space in quaternion form.\n\
00194 \n\
00195 float64 x\n\
00196 float64 y\n\
00197 float64 z\n\
00198 float64 w\n\
00199 \n\
00200 "; }
00201 public:
00202 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00203
00204 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00205
00206 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00207 {
00208 ros::serialization::OStream stream(write_ptr, 1000000000);
00209 ros::serialization::serialize(stream, link_name);
00210 ros::serialization::serialize(stream, object);
00211 ros::serialization::serialize(stream, touch_links);
00212 return stream.getData();
00213 }
00214
00215 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00216 {
00217 ros::serialization::IStream stream(read_ptr, 1000000000);
00218 ros::serialization::deserialize(stream, link_name);
00219 ros::serialization::deserialize(stream, object);
00220 ros::serialization::deserialize(stream, touch_links);
00221 return stream.getData();
00222 }
00223
00224 ROS_DEPRECATED virtual uint32_t serializationLength() const
00225 {
00226 uint32_t size = 0;
00227 size += ros::serialization::serializationLength(link_name);
00228 size += ros::serialization::serializationLength(object);
00229 size += ros::serialization::serializationLength(touch_links);
00230 return size;
00231 }
00232
00233 typedef boost::shared_ptr< ::mapping_msgs::AttachedCollisionObject_<ContainerAllocator> > Ptr;
00234 typedef boost::shared_ptr< ::mapping_msgs::AttachedCollisionObject_<ContainerAllocator> const> ConstPtr;
00235 };
00236 typedef ::mapping_msgs::AttachedCollisionObject_<std::allocator<void> > AttachedCollisionObject;
00237
00238 typedef boost::shared_ptr< ::mapping_msgs::AttachedCollisionObject> AttachedCollisionObjectPtr;
00239 typedef boost::shared_ptr< ::mapping_msgs::AttachedCollisionObject const> AttachedCollisionObjectConstPtr;
00240
00241 template<typename ContainerAllocator> const std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > AttachedCollisionObject_<ContainerAllocator>::REMOVE_ALL_ATTACHED_OBJECTS = "\"all\"";
00242
00243 template<typename ContainerAllocator>
00244 std::ostream& operator<<(std::ostream& s, const ::mapping_msgs::AttachedCollisionObject_<ContainerAllocator> & v)
00245 {
00246 ros::message_operations::Printer< ::mapping_msgs::AttachedCollisionObject_<ContainerAllocator> >::stream(s, "", v);
00247 return s;}
00248
00249 }
00250
00251 namespace ros
00252 {
00253 namespace message_traits
00254 {
00255 template<class ContainerAllocator>
00256 struct MD5Sum< ::mapping_msgs::AttachedCollisionObject_<ContainerAllocator> > {
00257 static const char* value()
00258 {
00259 return "58c7f119e35988da1dbd450c682308ed";
00260 }
00261
00262 static const char* value(const ::mapping_msgs::AttachedCollisionObject_<ContainerAllocator> &) { return value(); }
00263 static const uint64_t static_value1 = 0x58c7f119e35988daULL;
00264 static const uint64_t static_value2 = 0x1dbd450c682308edULL;
00265 };
00266
00267 template<class ContainerAllocator>
00268 struct DataType< ::mapping_msgs::AttachedCollisionObject_<ContainerAllocator> > {
00269 static const char* value()
00270 {
00271 return "mapping_msgs/AttachedCollisionObject";
00272 }
00273
00274 static const char* value(const ::mapping_msgs::AttachedCollisionObject_<ContainerAllocator> &) { return value(); }
00275 };
00276
00277 template<class ContainerAllocator>
00278 struct Definition< ::mapping_msgs::AttachedCollisionObject_<ContainerAllocator> > {
00279 static const char* value()
00280 {
00281 return "# The CollisionObject will be attached with a fixed joint to this link\n\
00282 # If link name is set to REMOVE_ALL_ATTACHED_OBJECTS and object.operation \n\
00283 # is set to REMOVE will remove all attached bodies attached to any object\n\
00284 string link_name\n\
00285 \n\
00286 #Reserved for indicating that all attached objects should be removed\n\
00287 string REMOVE_ALL_ATTACHED_OBJECTS = \"all\"\n\
00288 \n\
00289 #This contains the actual shapes and poses for the CollisionObject\n\
00290 #to be attached to the link\n\
00291 #If action is remove and no object.id is set, all objects\n\
00292 #attached to the link indicated by link_name will be removed\n\
00293 CollisionObject object\n\
00294 \n\
00295 # The set of links that the attached objects are allowed to touch\n\
00296 # by default - the link_name is included by default\n\
00297 string[] touch_links\n\
00298 \n\
00299 ================================================================================\n\
00300 MSG: mapping_msgs/CollisionObject\n\
00301 # a header, used for interpreting the poses\n\
00302 Header header\n\
00303 \n\
00304 # the id of the object\n\
00305 string id\n\
00306 \n\
00307 #This contains what is to be done with the object\n\
00308 CollisionObjectOperation operation\n\
00309 \n\
00310 #the shapes associated with the object\n\
00311 geometric_shapes_msgs/Shape[] shapes\n\
00312 \n\
00313 #the poses associated with the shapes - will be transformed using the header\n\
00314 geometry_msgs/Pose[] poses\n\
00315 \n\
00316 ================================================================================\n\
00317 MSG: std_msgs/Header\n\
00318 # Standard metadata for higher-level stamped data types.\n\
00319 # This is generally used to communicate timestamped data \n\
00320 # in a particular coordinate frame.\n\
00321 # \n\
00322 # sequence ID: consecutively increasing ID \n\
00323 uint32 seq\n\
00324 #Two-integer timestamp that is expressed as:\n\
00325 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00326 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00327 # time-handling sugar is provided by the client library\n\
00328 time stamp\n\
00329 #Frame this data is associated with\n\
00330 # 0: no frame\n\
00331 # 1: global frame\n\
00332 string frame_id\n\
00333 \n\
00334 ================================================================================\n\
00335 MSG: mapping_msgs/CollisionObjectOperation\n\
00336 #Puts the object into the environment\n\
00337 #or updates the object if already added\n\
00338 byte ADD=0\n\
00339 \n\
00340 #Removes the object from the environment entirely\n\
00341 byte REMOVE=1\n\
00342 \n\
00343 #Only valid within the context of a CollisionAttachedObject message\n\
00344 #Will be ignored if sent with an CollisionObject message\n\
00345 #Takes an attached object, detaches from the attached link\n\
00346 #But adds back in as regular object\n\
00347 byte DETACH_AND_ADD_AS_OBJECT=2\n\
00348 \n\
00349 #Only valid within the context of a CollisionAttachedObject message\n\
00350 #Will be ignored if sent with an CollisionObject message\n\
00351 #Takes current object in the environment and removes it as\n\
00352 #a regular object\n\
00353 byte ATTACH_AND_REMOVE_AS_OBJECT=3\n\
00354 \n\
00355 # Byte code for operation\n\
00356 byte operation\n\
00357 \n\
00358 ================================================================================\n\
00359 MSG: geometric_shapes_msgs/Shape\n\
00360 byte SPHERE=0\n\
00361 byte BOX=1\n\
00362 byte CYLINDER=2\n\
00363 byte MESH=3\n\
00364 \n\
00365 byte type\n\
00366 \n\
00367 \n\
00368 #### define sphere, box, cylinder ####\n\
00369 # the origin of each shape is considered at the shape's center\n\
00370 \n\
00371 # for sphere\n\
00372 # radius := dimensions[0]\n\
00373 \n\
00374 # for cylinder\n\
00375 # radius := dimensions[0]\n\
00376 # length := dimensions[1]\n\
00377 # the length is along the Z axis\n\
00378 \n\
00379 # for box\n\
00380 # size_x := dimensions[0]\n\
00381 # size_y := dimensions[1]\n\
00382 # size_z := dimensions[2]\n\
00383 float64[] dimensions\n\
00384 \n\
00385 \n\
00386 #### define mesh ####\n\
00387 \n\
00388 # list of triangles; triangle k is defined by tre vertices located\n\
00389 # at indices triangles[3k], triangles[3k+1], triangles[3k+2]\n\
00390 int32[] triangles\n\
00391 geometry_msgs/Point[] vertices\n\
00392 \n\
00393 ================================================================================\n\
00394 MSG: geometry_msgs/Point\n\
00395 # This contains the position of a point in free space\n\
00396 float64 x\n\
00397 float64 y\n\
00398 float64 z\n\
00399 \n\
00400 ================================================================================\n\
00401 MSG: geometry_msgs/Pose\n\
00402 # A representation of pose in free space, composed of postion and orientation. \n\
00403 Point position\n\
00404 Quaternion orientation\n\
00405 \n\
00406 ================================================================================\n\
00407 MSG: geometry_msgs/Quaternion\n\
00408 # This represents an orientation in free space in quaternion form.\n\
00409 \n\
00410 float64 x\n\
00411 float64 y\n\
00412 float64 z\n\
00413 float64 w\n\
00414 \n\
00415 ";
00416 }
00417
00418 static const char* value(const ::mapping_msgs::AttachedCollisionObject_<ContainerAllocator> &) { return value(); }
00419 };
00420
00421 }
00422 }
00423
00424 namespace ros
00425 {
00426 namespace serialization
00427 {
00428
00429 template<class ContainerAllocator> struct Serializer< ::mapping_msgs::AttachedCollisionObject_<ContainerAllocator> >
00430 {
00431 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00432 {
00433 stream.next(m.link_name);
00434 stream.next(m.object);
00435 stream.next(m.touch_links);
00436 }
00437
00438 ROS_DECLARE_ALLINONE_SERIALIZER;
00439 };
00440 }
00441 }
00442
00443 namespace ros
00444 {
00445 namespace message_operations
00446 {
00447
00448 template<class ContainerAllocator>
00449 struct Printer< ::mapping_msgs::AttachedCollisionObject_<ContainerAllocator> >
00450 {
00451 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::mapping_msgs::AttachedCollisionObject_<ContainerAllocator> & v)
00452 {
00453 s << indent << "link_name: ";
00454 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.link_name);
00455 s << indent << "object: ";
00456 s << std::endl;
00457 Printer< ::mapping_msgs::CollisionObject_<ContainerAllocator> >::stream(s, indent + " ", v.object);
00458 s << indent << "touch_links[]" << std::endl;
00459 for (size_t i = 0; i < v.touch_links.size(); ++i)
00460 {
00461 s << indent << " touch_links[" << i << "]: ";
00462 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.touch_links[i]);
00463 }
00464 }
00465 };
00466
00467
00468 }
00469 }
00470
00471 #endif // MAPPING_MSGS_MESSAGE_ATTACHEDCOLLISIONOBJECT_H
00472