00001
00002 #ifndef OBJECT_MANIPULATION_MSGS_MESSAGE_PICKUPRESULT_H
00003 #define OBJECT_MANIPULATION_MSGS_MESSAGE_PICKUPRESULT_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 "object_manipulation_msgs/ManipulationResult.h"
00018 #include "manipulation_msgs/Grasp.h"
00019 #include "manipulation_msgs/Grasp.h"
00020 #include "object_manipulation_msgs/GraspResult.h"
00021
00022 namespace object_manipulation_msgs
00023 {
00024 template <class ContainerAllocator>
00025 struct PickupResult_ {
00026 typedef PickupResult_<ContainerAllocator> Type;
00027
00028 PickupResult_()
00029 : manipulation_result()
00030 , grasp()
00031 , attempted_grasps()
00032 , attempted_grasp_results()
00033 {
00034 }
00035
00036 PickupResult_(const ContainerAllocator& _alloc)
00037 : manipulation_result(_alloc)
00038 , grasp(_alloc)
00039 , attempted_grasps(_alloc)
00040 , attempted_grasp_results(_alloc)
00041 {
00042 }
00043
00044 typedef ::object_manipulation_msgs::ManipulationResult_<ContainerAllocator> _manipulation_result_type;
00045 ::object_manipulation_msgs::ManipulationResult_<ContainerAllocator> manipulation_result;
00046
00047 typedef ::manipulation_msgs::Grasp_<ContainerAllocator> _grasp_type;
00048 ::manipulation_msgs::Grasp_<ContainerAllocator> grasp;
00049
00050 typedef std::vector< ::manipulation_msgs::Grasp_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::manipulation_msgs::Grasp_<ContainerAllocator> >::other > _attempted_grasps_type;
00051 std::vector< ::manipulation_msgs::Grasp_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::manipulation_msgs::Grasp_<ContainerAllocator> >::other > attempted_grasps;
00052
00053 typedef std::vector< ::object_manipulation_msgs::GraspResult_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::object_manipulation_msgs::GraspResult_<ContainerAllocator> >::other > _attempted_grasp_results_type;
00054 std::vector< ::object_manipulation_msgs::GraspResult_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::object_manipulation_msgs::GraspResult_<ContainerAllocator> >::other > attempted_grasp_results;
00055
00056
00057 typedef boost::shared_ptr< ::object_manipulation_msgs::PickupResult_<ContainerAllocator> > Ptr;
00058 typedef boost::shared_ptr< ::object_manipulation_msgs::PickupResult_<ContainerAllocator> const> ConstPtr;
00059 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00060 };
00061 typedef ::object_manipulation_msgs::PickupResult_<std::allocator<void> > PickupResult;
00062
00063 typedef boost::shared_ptr< ::object_manipulation_msgs::PickupResult> PickupResultPtr;
00064 typedef boost::shared_ptr< ::object_manipulation_msgs::PickupResult const> PickupResultConstPtr;
00065
00066
00067 template<typename ContainerAllocator>
00068 std::ostream& operator<<(std::ostream& s, const ::object_manipulation_msgs::PickupResult_<ContainerAllocator> & v)
00069 {
00070 ros::message_operations::Printer< ::object_manipulation_msgs::PickupResult_<ContainerAllocator> >::stream(s, "", v);
00071 return s;}
00072
00073 }
00074
00075 namespace ros
00076 {
00077 namespace message_traits
00078 {
00079 template<class ContainerAllocator> struct IsMessage< ::object_manipulation_msgs::PickupResult_<ContainerAllocator> > : public TrueType {};
00080 template<class ContainerAllocator> struct IsMessage< ::object_manipulation_msgs::PickupResult_<ContainerAllocator> const> : public TrueType {};
00081 template<class ContainerAllocator>
00082 struct MD5Sum< ::object_manipulation_msgs::PickupResult_<ContainerAllocator> > {
00083 static const char* value()
00084 {
00085 return "39cd5db390aea1106e31a3fa0b90019f";
00086 }
00087
00088 static const char* value(const ::object_manipulation_msgs::PickupResult_<ContainerAllocator> &) { return value(); }
00089 static const uint64_t static_value1 = 0x39cd5db390aea110ULL;
00090 static const uint64_t static_value2 = 0x6e31a3fa0b90019fULL;
00091 };
00092
00093 template<class ContainerAllocator>
00094 struct DataType< ::object_manipulation_msgs::PickupResult_<ContainerAllocator> > {
00095 static const char* value()
00096 {
00097 return "object_manipulation_msgs/PickupResult";
00098 }
00099
00100 static const char* value(const ::object_manipulation_msgs::PickupResult_<ContainerAllocator> &) { return value(); }
00101 };
00102
00103 template<class ContainerAllocator>
00104 struct Definition< ::object_manipulation_msgs::PickupResult_<ContainerAllocator> > {
00105 static const char* value()
00106 {
00107 return "# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======\n\
00108 \n\
00109 # The overall result of the pickup attempt\n\
00110 ManipulationResult manipulation_result\n\
00111 \n\
00112 # The performed grasp, if attempt was successful\n\
00113 manipulation_msgs/Grasp grasp\n\
00114 \n\
00115 # the complete list of attempted grasp, in the order in which they have been attempted\n\
00116 # the successful one should be the last one in this list\n\
00117 manipulation_msgs/Grasp[] attempted_grasps\n\
00118 \n\
00119 # the outcomes of the attempted grasps, in the same order as attempted_grasps\n\
00120 GraspResult[] attempted_grasp_results\n\
00121 \n\
00122 \n\
00123 ================================================================================\n\
00124 MSG: object_manipulation_msgs/ManipulationResult\n\
00125 # Result codes for manipulation tasks\n\
00126 \n\
00127 # task completed as expected\n\
00128 # generally means you can proceed as planned\n\
00129 int32 SUCCESS = 1\n\
00130 \n\
00131 # task not possible (e.g. out of reach or obstacles in the way)\n\
00132 # generally means that the world was not disturbed, so you can try another task\n\
00133 int32 UNFEASIBLE = -1\n\
00134 \n\
00135 # task was thought possible, but failed due to unexpected events during execution\n\
00136 # it is likely that the world was disturbed, so you are encouraged to refresh\n\
00137 # your sensed world model before proceeding to another task\n\
00138 int32 FAILED = -2\n\
00139 \n\
00140 # a lower level error prevented task completion (e.g. joint controller not responding)\n\
00141 # generally requires human attention\n\
00142 int32 ERROR = -3\n\
00143 \n\
00144 # means that at some point during execution we ended up in a state that the collision-aware\n\
00145 # arm navigation module will not move out of. The world was likely not disturbed, but you \n\
00146 # probably need a new collision map to move the arm out of the stuck position\n\
00147 int32 ARM_MOVEMENT_PREVENTED = -4\n\
00148 \n\
00149 # specific to grasp actions\n\
00150 # the object was grasped successfully, but the lift attempt could not achieve the minimum lift distance requested\n\
00151 # it is likely that the collision environment will see collisions between the hand/object and the support surface\n\
00152 int32 LIFT_FAILED = -5\n\
00153 \n\
00154 # specific to place actions\n\
00155 # the object was placed successfully, but the retreat attempt could not achieve the minimum retreat distance requested\n\
00156 # it is likely that the collision environment will see collisions between the hand and the object\n\
00157 int32 RETREAT_FAILED = -6\n\
00158 \n\
00159 # indicates that somewhere along the line a human said \"wait, stop, this is bad, go back and do something else\"\n\
00160 int32 CANCELLED = -7\n\
00161 \n\
00162 # the actual value of this error code\n\
00163 int32 value\n\
00164 \n\
00165 ================================================================================\n\
00166 MSG: manipulation_msgs/Grasp\n\
00167 # A name for this grasp\n\
00168 string id\n\
00169 \n\
00170 # The internal posture of the hand for the pre-grasp\n\
00171 # only positions are used\n\
00172 sensor_msgs/JointState pre_grasp_posture\n\
00173 \n\
00174 # The internal posture of the hand for the grasp\n\
00175 # positions and efforts are used\n\
00176 sensor_msgs/JointState grasp_posture\n\
00177 \n\
00178 # The position of the end-effector for the grasp relative to a reference frame \n\
00179 # (that is always specified elsewhere, not in this message)\n\
00180 geometry_msgs/PoseStamped grasp_pose\n\
00181 \n\
00182 # The estimated probability of success for this grasp, or some other\n\
00183 # measure of how \"good\" it is.\n\
00184 float64 grasp_quality\n\
00185 \n\
00186 # The approach motion\n\
00187 GripperTranslation approach\n\
00188 \n\
00189 # The retreat motion\n\
00190 GripperTranslation retreat\n\
00191 \n\
00192 # the maximum contact force to use while grasping (<=0 to disable)\n\
00193 float32 max_contact_force\n\
00194 \n\
00195 # an optional list of obstacles that we have semantic information about\n\
00196 # and that can be touched/pushed/moved in the course of grasping\n\
00197 string[] allowed_touch_objects\n\
00198 \n\
00199 ================================================================================\n\
00200 MSG: sensor_msgs/JointState\n\
00201 # This is a message that holds data to describe the state of a set of torque controlled joints. \n\
00202 #\n\
00203 # The state of each joint (revolute or prismatic) is defined by:\n\
00204 # * the position of the joint (rad or m),\n\
00205 # * the velocity of the joint (rad/s or m/s) and \n\
00206 # * the effort that is applied in the joint (Nm or N).\n\
00207 #\n\
00208 # Each joint is uniquely identified by its name\n\
00209 # The header specifies the time at which the joint states were recorded. All the joint states\n\
00210 # in one message have to be recorded at the same time.\n\
00211 #\n\
00212 # This message consists of a multiple arrays, one for each part of the joint state. \n\
00213 # The goal is to make each of the fields optional. When e.g. your joints have no\n\
00214 # effort associated with them, you can leave the effort array empty. \n\
00215 #\n\
00216 # All arrays in this message should have the same size, or be empty.\n\
00217 # This is the only way to uniquely associate the joint name with the correct\n\
00218 # states.\n\
00219 \n\
00220 \n\
00221 Header header\n\
00222 \n\
00223 string[] name\n\
00224 float64[] position\n\
00225 float64[] velocity\n\
00226 float64[] effort\n\
00227 \n\
00228 ================================================================================\n\
00229 MSG: std_msgs/Header\n\
00230 # Standard metadata for higher-level stamped data types.\n\
00231 # This is generally used to communicate timestamped data \n\
00232 # in a particular coordinate frame.\n\
00233 # \n\
00234 # sequence ID: consecutively increasing ID \n\
00235 uint32 seq\n\
00236 #Two-integer timestamp that is expressed as:\n\
00237 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00238 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00239 # time-handling sugar is provided by the client library\n\
00240 time stamp\n\
00241 #Frame this data is associated with\n\
00242 # 0: no frame\n\
00243 # 1: global frame\n\
00244 string frame_id\n\
00245 \n\
00246 ================================================================================\n\
00247 MSG: geometry_msgs/PoseStamped\n\
00248 # A Pose with reference coordinate frame and timestamp\n\
00249 Header header\n\
00250 Pose pose\n\
00251 \n\
00252 ================================================================================\n\
00253 MSG: geometry_msgs/Pose\n\
00254 # A representation of pose in free space, composed of postion and orientation. \n\
00255 Point position\n\
00256 Quaternion orientation\n\
00257 \n\
00258 ================================================================================\n\
00259 MSG: geometry_msgs/Point\n\
00260 # This contains the position of a point in free space\n\
00261 float64 x\n\
00262 float64 y\n\
00263 float64 z\n\
00264 \n\
00265 ================================================================================\n\
00266 MSG: geometry_msgs/Quaternion\n\
00267 # This represents an orientation in free space in quaternion form.\n\
00268 \n\
00269 float64 x\n\
00270 float64 y\n\
00271 float64 z\n\
00272 float64 w\n\
00273 \n\
00274 ================================================================================\n\
00275 MSG: manipulation_msgs/GripperTranslation\n\
00276 # defines a translation for the gripper, used in pickup or place tasks\n\
00277 # for example for lifting an object off a table or approaching the table for placing\n\
00278 \n\
00279 # the direction of the translation\n\
00280 geometry_msgs/Vector3Stamped direction\n\
00281 \n\
00282 # the desired translation distance\n\
00283 float32 desired_distance\n\
00284 \n\
00285 # the min distance that must be considered feasible before the\n\
00286 # grasp is even attempted\n\
00287 float32 min_distance\n\
00288 \n\
00289 ================================================================================\n\
00290 MSG: geometry_msgs/Vector3Stamped\n\
00291 # This represents a Vector3 with reference coordinate frame and timestamp\n\
00292 Header header\n\
00293 Vector3 vector\n\
00294 \n\
00295 ================================================================================\n\
00296 MSG: geometry_msgs/Vector3\n\
00297 # This represents a vector in free space. \n\
00298 \n\
00299 float64 x\n\
00300 float64 y\n\
00301 float64 z\n\
00302 ================================================================================\n\
00303 MSG: object_manipulation_msgs/GraspResult\n\
00304 int32 SUCCESS = 1\n\
00305 int32 GRASP_OUT_OF_REACH = 2\n\
00306 int32 GRASP_IN_COLLISION = 3\n\
00307 int32 GRASP_UNFEASIBLE = 4\n\
00308 int32 PREGRASP_OUT_OF_REACH = 5\n\
00309 int32 PREGRASP_IN_COLLISION = 6\n\
00310 int32 PREGRASP_UNFEASIBLE = 7\n\
00311 int32 LIFT_OUT_OF_REACH = 8\n\
00312 int32 LIFT_IN_COLLISION = 9\n\
00313 int32 LIFT_UNFEASIBLE = 10\n\
00314 int32 MOVE_ARM_FAILED = 11\n\
00315 int32 GRASP_FAILED = 12\n\
00316 int32 LIFT_FAILED = 13\n\
00317 int32 RETREAT_FAILED = 14\n\
00318 int32 result_code\n\
00319 \n\
00320 # whether the state of the world was disturbed by this attempt. generally, this flag\n\
00321 # shows if another task can be attempted, or a new sensed world model is recommeded\n\
00322 # before proceeding\n\
00323 bool continuation_possible\n\
00324 \n\
00325 ";
00326 }
00327
00328 static const char* value(const ::object_manipulation_msgs::PickupResult_<ContainerAllocator> &) { return value(); }
00329 };
00330
00331 }
00332 }
00333
00334 namespace ros
00335 {
00336 namespace serialization
00337 {
00338
00339 template<class ContainerAllocator> struct Serializer< ::object_manipulation_msgs::PickupResult_<ContainerAllocator> >
00340 {
00341 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00342 {
00343 stream.next(m.manipulation_result);
00344 stream.next(m.grasp);
00345 stream.next(m.attempted_grasps);
00346 stream.next(m.attempted_grasp_results);
00347 }
00348
00349 ROS_DECLARE_ALLINONE_SERIALIZER;
00350 };
00351 }
00352 }
00353
00354 namespace ros
00355 {
00356 namespace message_operations
00357 {
00358
00359 template<class ContainerAllocator>
00360 struct Printer< ::object_manipulation_msgs::PickupResult_<ContainerAllocator> >
00361 {
00362 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::object_manipulation_msgs::PickupResult_<ContainerAllocator> & v)
00363 {
00364 s << indent << "manipulation_result: ";
00365 s << std::endl;
00366 Printer< ::object_manipulation_msgs::ManipulationResult_<ContainerAllocator> >::stream(s, indent + " ", v.manipulation_result);
00367 s << indent << "grasp: ";
00368 s << std::endl;
00369 Printer< ::manipulation_msgs::Grasp_<ContainerAllocator> >::stream(s, indent + " ", v.grasp);
00370 s << indent << "attempted_grasps[]" << std::endl;
00371 for (size_t i = 0; i < v.attempted_grasps.size(); ++i)
00372 {
00373 s << indent << " attempted_grasps[" << i << "]: ";
00374 s << std::endl;
00375 s << indent;
00376 Printer< ::manipulation_msgs::Grasp_<ContainerAllocator> >::stream(s, indent + " ", v.attempted_grasps[i]);
00377 }
00378 s << indent << "attempted_grasp_results[]" << std::endl;
00379 for (size_t i = 0; i < v.attempted_grasp_results.size(); ++i)
00380 {
00381 s << indent << " attempted_grasp_results[" << i << "]: ";
00382 s << std::endl;
00383 s << indent;
00384 Printer< ::object_manipulation_msgs::GraspResult_<ContainerAllocator> >::stream(s, indent + " ", v.attempted_grasp_results[i]);
00385 }
00386 }
00387 };
00388
00389
00390 }
00391 }
00392
00393 #endif // OBJECT_MANIPULATION_MSGS_MESSAGE_PICKUPRESULT_H
00394