Go to the documentation of this file.00001 #ifndef _ROS_manipulation_msgs_GraspResult_h
00002 #define _ROS_manipulation_msgs_GraspResult_h
00003
00004 #include <stdint.h>
00005 #include <string.h>
00006 #include <stdlib.h>
00007 #include "ros/msg.h"
00008
00009 namespace manipulation_msgs
00010 {
00011
00012 class GraspResult : public ros::Msg
00013 {
00014 public:
00015 int32_t result_code;
00016 bool continuation_possible;
00017 enum { SUCCESS = 1 };
00018 enum { GRASP_OUT_OF_REACH = 2 };
00019 enum { GRASP_IN_COLLISION = 3 };
00020 enum { GRASP_UNFEASIBLE = 4 };
00021 enum { PREGRASP_OUT_OF_REACH = 5 };
00022 enum { PREGRASP_IN_COLLISION = 6 };
00023 enum { PREGRASP_UNFEASIBLE = 7 };
00024 enum { LIFT_OUT_OF_REACH = 8 };
00025 enum { LIFT_IN_COLLISION = 9 };
00026 enum { LIFT_UNFEASIBLE = 10 };
00027 enum { MOVE_ARM_FAILED = 11 };
00028 enum { GRASP_FAILED = 12 };
00029 enum { LIFT_FAILED = 13 };
00030 enum { RETREAT_FAILED = 14 };
00031
00032 virtual int serialize(unsigned char *outbuffer) const
00033 {
00034 int offset = 0;
00035 union {
00036 int32_t real;
00037 uint32_t base;
00038 } u_result_code;
00039 u_result_code.real = this->result_code;
00040 *(outbuffer + offset + 0) = (u_result_code.base >> (8 * 0)) & 0xFF;
00041 *(outbuffer + offset + 1) = (u_result_code.base >> (8 * 1)) & 0xFF;
00042 *(outbuffer + offset + 2) = (u_result_code.base >> (8 * 2)) & 0xFF;
00043 *(outbuffer + offset + 3) = (u_result_code.base >> (8 * 3)) & 0xFF;
00044 offset += sizeof(this->result_code);
00045 union {
00046 bool real;
00047 uint8_t base;
00048 } u_continuation_possible;
00049 u_continuation_possible.real = this->continuation_possible;
00050 *(outbuffer + offset + 0) = (u_continuation_possible.base >> (8 * 0)) & 0xFF;
00051 offset += sizeof(this->continuation_possible);
00052 return offset;
00053 }
00054
00055 virtual int deserialize(unsigned char *inbuffer)
00056 {
00057 int offset = 0;
00058 union {
00059 int32_t real;
00060 uint32_t base;
00061 } u_result_code;
00062 u_result_code.base = 0;
00063 u_result_code.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
00064 u_result_code.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00065 u_result_code.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00066 u_result_code.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00067 this->result_code = u_result_code.real;
00068 offset += sizeof(this->result_code);
00069 union {
00070 bool real;
00071 uint8_t base;
00072 } u_continuation_possible;
00073 u_continuation_possible.base = 0;
00074 u_continuation_possible.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00075 this->continuation_possible = u_continuation_possible.real;
00076 offset += sizeof(this->continuation_possible);
00077 return offset;
00078 }
00079
00080 const char * getType(){ return "manipulation_msgs/GraspResult"; };
00081 const char * getMD5(){ return "c8a909da895cdddc0630aafd59848191"; };
00082
00083 };
00084
00085 }
00086 #endif