00001
00002 #ifndef GRASPIT_INTERFACE_MSGS_SERVICE_GENERATEGRASP_H
00003 #define GRASPIT_INTERFACE_MSGS_SERVICE_GENERATEGRASP_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 "ros/service_traits.h"
00014
00015
00016
00017 #include "geometry_msgs/Pose.h"
00018
00019 namespace graspit_interface_msgs
00020 {
00021 template <class ContainerAllocator>
00022 struct GenerateGraspRequest_ : public ros::Message
00023 {
00024 typedef GenerateGraspRequest_<ContainerAllocator> Type;
00025
00026 GenerateGraspRequest_()
00027 : model_id(0)
00028 , energy_low_threshold(0.0)
00029 , energy_high_threshold(0.0)
00030 , reject_fingertip_collision(false)
00031 , request_tabletop(false)
00032 , tabletop_file_name()
00033 {
00034 }
00035
00036 GenerateGraspRequest_(const ContainerAllocator& _alloc)
00037 : model_id(0)
00038 , energy_low_threshold(0.0)
00039 , energy_high_threshold(0.0)
00040 , reject_fingertip_collision(false)
00041 , request_tabletop(false)
00042 , tabletop_file_name(_alloc)
00043 {
00044 }
00045
00046 typedef int32_t _model_id_type;
00047 int32_t model_id;
00048
00049 typedef float _energy_low_threshold_type;
00050 float energy_low_threshold;
00051
00052 typedef float _energy_high_threshold_type;
00053 float energy_high_threshold;
00054
00055 typedef uint8_t _reject_fingertip_collision_type;
00056 uint8_t reject_fingertip_collision;
00057
00058 typedef uint8_t _request_tabletop_type;
00059 uint8_t request_tabletop;
00060
00061 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _tabletop_file_name_type;
00062 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > tabletop_file_name;
00063
00064
00065 private:
00066 static const char* __s_getDataType_() { return "graspit_interface_msgs/GenerateGraspRequest"; }
00067 public:
00068 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00069
00070 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00071
00072 private:
00073 static const char* __s_getMD5Sum_() { return "7ffa75655a6721d5c28cbaab0c7b2d37"; }
00074 public:
00075 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00076
00077 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00078
00079 private:
00080 static const char* __s_getServerMD5Sum_() { return "f1c3a9961097a13105ff34e75a3ade6f"; }
00081 public:
00082 ROS_DEPRECATED static const std::string __s_getServerMD5Sum() { return __s_getServerMD5Sum_(); }
00083
00084 ROS_DEPRECATED const std::string __getServerMD5Sum() const { return __s_getServerMD5Sum_(); }
00085
00086 private:
00087 static const char* __s_getMessageDefinition_() { return "\n\
00088 \n\
00089 \n\
00090 \n\
00091 \n\
00092 \n\
00093 \n\
00094 \n\
00095 \n\
00096 \n\
00097 int32 model_id\n\
00098 \n\
00099 \n\
00100 float32 energy_low_threshold\n\
00101 \n\
00102 \n\
00103 float32 energy_high_threshold\n\
00104 \n\
00105 \n\
00106 bool reject_fingertip_collision\n\
00107 \n\
00108 \n\
00109 bool request_tabletop\n\
00110 \n\
00111 \n\
00112 string tabletop_file_name\n\
00113 \n\
00114 "; }
00115 public:
00116 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00117
00118 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00119
00120 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00121 {
00122 ros::serialization::OStream stream(write_ptr, 1000000000);
00123 ros::serialization::serialize(stream, model_id);
00124 ros::serialization::serialize(stream, energy_low_threshold);
00125 ros::serialization::serialize(stream, energy_high_threshold);
00126 ros::serialization::serialize(stream, reject_fingertip_collision);
00127 ros::serialization::serialize(stream, request_tabletop);
00128 ros::serialization::serialize(stream, tabletop_file_name);
00129 return stream.getData();
00130 }
00131
00132 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00133 {
00134 ros::serialization::IStream stream(read_ptr, 1000000000);
00135 ros::serialization::deserialize(stream, model_id);
00136 ros::serialization::deserialize(stream, energy_low_threshold);
00137 ros::serialization::deserialize(stream, energy_high_threshold);
00138 ros::serialization::deserialize(stream, reject_fingertip_collision);
00139 ros::serialization::deserialize(stream, request_tabletop);
00140 ros::serialization::deserialize(stream, tabletop_file_name);
00141 return stream.getData();
00142 }
00143
00144 ROS_DEPRECATED virtual uint32_t serializationLength() const
00145 {
00146 uint32_t size = 0;
00147 size += ros::serialization::serializationLength(model_id);
00148 size += ros::serialization::serializationLength(energy_low_threshold);
00149 size += ros::serialization::serializationLength(energy_high_threshold);
00150 size += ros::serialization::serializationLength(reject_fingertip_collision);
00151 size += ros::serialization::serializationLength(request_tabletop);
00152 size += ros::serialization::serializationLength(tabletop_file_name);
00153 return size;
00154 }
00155
00156 typedef boost::shared_ptr< ::graspit_interface_msgs::GenerateGraspRequest_<ContainerAllocator> > Ptr;
00157 typedef boost::shared_ptr< ::graspit_interface_msgs::GenerateGraspRequest_<ContainerAllocator> const> ConstPtr;
00158 };
00159 typedef ::graspit_interface_msgs::GenerateGraspRequest_<std::allocator<void> > GenerateGraspRequest;
00160
00161 typedef boost::shared_ptr< ::graspit_interface_msgs::GenerateGraspRequest> GenerateGraspRequestPtr;
00162 typedef boost::shared_ptr< ::graspit_interface_msgs::GenerateGraspRequest const> GenerateGraspRequestConstPtr;
00163
00164
00165 template <class ContainerAllocator>
00166 struct GenerateGraspResponse_ : public ros::Message
00167 {
00168 typedef GenerateGraspResponse_<ContainerAllocator> Type;
00169
00170 GenerateGraspResponse_()
00171 : result(0)
00172 , hand_object_collision(false)
00173 , grasp_pose()
00174 , grasp_joint_angle(0.0)
00175 , grasp_energy(0.0)
00176 , gripper_tabletop_clearance(0.0)
00177 , gripper_object_distance(0.0)
00178 {
00179 }
00180
00181 GenerateGraspResponse_(const ContainerAllocator& _alloc)
00182 : result(0)
00183 , hand_object_collision(false)
00184 , grasp_pose(_alloc)
00185 , grasp_joint_angle(0.0)
00186 , grasp_energy(0.0)
00187 , gripper_tabletop_clearance(0.0)
00188 , gripper_object_distance(0.0)
00189 {
00190 }
00191
00192 typedef int32_t _result_type;
00193 int32_t result;
00194
00195 typedef uint8_t _hand_object_collision_type;
00196 uint8_t hand_object_collision;
00197
00198 typedef ::geometry_msgs::Pose_<ContainerAllocator> _grasp_pose_type;
00199 ::geometry_msgs::Pose_<ContainerAllocator> grasp_pose;
00200
00201 typedef float _grasp_joint_angle_type;
00202 float grasp_joint_angle;
00203
00204 typedef float _grasp_energy_type;
00205 float grasp_energy;
00206
00207 typedef double _gripper_tabletop_clearance_type;
00208 double gripper_tabletop_clearance;
00209
00210 typedef double _gripper_object_distance_type;
00211 double gripper_object_distance;
00212
00213 enum { GENERATE_SUCCESS = 0 };
00214 enum { GENERATE_FAILURE = 1 };
00215
00216 private:
00217 static const char* __s_getDataType_() { return "graspit_interface_msgs/GenerateGraspResponse"; }
00218 public:
00219 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00220
00221 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00222
00223 private:
00224 static const char* __s_getMD5Sum_() { return "886c12418c3c95650818d6b3a5f6511b"; }
00225 public:
00226 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00227
00228 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00229
00230 private:
00231 static const char* __s_getServerMD5Sum_() { return "f1c3a9961097a13105ff34e75a3ade6f"; }
00232 public:
00233 ROS_DEPRECATED static const std::string __s_getServerMD5Sum() { return __s_getServerMD5Sum_(); }
00234
00235 ROS_DEPRECATED const std::string __getServerMD5Sum() const { return __s_getServerMD5Sum_(); }
00236
00237 private:
00238 static const char* __s_getMessageDefinition_() { return "\n\
00239 \n\
00240 int32 GENERATE_SUCCESS = 0\n\
00241 int32 GENERATE_FAILURE = 1\n\
00242 int32 result\n\
00243 \n\
00244 \n\
00245 bool hand_object_collision\n\
00246 \n\
00247 \n\
00248 geometry_msgs/Pose grasp_pose\n\
00249 \n\
00250 \n\
00251 float32 grasp_joint_angle\n\
00252 \n\
00253 \n\
00254 float32 grasp_energy\n\
00255 \n\
00256 \n\
00257 float64 gripper_tabletop_clearance\n\
00258 \n\
00259 \n\
00260 float64 gripper_object_distance\n\
00261 \n\
00262 \n\
00263 \n\
00264 ================================================================================\n\
00265 MSG: geometry_msgs/Pose\n\
00266 # A representation of pose in free space, composed of postion and orientation. \n\
00267 Point position\n\
00268 Quaternion orientation\n\
00269 \n\
00270 ================================================================================\n\
00271 MSG: geometry_msgs/Point\n\
00272 # This contains the position of a point in free space\n\
00273 float64 x\n\
00274 float64 y\n\
00275 float64 z\n\
00276 \n\
00277 ================================================================================\n\
00278 MSG: geometry_msgs/Quaternion\n\
00279 # This represents an orientation in free space in quaternion form.\n\
00280 \n\
00281 float64 x\n\
00282 float64 y\n\
00283 float64 z\n\
00284 float64 w\n\
00285 \n\
00286 "; }
00287 public:
00288 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00289
00290 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00291
00292 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00293 {
00294 ros::serialization::OStream stream(write_ptr, 1000000000);
00295 ros::serialization::serialize(stream, result);
00296 ros::serialization::serialize(stream, hand_object_collision);
00297 ros::serialization::serialize(stream, grasp_pose);
00298 ros::serialization::serialize(stream, grasp_joint_angle);
00299 ros::serialization::serialize(stream, grasp_energy);
00300 ros::serialization::serialize(stream, gripper_tabletop_clearance);
00301 ros::serialization::serialize(stream, gripper_object_distance);
00302 return stream.getData();
00303 }
00304
00305 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00306 {
00307 ros::serialization::IStream stream(read_ptr, 1000000000);
00308 ros::serialization::deserialize(stream, result);
00309 ros::serialization::deserialize(stream, hand_object_collision);
00310 ros::serialization::deserialize(stream, grasp_pose);
00311 ros::serialization::deserialize(stream, grasp_joint_angle);
00312 ros::serialization::deserialize(stream, grasp_energy);
00313 ros::serialization::deserialize(stream, gripper_tabletop_clearance);
00314 ros::serialization::deserialize(stream, gripper_object_distance);
00315 return stream.getData();
00316 }
00317
00318 ROS_DEPRECATED virtual uint32_t serializationLength() const
00319 {
00320 uint32_t size = 0;
00321 size += ros::serialization::serializationLength(result);
00322 size += ros::serialization::serializationLength(hand_object_collision);
00323 size += ros::serialization::serializationLength(grasp_pose);
00324 size += ros::serialization::serializationLength(grasp_joint_angle);
00325 size += ros::serialization::serializationLength(grasp_energy);
00326 size += ros::serialization::serializationLength(gripper_tabletop_clearance);
00327 size += ros::serialization::serializationLength(gripper_object_distance);
00328 return size;
00329 }
00330
00331 typedef boost::shared_ptr< ::graspit_interface_msgs::GenerateGraspResponse_<ContainerAllocator> > Ptr;
00332 typedef boost::shared_ptr< ::graspit_interface_msgs::GenerateGraspResponse_<ContainerAllocator> const> ConstPtr;
00333 };
00334 typedef ::graspit_interface_msgs::GenerateGraspResponse_<std::allocator<void> > GenerateGraspResponse;
00335
00336 typedef boost::shared_ptr< ::graspit_interface_msgs::GenerateGraspResponse> GenerateGraspResponsePtr;
00337 typedef boost::shared_ptr< ::graspit_interface_msgs::GenerateGraspResponse const> GenerateGraspResponseConstPtr;
00338
00339 struct GenerateGrasp
00340 {
00341
00342 typedef GenerateGraspRequest Request;
00343 typedef GenerateGraspResponse Response;
00344 Request request;
00345 Response response;
00346
00347 typedef Request RequestType;
00348 typedef Response ResponseType;
00349 };
00350 }
00351
00352 namespace ros
00353 {
00354 namespace message_traits
00355 {
00356 template<class ContainerAllocator>
00357 struct MD5Sum< ::graspit_interface_msgs::GenerateGraspRequest_<ContainerAllocator> > {
00358 static const char* value()
00359 {
00360 return "7ffa75655a6721d5c28cbaab0c7b2d37";
00361 }
00362
00363 static const char* value(const ::graspit_interface_msgs::GenerateGraspRequest_<ContainerAllocator> &) { return value(); }
00364 static const uint64_t static_value1 = 0x7ffa75655a6721d5ULL;
00365 static const uint64_t static_value2 = 0xc28cbaab0c7b2d37ULL;
00366 };
00367
00368 template<class ContainerAllocator>
00369 struct DataType< ::graspit_interface_msgs::GenerateGraspRequest_<ContainerAllocator> > {
00370 static const char* value()
00371 {
00372 return "graspit_interface_msgs/GenerateGraspRequest";
00373 }
00374
00375 static const char* value(const ::graspit_interface_msgs::GenerateGraspRequest_<ContainerAllocator> &) { return value(); }
00376 };
00377
00378 template<class ContainerAllocator>
00379 struct Definition< ::graspit_interface_msgs::GenerateGraspRequest_<ContainerAllocator> > {
00380 static const char* value()
00381 {
00382 return "\n\
00383 \n\
00384 \n\
00385 \n\
00386 \n\
00387 \n\
00388 \n\
00389 \n\
00390 \n\
00391 \n\
00392 int32 model_id\n\
00393 \n\
00394 \n\
00395 float32 energy_low_threshold\n\
00396 \n\
00397 \n\
00398 float32 energy_high_threshold\n\
00399 \n\
00400 \n\
00401 bool reject_fingertip_collision\n\
00402 \n\
00403 \n\
00404 bool request_tabletop\n\
00405 \n\
00406 \n\
00407 string tabletop_file_name\n\
00408 \n\
00409 ";
00410 }
00411
00412 static const char* value(const ::graspit_interface_msgs::GenerateGraspRequest_<ContainerAllocator> &) { return value(); }
00413 };
00414
00415 }
00416 }
00417
00418
00419 namespace ros
00420 {
00421 namespace message_traits
00422 {
00423 template<class ContainerAllocator>
00424 struct MD5Sum< ::graspit_interface_msgs::GenerateGraspResponse_<ContainerAllocator> > {
00425 static const char* value()
00426 {
00427 return "886c12418c3c95650818d6b3a5f6511b";
00428 }
00429
00430 static const char* value(const ::graspit_interface_msgs::GenerateGraspResponse_<ContainerAllocator> &) { return value(); }
00431 static const uint64_t static_value1 = 0x886c12418c3c9565ULL;
00432 static const uint64_t static_value2 = 0x0818d6b3a5f6511bULL;
00433 };
00434
00435 template<class ContainerAllocator>
00436 struct DataType< ::graspit_interface_msgs::GenerateGraspResponse_<ContainerAllocator> > {
00437 static const char* value()
00438 {
00439 return "graspit_interface_msgs/GenerateGraspResponse";
00440 }
00441
00442 static const char* value(const ::graspit_interface_msgs::GenerateGraspResponse_<ContainerAllocator> &) { return value(); }
00443 };
00444
00445 template<class ContainerAllocator>
00446 struct Definition< ::graspit_interface_msgs::GenerateGraspResponse_<ContainerAllocator> > {
00447 static const char* value()
00448 {
00449 return "\n\
00450 \n\
00451 int32 GENERATE_SUCCESS = 0\n\
00452 int32 GENERATE_FAILURE = 1\n\
00453 int32 result\n\
00454 \n\
00455 \n\
00456 bool hand_object_collision\n\
00457 \n\
00458 \n\
00459 geometry_msgs/Pose grasp_pose\n\
00460 \n\
00461 \n\
00462 float32 grasp_joint_angle\n\
00463 \n\
00464 \n\
00465 float32 grasp_energy\n\
00466 \n\
00467 \n\
00468 float64 gripper_tabletop_clearance\n\
00469 \n\
00470 \n\
00471 float64 gripper_object_distance\n\
00472 \n\
00473 \n\
00474 \n\
00475 ================================================================================\n\
00476 MSG: geometry_msgs/Pose\n\
00477 # A representation of pose in free space, composed of postion and orientation. \n\
00478 Point position\n\
00479 Quaternion orientation\n\
00480 \n\
00481 ================================================================================\n\
00482 MSG: geometry_msgs/Point\n\
00483 # This contains the position of a point in free space\n\
00484 float64 x\n\
00485 float64 y\n\
00486 float64 z\n\
00487 \n\
00488 ================================================================================\n\
00489 MSG: geometry_msgs/Quaternion\n\
00490 # This represents an orientation in free space in quaternion form.\n\
00491 \n\
00492 float64 x\n\
00493 float64 y\n\
00494 float64 z\n\
00495 float64 w\n\
00496 \n\
00497 ";
00498 }
00499
00500 static const char* value(const ::graspit_interface_msgs::GenerateGraspResponse_<ContainerAllocator> &) { return value(); }
00501 };
00502
00503 template<class ContainerAllocator> struct IsFixedSize< ::graspit_interface_msgs::GenerateGraspResponse_<ContainerAllocator> > : public TrueType {};
00504 }
00505 }
00506
00507 namespace ros
00508 {
00509 namespace serialization
00510 {
00511
00512 template<class ContainerAllocator> struct Serializer< ::graspit_interface_msgs::GenerateGraspRequest_<ContainerAllocator> >
00513 {
00514 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00515 {
00516 stream.next(m.model_id);
00517 stream.next(m.energy_low_threshold);
00518 stream.next(m.energy_high_threshold);
00519 stream.next(m.reject_fingertip_collision);
00520 stream.next(m.request_tabletop);
00521 stream.next(m.tabletop_file_name);
00522 }
00523
00524 ROS_DECLARE_ALLINONE_SERIALIZER;
00525 };
00526 }
00527 }
00528
00529
00530 namespace ros
00531 {
00532 namespace serialization
00533 {
00534
00535 template<class ContainerAllocator> struct Serializer< ::graspit_interface_msgs::GenerateGraspResponse_<ContainerAllocator> >
00536 {
00537 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00538 {
00539 stream.next(m.result);
00540 stream.next(m.hand_object_collision);
00541 stream.next(m.grasp_pose);
00542 stream.next(m.grasp_joint_angle);
00543 stream.next(m.grasp_energy);
00544 stream.next(m.gripper_tabletop_clearance);
00545 stream.next(m.gripper_object_distance);
00546 }
00547
00548 ROS_DECLARE_ALLINONE_SERIALIZER;
00549 };
00550 }
00551 }
00552
00553 namespace ros
00554 {
00555 namespace service_traits
00556 {
00557 template<>
00558 struct MD5Sum<graspit_interface_msgs::GenerateGrasp> {
00559 static const char* value()
00560 {
00561 return "f1c3a9961097a13105ff34e75a3ade6f";
00562 }
00563
00564 static const char* value(const graspit_interface_msgs::GenerateGrasp&) { return value(); }
00565 };
00566
00567 template<>
00568 struct DataType<graspit_interface_msgs::GenerateGrasp> {
00569 static const char* value()
00570 {
00571 return "graspit_interface_msgs/GenerateGrasp";
00572 }
00573
00574 static const char* value(const graspit_interface_msgs::GenerateGrasp&) { return value(); }
00575 };
00576
00577 template<class ContainerAllocator>
00578 struct MD5Sum<graspit_interface_msgs::GenerateGraspRequest_<ContainerAllocator> > {
00579 static const char* value()
00580 {
00581 return "f1c3a9961097a13105ff34e75a3ade6f";
00582 }
00583
00584 static const char* value(const graspit_interface_msgs::GenerateGraspRequest_<ContainerAllocator> &) { return value(); }
00585 };
00586
00587 template<class ContainerAllocator>
00588 struct DataType<graspit_interface_msgs::GenerateGraspRequest_<ContainerAllocator> > {
00589 static const char* value()
00590 {
00591 return "graspit_interface_msgs/GenerateGrasp";
00592 }
00593
00594 static const char* value(const graspit_interface_msgs::GenerateGraspRequest_<ContainerAllocator> &) { return value(); }
00595 };
00596
00597 template<class ContainerAllocator>
00598 struct MD5Sum<graspit_interface_msgs::GenerateGraspResponse_<ContainerAllocator> > {
00599 static const char* value()
00600 {
00601 return "f1c3a9961097a13105ff34e75a3ade6f";
00602 }
00603
00604 static const char* value(const graspit_interface_msgs::GenerateGraspResponse_<ContainerAllocator> &) { return value(); }
00605 };
00606
00607 template<class ContainerAllocator>
00608 struct DataType<graspit_interface_msgs::GenerateGraspResponse_<ContainerAllocator> > {
00609 static const char* value()
00610 {
00611 return "graspit_interface_msgs/GenerateGrasp";
00612 }
00613
00614 static const char* value(const graspit_interface_msgs::GenerateGraspResponse_<ContainerAllocator> &) { return value(); }
00615 };
00616
00617 }
00618 }
00619
00620 #endif // GRASPIT_INTERFACE_MSGS_SERVICE_GENERATEGRASP_H
00621