Go to the documentation of this file.00001
00002 #ifndef TABLETOP_OBJECT_DETECTOR_SERVICE_TABLETOPOBJECTRECOGNITION_H
00003 #define TABLETOP_OBJECT_DETECTOR_SERVICE_TABLETOPOBJECTRECOGNITION_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 "ros/service_traits.h"
00018
00019 #include "tabletop_object_detector/Table.h"
00020 #include "sensor_msgs/PointCloud.h"
00021
00022
00023 #include "household_objects_database_msgs/DatabaseModelPoseList.h"
00024
00025 namespace tabletop_object_detector
00026 {
00027 template <class ContainerAllocator>
00028 struct TabletopObjectRecognitionRequest_ {
00029 typedef TabletopObjectRecognitionRequest_<ContainerAllocator> Type;
00030
00031 TabletopObjectRecognitionRequest_()
00032 : table()
00033 , clusters()
00034 , num_models(0)
00035 , perform_fit_merge(false)
00036 {
00037 }
00038
00039 TabletopObjectRecognitionRequest_(const ContainerAllocator& _alloc)
00040 : table(_alloc)
00041 , clusters(_alloc)
00042 , num_models(0)
00043 , perform_fit_merge(false)
00044 {
00045 }
00046
00047 typedef ::tabletop_object_detector::Table_<ContainerAllocator> _table_type;
00048 ::tabletop_object_detector::Table_<ContainerAllocator> table;
00049
00050 typedef std::vector< ::sensor_msgs::PointCloud_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::sensor_msgs::PointCloud_<ContainerAllocator> >::other > _clusters_type;
00051 std::vector< ::sensor_msgs::PointCloud_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::sensor_msgs::PointCloud_<ContainerAllocator> >::other > clusters;
00052
00053 typedef int32_t _num_models_type;
00054 int32_t num_models;
00055
00056 typedef uint8_t _perform_fit_merge_type;
00057 uint8_t perform_fit_merge;
00058
00059
00060 typedef boost::shared_ptr< ::tabletop_object_detector::TabletopObjectRecognitionRequest_<ContainerAllocator> > Ptr;
00061 typedef boost::shared_ptr< ::tabletop_object_detector::TabletopObjectRecognitionRequest_<ContainerAllocator> const> ConstPtr;
00062 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00063 };
00064 typedef ::tabletop_object_detector::TabletopObjectRecognitionRequest_<std::allocator<void> > TabletopObjectRecognitionRequest;
00065
00066 typedef boost::shared_ptr< ::tabletop_object_detector::TabletopObjectRecognitionRequest> TabletopObjectRecognitionRequestPtr;
00067 typedef boost::shared_ptr< ::tabletop_object_detector::TabletopObjectRecognitionRequest const> TabletopObjectRecognitionRequestConstPtr;
00068
00069
00070
00071 template <class ContainerAllocator>
00072 struct TabletopObjectRecognitionResponse_ {
00073 typedef TabletopObjectRecognitionResponse_<ContainerAllocator> Type;
00074
00075 TabletopObjectRecognitionResponse_()
00076 : models()
00077 , cluster_model_indices()
00078 {
00079 }
00080
00081 TabletopObjectRecognitionResponse_(const ContainerAllocator& _alloc)
00082 : models(_alloc)
00083 , cluster_model_indices(_alloc)
00084 {
00085 }
00086
00087 typedef std::vector< ::household_objects_database_msgs::DatabaseModelPoseList_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::household_objects_database_msgs::DatabaseModelPoseList_<ContainerAllocator> >::other > _models_type;
00088 std::vector< ::household_objects_database_msgs::DatabaseModelPoseList_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::household_objects_database_msgs::DatabaseModelPoseList_<ContainerAllocator> >::other > models;
00089
00090 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _cluster_model_indices_type;
00091 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > cluster_model_indices;
00092
00093
00094 typedef boost::shared_ptr< ::tabletop_object_detector::TabletopObjectRecognitionResponse_<ContainerAllocator> > Ptr;
00095 typedef boost::shared_ptr< ::tabletop_object_detector::TabletopObjectRecognitionResponse_<ContainerAllocator> const> ConstPtr;
00096 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00097 };
00098 typedef ::tabletop_object_detector::TabletopObjectRecognitionResponse_<std::allocator<void> > TabletopObjectRecognitionResponse;
00099
00100 typedef boost::shared_ptr< ::tabletop_object_detector::TabletopObjectRecognitionResponse> TabletopObjectRecognitionResponsePtr;
00101 typedef boost::shared_ptr< ::tabletop_object_detector::TabletopObjectRecognitionResponse const> TabletopObjectRecognitionResponseConstPtr;
00102
00103
00104 struct TabletopObjectRecognition
00105 {
00106
00107 typedef TabletopObjectRecognitionRequest Request;
00108 typedef TabletopObjectRecognitionResponse Response;
00109 Request request;
00110 Response response;
00111
00112 typedef Request RequestType;
00113 typedef Response ResponseType;
00114 };
00115 }
00116
00117 namespace ros
00118 {
00119 namespace message_traits
00120 {
00121 template<class ContainerAllocator> struct IsMessage< ::tabletop_object_detector::TabletopObjectRecognitionRequest_<ContainerAllocator> > : public TrueType {};
00122 template<class ContainerAllocator> struct IsMessage< ::tabletop_object_detector::TabletopObjectRecognitionRequest_<ContainerAllocator> const> : public TrueType {};
00123 template<class ContainerAllocator>
00124 struct MD5Sum< ::tabletop_object_detector::TabletopObjectRecognitionRequest_<ContainerAllocator> > {
00125 static const char* value()
00126 {
00127 return "e8acee581842e0b2c998f0afde04ae55";
00128 }
00129
00130 static const char* value(const ::tabletop_object_detector::TabletopObjectRecognitionRequest_<ContainerAllocator> &) { return value(); }
00131 static const uint64_t static_value1 = 0xe8acee581842e0b2ULL;
00132 static const uint64_t static_value2 = 0xc998f0afde04ae55ULL;
00133 };
00134
00135 template<class ContainerAllocator>
00136 struct DataType< ::tabletop_object_detector::TabletopObjectRecognitionRequest_<ContainerAllocator> > {
00137 static const char* value()
00138 {
00139 return "tabletop_object_detector/TabletopObjectRecognitionRequest";
00140 }
00141
00142 static const char* value(const ::tabletop_object_detector::TabletopObjectRecognitionRequest_<ContainerAllocator> &) { return value(); }
00143 };
00144
00145 template<class ContainerAllocator>
00146 struct Definition< ::tabletop_object_detector::TabletopObjectRecognitionRequest_<ContainerAllocator> > {
00147 static const char* value()
00148 {
00149 return "\n\
00150 Table table\n\
00151 \n\
00152 \n\
00153 sensor_msgs/PointCloud[] clusters\n\
00154 \n\
00155 \n\
00156 int32 num_models\n\
00157 \n\
00158 \n\
00159 bool perform_fit_merge\n\
00160 \n\
00161 \n\
00162 ================================================================================\n\
00163 MSG: tabletop_object_detector/Table\n\
00164 # Informs that a planar table has been detected at a given location\n\
00165 \n\
00166 # The pose gives you the transform that take you to the coordinate system\n\
00167 # of the table, with the origin somewhere in the table plane and the \n\
00168 # z axis normal to the plane\n\
00169 geometry_msgs/PoseStamped pose\n\
00170 \n\
00171 # These values give you the observed extents of the table, along x and y,\n\
00172 # in the table's own coordinate system (above)\n\
00173 # there is no guarantee that the origin of the table coordinate system is\n\
00174 # inside the boundary defined by these values. \n\
00175 float32 x_min\n\
00176 float32 x_max\n\
00177 float32 y_min\n\
00178 float32 y_max\n\
00179 \n\
00180 # There is no guarantee that the table does NOT extend further than these \n\
00181 # values; this is just as far as we've observed it.\n\
00182 \n\
00183 \n\
00184 # Newer table definition as triangle mesh of convex hull (relative to pose)\n\
00185 shape_msgs/Mesh convex_hull\n\
00186 \n\
00187 ================================================================================\n\
00188 MSG: geometry_msgs/PoseStamped\n\
00189 # A Pose with reference coordinate frame and timestamp\n\
00190 Header header\n\
00191 Pose pose\n\
00192 \n\
00193 ================================================================================\n\
00194 MSG: std_msgs/Header\n\
00195 # Standard metadata for higher-level stamped data types.\n\
00196 # This is generally used to communicate timestamped data \n\
00197 # in a particular coordinate frame.\n\
00198 # \n\
00199 # sequence ID: consecutively increasing ID \n\
00200 uint32 seq\n\
00201 #Two-integer timestamp that is expressed as:\n\
00202 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00203 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00204 # time-handling sugar is provided by the client library\n\
00205 time stamp\n\
00206 #Frame this data is associated with\n\
00207 # 0: no frame\n\
00208 # 1: global frame\n\
00209 string frame_id\n\
00210 \n\
00211 ================================================================================\n\
00212 MSG: geometry_msgs/Pose\n\
00213 # A representation of pose in free space, composed of postion and orientation. \n\
00214 Point position\n\
00215 Quaternion orientation\n\
00216 \n\
00217 ================================================================================\n\
00218 MSG: geometry_msgs/Point\n\
00219 # This contains the position of a point in free space\n\
00220 float64 x\n\
00221 float64 y\n\
00222 float64 z\n\
00223 \n\
00224 ================================================================================\n\
00225 MSG: geometry_msgs/Quaternion\n\
00226 # This represents an orientation in free space in quaternion form.\n\
00227 \n\
00228 float64 x\n\
00229 float64 y\n\
00230 float64 z\n\
00231 float64 w\n\
00232 \n\
00233 ================================================================================\n\
00234 MSG: shape_msgs/Mesh\n\
00235 # Definition of a mesh\n\
00236 \n\
00237 # list of triangles; the index values refer to positions in vertices[]\n\
00238 MeshTriangle[] triangles\n\
00239 \n\
00240 # the actual vertices that make up the mesh\n\
00241 geometry_msgs/Point[] vertices\n\
00242 \n\
00243 ================================================================================\n\
00244 MSG: shape_msgs/MeshTriangle\n\
00245 # Definition of a triangle's vertices\n\
00246 uint32[3] vertex_indices\n\
00247 \n\
00248 ================================================================================\n\
00249 MSG: sensor_msgs/PointCloud\n\
00250 # This message holds a collection of 3d points, plus optional additional\n\
00251 # information about each point.\n\
00252 \n\
00253 # Time of sensor data acquisition, coordinate frame ID.\n\
00254 Header header\n\
00255 \n\
00256 # Array of 3d points. Each Point32 should be interpreted as a 3d point\n\
00257 # in the frame given in the header.\n\
00258 geometry_msgs/Point32[] points\n\
00259 \n\
00260 # Each channel should have the same number of elements as points array,\n\
00261 # and the data in each channel should correspond 1:1 with each point.\n\
00262 # Channel names in common practice are listed in ChannelFloat32.msg.\n\
00263 ChannelFloat32[] channels\n\
00264 \n\
00265 ================================================================================\n\
00266 MSG: geometry_msgs/Point32\n\
00267 # This contains the position of a point in free space(with 32 bits of precision).\n\
00268 # It is recommeded to use Point wherever possible instead of Point32. \n\
00269 # \n\
00270 # This recommendation is to promote interoperability. \n\
00271 #\n\
00272 # This message is designed to take up less space when sending\n\
00273 # lots of points at once, as in the case of a PointCloud. \n\
00274 \n\
00275 float32 x\n\
00276 float32 y\n\
00277 float32 z\n\
00278 ================================================================================\n\
00279 MSG: sensor_msgs/ChannelFloat32\n\
00280 # This message is used by the PointCloud message to hold optional data\n\
00281 # associated with each point in the cloud. The length of the values\n\
00282 # array should be the same as the length of the points array in the\n\
00283 # PointCloud, and each value should be associated with the corresponding\n\
00284 # point.\n\
00285 \n\
00286 # Channel names in existing practice include:\n\
00287 # \"u\", \"v\" - row and column (respectively) in the left stereo image.\n\
00288 # This is opposite to usual conventions but remains for\n\
00289 # historical reasons. The newer PointCloud2 message has no\n\
00290 # such problem.\n\
00291 # \"rgb\" - For point clouds produced by color stereo cameras. uint8\n\
00292 # (R,G,B) values packed into the least significant 24 bits,\n\
00293 # in order.\n\
00294 # \"intensity\" - laser or pixel intensity.\n\
00295 # \"distance\"\n\
00296 \n\
00297 # The channel name should give semantics of the channel (e.g.\n\
00298 # \"intensity\" instead of \"value\").\n\
00299 string name\n\
00300 \n\
00301 # The values array should be 1-1 with the elements of the associated\n\
00302 # PointCloud.\n\
00303 float32[] values\n\
00304 \n\
00305 ";
00306 }
00307
00308 static const char* value(const ::tabletop_object_detector::TabletopObjectRecognitionRequest_<ContainerAllocator> &) { return value(); }
00309 };
00310
00311 }
00312 }
00313
00314
00315 namespace ros
00316 {
00317 namespace message_traits
00318 {
00319 template<class ContainerAllocator> struct IsMessage< ::tabletop_object_detector::TabletopObjectRecognitionResponse_<ContainerAllocator> > : public TrueType {};
00320 template<class ContainerAllocator> struct IsMessage< ::tabletop_object_detector::TabletopObjectRecognitionResponse_<ContainerAllocator> const> : public TrueType {};
00321 template<class ContainerAllocator>
00322 struct MD5Sum< ::tabletop_object_detector::TabletopObjectRecognitionResponse_<ContainerAllocator> > {
00323 static const char* value()
00324 {
00325 return "7751788def97e4db8694307e1c252c0e";
00326 }
00327
00328 static const char* value(const ::tabletop_object_detector::TabletopObjectRecognitionResponse_<ContainerAllocator> &) { return value(); }
00329 static const uint64_t static_value1 = 0x7751788def97e4dbULL;
00330 static const uint64_t static_value2 = 0x8694307e1c252c0eULL;
00331 };
00332
00333 template<class ContainerAllocator>
00334 struct DataType< ::tabletop_object_detector::TabletopObjectRecognitionResponse_<ContainerAllocator> > {
00335 static const char* value()
00336 {
00337 return "tabletop_object_detector/TabletopObjectRecognitionResponse";
00338 }
00339
00340 static const char* value(const ::tabletop_object_detector::TabletopObjectRecognitionResponse_<ContainerAllocator> &) { return value(); }
00341 };
00342
00343 template<class ContainerAllocator>
00344 struct Definition< ::tabletop_object_detector::TabletopObjectRecognitionResponse_<ContainerAllocator> > {
00345 static const char* value()
00346 {
00347 return "\n\
00348 \n\
00349 household_objects_database_msgs/DatabaseModelPoseList[] models\n\
00350 \n\
00351 \n\
00352 \n\
00353 int32[] cluster_model_indices\n\
00354 \n\
00355 \n\
00356 ================================================================================\n\
00357 MSG: household_objects_database_msgs/DatabaseModelPoseList\n\
00358 # stores a list of possible database models recognition results\n\
00359 DatabaseModelPose[] model_list\n\
00360 ================================================================================\n\
00361 MSG: household_objects_database_msgs/DatabaseModelPose\n\
00362 # Informs that a specific model from the Model Database has been \n\
00363 # identified at a certain location\n\
00364 \n\
00365 # the database id of the model\n\
00366 int32 model_id\n\
00367 \n\
00368 # if the object was recognized by the ORK pipeline, its type will be in here\n\
00369 # if this is not empty, then the string in here will be converted to a household_objects_database id\n\
00370 # leave this empty if providing an id in the model_id field\n\
00371 object_recognition_msgs/ObjectType type\n\
00372 \n\
00373 # the pose that it can be found in\n\
00374 geometry_msgs/PoseStamped pose\n\
00375 \n\
00376 # a measure of the confidence level in this detection result\n\
00377 float32 confidence\n\
00378 \n\
00379 # the name of the object detector that generated this detection result\n\
00380 string detector_name\n\
00381 \n\
00382 ================================================================================\n\
00383 MSG: object_recognition_msgs/ObjectType\n\
00384 ################################################## OBJECT ID #########################################################\n\
00385 \n\
00386 # Contains information about the type of a found object. Those two sets of parameters together uniquely define an\n\
00387 # object\n\
00388 \n\
00389 # The key of the found object: the unique identifier in the given db\n\
00390 string key\n\
00391 \n\
00392 # The db parameters stored as a JSON/compressed YAML string. An object id does not make sense without the corresponding\n\
00393 # database. E.g., in object_recognition, it can look like: \"{'type':'CouchDB', 'root':'http://localhost'}\"\n\
00394 # There is no conventional format for those parameters and it's nice to keep that flexibility.\n\
00395 # The object_recognition_core as a generic DB type that can read those fields\n\
00396 # Current examples:\n\
00397 # For CouchDB:\n\
00398 # type: 'CouchDB'\n\
00399 # root: 'http://localhost:5984'\n\
00400 # collection: 'object_recognition'\n\
00401 # For SQL household database:\n\
00402 # type: 'SqlHousehold'\n\
00403 # host: 'wgs36'\n\
00404 # port: 5432\n\
00405 # user: 'willow'\n\
00406 # password: 'willow'\n\
00407 # name: 'household_objects'\n\
00408 # module: 'tabletop'\n\
00409 string db\n\
00410 \n\
00411 ================================================================================\n\
00412 MSG: geometry_msgs/PoseStamped\n\
00413 # A Pose with reference coordinate frame and timestamp\n\
00414 Header header\n\
00415 Pose pose\n\
00416 \n\
00417 ================================================================================\n\
00418 MSG: std_msgs/Header\n\
00419 # Standard metadata for higher-level stamped data types.\n\
00420 # This is generally used to communicate timestamped data \n\
00421 # in a particular coordinate frame.\n\
00422 # \n\
00423 # sequence ID: consecutively increasing ID \n\
00424 uint32 seq\n\
00425 #Two-integer timestamp that is expressed as:\n\
00426 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00427 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00428 # time-handling sugar is provided by the client library\n\
00429 time stamp\n\
00430 #Frame this data is associated with\n\
00431 # 0: no frame\n\
00432 # 1: global frame\n\
00433 string frame_id\n\
00434 \n\
00435 ================================================================================\n\
00436 MSG: geometry_msgs/Pose\n\
00437 # A representation of pose in free space, composed of postion and orientation. \n\
00438 Point position\n\
00439 Quaternion orientation\n\
00440 \n\
00441 ================================================================================\n\
00442 MSG: geometry_msgs/Point\n\
00443 # This contains the position of a point in free space\n\
00444 float64 x\n\
00445 float64 y\n\
00446 float64 z\n\
00447 \n\
00448 ================================================================================\n\
00449 MSG: geometry_msgs/Quaternion\n\
00450 # This represents an orientation in free space in quaternion form.\n\
00451 \n\
00452 float64 x\n\
00453 float64 y\n\
00454 float64 z\n\
00455 float64 w\n\
00456 \n\
00457 ";
00458 }
00459
00460 static const char* value(const ::tabletop_object_detector::TabletopObjectRecognitionResponse_<ContainerAllocator> &) { return value(); }
00461 };
00462
00463 }
00464 }
00465
00466 namespace ros
00467 {
00468 namespace serialization
00469 {
00470
00471 template<class ContainerAllocator> struct Serializer< ::tabletop_object_detector::TabletopObjectRecognitionRequest_<ContainerAllocator> >
00472 {
00473 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00474 {
00475 stream.next(m.table);
00476 stream.next(m.clusters);
00477 stream.next(m.num_models);
00478 stream.next(m.perform_fit_merge);
00479 }
00480
00481 ROS_DECLARE_ALLINONE_SERIALIZER;
00482 };
00483 }
00484 }
00485
00486
00487 namespace ros
00488 {
00489 namespace serialization
00490 {
00491
00492 template<class ContainerAllocator> struct Serializer< ::tabletop_object_detector::TabletopObjectRecognitionResponse_<ContainerAllocator> >
00493 {
00494 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00495 {
00496 stream.next(m.models);
00497 stream.next(m.cluster_model_indices);
00498 }
00499
00500 ROS_DECLARE_ALLINONE_SERIALIZER;
00501 };
00502 }
00503 }
00504
00505 namespace ros
00506 {
00507 namespace service_traits
00508 {
00509 template<>
00510 struct MD5Sum<tabletop_object_detector::TabletopObjectRecognition> {
00511 static const char* value()
00512 {
00513 return "4f5152c3c05da433a6b358cb63e0ee96";
00514 }
00515
00516 static const char* value(const tabletop_object_detector::TabletopObjectRecognition&) { return value(); }
00517 };
00518
00519 template<>
00520 struct DataType<tabletop_object_detector::TabletopObjectRecognition> {
00521 static const char* value()
00522 {
00523 return "tabletop_object_detector/TabletopObjectRecognition";
00524 }
00525
00526 static const char* value(const tabletop_object_detector::TabletopObjectRecognition&) { return value(); }
00527 };
00528
00529 template<class ContainerAllocator>
00530 struct MD5Sum<tabletop_object_detector::TabletopObjectRecognitionRequest_<ContainerAllocator> > {
00531 static const char* value()
00532 {
00533 return "4f5152c3c05da433a6b358cb63e0ee96";
00534 }
00535
00536 static const char* value(const tabletop_object_detector::TabletopObjectRecognitionRequest_<ContainerAllocator> &) { return value(); }
00537 };
00538
00539 template<class ContainerAllocator>
00540 struct DataType<tabletop_object_detector::TabletopObjectRecognitionRequest_<ContainerAllocator> > {
00541 static const char* value()
00542 {
00543 return "tabletop_object_detector/TabletopObjectRecognition";
00544 }
00545
00546 static const char* value(const tabletop_object_detector::TabletopObjectRecognitionRequest_<ContainerAllocator> &) { return value(); }
00547 };
00548
00549 template<class ContainerAllocator>
00550 struct MD5Sum<tabletop_object_detector::TabletopObjectRecognitionResponse_<ContainerAllocator> > {
00551 static const char* value()
00552 {
00553 return "4f5152c3c05da433a6b358cb63e0ee96";
00554 }
00555
00556 static const char* value(const tabletop_object_detector::TabletopObjectRecognitionResponse_<ContainerAllocator> &) { return value(); }
00557 };
00558
00559 template<class ContainerAllocator>
00560 struct DataType<tabletop_object_detector::TabletopObjectRecognitionResponse_<ContainerAllocator> > {
00561 static const char* value()
00562 {
00563 return "tabletop_object_detector/TabletopObjectRecognition";
00564 }
00565
00566 static const char* value(const tabletop_object_detector::TabletopObjectRecognitionResponse_<ContainerAllocator> &) { return value(); }
00567 };
00568
00569 }
00570 }
00571
00572 #endif // TABLETOP_OBJECT_DETECTOR_SERVICE_TABLETOPOBJECTRECOGNITION_H
00573