00001
00002 #ifndef OBJECT_MANIPULATION_MSGS_MESSAGE_GRASP_H
00003 #define OBJECT_MANIPULATION_MSGS_MESSAGE_GRASP_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 "sensor_msgs/JointState.h"
00014 #include "sensor_msgs/JointState.h"
00015 #include "geometry_msgs/Pose.h"
00016
00017 namespace object_manipulation_msgs
00018 {
00019 template <class ContainerAllocator>
00020 struct Grasp_ : public ros::Message
00021 {
00022 typedef Grasp_<ContainerAllocator> Type;
00023
00024 Grasp_()
00025 : pre_grasp_posture()
00026 , grasp_posture()
00027 , grasp_pose()
00028 , success_probability(0.0)
00029 , cluster_rep(false)
00030 {
00031 }
00032
00033 Grasp_(const ContainerAllocator& _alloc)
00034 : pre_grasp_posture(_alloc)
00035 , grasp_posture(_alloc)
00036 , grasp_pose(_alloc)
00037 , success_probability(0.0)
00038 , cluster_rep(false)
00039 {
00040 }
00041
00042 typedef ::sensor_msgs::JointState_<ContainerAllocator> _pre_grasp_posture_type;
00043 ::sensor_msgs::JointState_<ContainerAllocator> pre_grasp_posture;
00044
00045 typedef ::sensor_msgs::JointState_<ContainerAllocator> _grasp_posture_type;
00046 ::sensor_msgs::JointState_<ContainerAllocator> grasp_posture;
00047
00048 typedef ::geometry_msgs::Pose_<ContainerAllocator> _grasp_pose_type;
00049 ::geometry_msgs::Pose_<ContainerAllocator> grasp_pose;
00050
00051 typedef double _success_probability_type;
00052 double success_probability;
00053
00054 typedef uint8_t _cluster_rep_type;
00055 uint8_t cluster_rep;
00056
00057
00058 private:
00059 static const char* __s_getDataType_() { return "object_manipulation_msgs/Grasp"; }
00060 public:
00061 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00062
00063 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00064
00065 private:
00066 static const char* __s_getMD5Sum_() { return "a447abc9a49aaff833c07915ee5565b4"; }
00067 public:
00068 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00069
00070 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00071
00072 private:
00073 static const char* __s_getMessageDefinition_() { return "\n\
00074 # The internal posture of the hand for the pre-grasp\n\
00075 # only positions are used\n\
00076 sensor_msgs/JointState pre_grasp_posture\n\
00077 \n\
00078 # The internal posture of the hand for the grasp\n\
00079 # positions and efforts are used\n\
00080 sensor_msgs/JointState grasp_posture\n\
00081 \n\
00082 # The position of the end-effector for the grasp relative to the object\n\
00083 geometry_msgs/Pose grasp_pose\n\
00084 \n\
00085 # The estimated probability of success for this grasp\n\
00086 float64 success_probability\n\
00087 \n\
00088 # Debug flag to indicate that this grasp would be the best in its cluster\n\
00089 bool cluster_rep\n\
00090 ================================================================================\n\
00091 MSG: sensor_msgs/JointState\n\
00092 # This is a message that holds data to describe the state of a set of torque controlled joints. \n\
00093 #\n\
00094 # The state of each joint (revolute or prismatic) is defined by:\n\
00095 # * the position of the joint (rad or m),\n\
00096 # * the velocity of the joint (rad/s or m/s) and \n\
00097 # * the effort that is applied in the joint (Nm or N).\n\
00098 #\n\
00099 # Each joint is uniquely identified by its name\n\
00100 # The header specifies the time at which the joint states were recorded. All the joint states\n\
00101 # in one message have to be recorded at the same time.\n\
00102 #\n\
00103 # This message consists of a multiple arrays, one for each part of the joint state. \n\
00104 # The goal is to make each of the fields optional. When e.g. your joints have no\n\
00105 # effort associated with them, you can leave the effort array empty. \n\
00106 #\n\
00107 # All arrays in this message should have the same size, or be empty.\n\
00108 # This is the only way to uniquely associate the joint name with the correct\n\
00109 # states.\n\
00110 \n\
00111 \n\
00112 Header header\n\
00113 \n\
00114 string[] name\n\
00115 float64[] position\n\
00116 float64[] velocity\n\
00117 float64[] effort\n\
00118 \n\
00119 ================================================================================\n\
00120 MSG: std_msgs/Header\n\
00121 # Standard metadata for higher-level stamped data types.\n\
00122 # This is generally used to communicate timestamped data \n\
00123 # in a particular coordinate frame.\n\
00124 # \n\
00125 # sequence ID: consecutively increasing ID \n\
00126 uint32 seq\n\
00127 #Two-integer timestamp that is expressed as:\n\
00128 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00129 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00130 # time-handling sugar is provided by the client library\n\
00131 time stamp\n\
00132 #Frame this data is associated with\n\
00133 # 0: no frame\n\
00134 # 1: global frame\n\
00135 string frame_id\n\
00136 \n\
00137 ================================================================================\n\
00138 MSG: geometry_msgs/Pose\n\
00139 # A representation of pose in free space, composed of postion and orientation. \n\
00140 Point position\n\
00141 Quaternion orientation\n\
00142 \n\
00143 ================================================================================\n\
00144 MSG: geometry_msgs/Point\n\
00145 # This contains the position of a point in free space\n\
00146 float64 x\n\
00147 float64 y\n\
00148 float64 z\n\
00149 \n\
00150 ================================================================================\n\
00151 MSG: geometry_msgs/Quaternion\n\
00152 # This represents an orientation in free space in quaternion form.\n\
00153 \n\
00154 float64 x\n\
00155 float64 y\n\
00156 float64 z\n\
00157 float64 w\n\
00158 \n\
00159 "; }
00160 public:
00161 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00162
00163 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00164
00165 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00166 {
00167 ros::serialization::OStream stream(write_ptr, 1000000000);
00168 ros::serialization::serialize(stream, pre_grasp_posture);
00169 ros::serialization::serialize(stream, grasp_posture);
00170 ros::serialization::serialize(stream, grasp_pose);
00171 ros::serialization::serialize(stream, success_probability);
00172 ros::serialization::serialize(stream, cluster_rep);
00173 return stream.getData();
00174 }
00175
00176 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00177 {
00178 ros::serialization::IStream stream(read_ptr, 1000000000);
00179 ros::serialization::deserialize(stream, pre_grasp_posture);
00180 ros::serialization::deserialize(stream, grasp_posture);
00181 ros::serialization::deserialize(stream, grasp_pose);
00182 ros::serialization::deserialize(stream, success_probability);
00183 ros::serialization::deserialize(stream, cluster_rep);
00184 return stream.getData();
00185 }
00186
00187 ROS_DEPRECATED virtual uint32_t serializationLength() const
00188 {
00189 uint32_t size = 0;
00190 size += ros::serialization::serializationLength(pre_grasp_posture);
00191 size += ros::serialization::serializationLength(grasp_posture);
00192 size += ros::serialization::serializationLength(grasp_pose);
00193 size += ros::serialization::serializationLength(success_probability);
00194 size += ros::serialization::serializationLength(cluster_rep);
00195 return size;
00196 }
00197
00198 typedef boost::shared_ptr< ::object_manipulation_msgs::Grasp_<ContainerAllocator> > Ptr;
00199 typedef boost::shared_ptr< ::object_manipulation_msgs::Grasp_<ContainerAllocator> const> ConstPtr;
00200 };
00201 typedef ::object_manipulation_msgs::Grasp_<std::allocator<void> > Grasp;
00202
00203 typedef boost::shared_ptr< ::object_manipulation_msgs::Grasp> GraspPtr;
00204 typedef boost::shared_ptr< ::object_manipulation_msgs::Grasp const> GraspConstPtr;
00205
00206
00207 template<typename ContainerAllocator>
00208 std::ostream& operator<<(std::ostream& s, const ::object_manipulation_msgs::Grasp_<ContainerAllocator> & v)
00209 {
00210 ros::message_operations::Printer< ::object_manipulation_msgs::Grasp_<ContainerAllocator> >::stream(s, "", v);
00211 return s;}
00212
00213 }
00214
00215 namespace ros
00216 {
00217 namespace message_traits
00218 {
00219 template<class ContainerAllocator>
00220 struct MD5Sum< ::object_manipulation_msgs::Grasp_<ContainerAllocator> > {
00221 static const char* value()
00222 {
00223 return "a447abc9a49aaff833c07915ee5565b4";
00224 }
00225
00226 static const char* value(const ::object_manipulation_msgs::Grasp_<ContainerAllocator> &) { return value(); }
00227 static const uint64_t static_value1 = 0xa447abc9a49aaff8ULL;
00228 static const uint64_t static_value2 = 0x33c07915ee5565b4ULL;
00229 };
00230
00231 template<class ContainerAllocator>
00232 struct DataType< ::object_manipulation_msgs::Grasp_<ContainerAllocator> > {
00233 static const char* value()
00234 {
00235 return "object_manipulation_msgs/Grasp";
00236 }
00237
00238 static const char* value(const ::object_manipulation_msgs::Grasp_<ContainerAllocator> &) { return value(); }
00239 };
00240
00241 template<class ContainerAllocator>
00242 struct Definition< ::object_manipulation_msgs::Grasp_<ContainerAllocator> > {
00243 static const char* value()
00244 {
00245 return "\n\
00246 # The internal posture of the hand for the pre-grasp\n\
00247 # only positions are used\n\
00248 sensor_msgs/JointState pre_grasp_posture\n\
00249 \n\
00250 # The internal posture of the hand for the grasp\n\
00251 # positions and efforts are used\n\
00252 sensor_msgs/JointState grasp_posture\n\
00253 \n\
00254 # The position of the end-effector for the grasp relative to the object\n\
00255 geometry_msgs/Pose grasp_pose\n\
00256 \n\
00257 # The estimated probability of success for this grasp\n\
00258 float64 success_probability\n\
00259 \n\
00260 # Debug flag to indicate that this grasp would be the best in its cluster\n\
00261 bool cluster_rep\n\
00262 ================================================================================\n\
00263 MSG: sensor_msgs/JointState\n\
00264 # This is a message that holds data to describe the state of a set of torque controlled joints. \n\
00265 #\n\
00266 # The state of each joint (revolute or prismatic) is defined by:\n\
00267 # * the position of the joint (rad or m),\n\
00268 # * the velocity of the joint (rad/s or m/s) and \n\
00269 # * the effort that is applied in the joint (Nm or N).\n\
00270 #\n\
00271 # Each joint is uniquely identified by its name\n\
00272 # The header specifies the time at which the joint states were recorded. All the joint states\n\
00273 # in one message have to be recorded at the same time.\n\
00274 #\n\
00275 # This message consists of a multiple arrays, one for each part of the joint state. \n\
00276 # The goal is to make each of the fields optional. When e.g. your joints have no\n\
00277 # effort associated with them, you can leave the effort array empty. \n\
00278 #\n\
00279 # All arrays in this message should have the same size, or be empty.\n\
00280 # This is the only way to uniquely associate the joint name with the correct\n\
00281 # states.\n\
00282 \n\
00283 \n\
00284 Header header\n\
00285 \n\
00286 string[] name\n\
00287 float64[] position\n\
00288 float64[] velocity\n\
00289 float64[] effort\n\
00290 \n\
00291 ================================================================================\n\
00292 MSG: std_msgs/Header\n\
00293 # Standard metadata for higher-level stamped data types.\n\
00294 # This is generally used to communicate timestamped data \n\
00295 # in a particular coordinate frame.\n\
00296 # \n\
00297 # sequence ID: consecutively increasing ID \n\
00298 uint32 seq\n\
00299 #Two-integer timestamp that is expressed as:\n\
00300 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00301 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00302 # time-handling sugar is provided by the client library\n\
00303 time stamp\n\
00304 #Frame this data is associated with\n\
00305 # 0: no frame\n\
00306 # 1: global frame\n\
00307 string frame_id\n\
00308 \n\
00309 ================================================================================\n\
00310 MSG: geometry_msgs/Pose\n\
00311 # A representation of pose in free space, composed of postion and orientation. \n\
00312 Point position\n\
00313 Quaternion orientation\n\
00314 \n\
00315 ================================================================================\n\
00316 MSG: geometry_msgs/Point\n\
00317 # This contains the position of a point in free space\n\
00318 float64 x\n\
00319 float64 y\n\
00320 float64 z\n\
00321 \n\
00322 ================================================================================\n\
00323 MSG: geometry_msgs/Quaternion\n\
00324 # This represents an orientation in free space in quaternion form.\n\
00325 \n\
00326 float64 x\n\
00327 float64 y\n\
00328 float64 z\n\
00329 float64 w\n\
00330 \n\
00331 ";
00332 }
00333
00334 static const char* value(const ::object_manipulation_msgs::Grasp_<ContainerAllocator> &) { return value(); }
00335 };
00336
00337 }
00338 }
00339
00340 namespace ros
00341 {
00342 namespace serialization
00343 {
00344
00345 template<class ContainerAllocator> struct Serializer< ::object_manipulation_msgs::Grasp_<ContainerAllocator> >
00346 {
00347 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00348 {
00349 stream.next(m.pre_grasp_posture);
00350 stream.next(m.grasp_posture);
00351 stream.next(m.grasp_pose);
00352 stream.next(m.success_probability);
00353 stream.next(m.cluster_rep);
00354 }
00355
00356 ROS_DECLARE_ALLINONE_SERIALIZER;
00357 };
00358 }
00359 }
00360
00361 namespace ros
00362 {
00363 namespace message_operations
00364 {
00365
00366 template<class ContainerAllocator>
00367 struct Printer< ::object_manipulation_msgs::Grasp_<ContainerAllocator> >
00368 {
00369 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::object_manipulation_msgs::Grasp_<ContainerAllocator> & v)
00370 {
00371 s << indent << "pre_grasp_posture: ";
00372 s << std::endl;
00373 Printer< ::sensor_msgs::JointState_<ContainerAllocator> >::stream(s, indent + " ", v.pre_grasp_posture);
00374 s << indent << "grasp_posture: ";
00375 s << std::endl;
00376 Printer< ::sensor_msgs::JointState_<ContainerAllocator> >::stream(s, indent + " ", v.grasp_posture);
00377 s << indent << "grasp_pose: ";
00378 s << std::endl;
00379 Printer< ::geometry_msgs::Pose_<ContainerAllocator> >::stream(s, indent + " ", v.grasp_pose);
00380 s << indent << "success_probability: ";
00381 Printer<double>::stream(s, indent + " ", v.success_probability);
00382 s << indent << "cluster_rep: ";
00383 Printer<uint8_t>::stream(s, indent + " ", v.cluster_rep);
00384 }
00385 };
00386
00387
00388 }
00389 }
00390
00391 #endif // OBJECT_MANIPULATION_MSGS_MESSAGE_GRASP_H
00392