00001
00002 #ifndef VISION_MSGS_MESSAGE_COP_FEEDBACK_H
00003 #define VISION_MSGS_MESSAGE_COP_FEEDBACK_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 "vision_msgs/system_error.h"
00014
00015 namespace vision_msgs
00016 {
00017 template <class ContainerAllocator>
00018 struct cop_feedback_ : public ros::Message
00019 {
00020 typedef cop_feedback_<ContainerAllocator> Type;
00021
00022 cop_feedback_()
00023 : perception_primitive(0)
00024 , evaluation(0.0)
00025 , error()
00026 , eval_whitelist()
00027 {
00028 }
00029
00030 cop_feedback_(const ContainerAllocator& _alloc)
00031 : perception_primitive(0)
00032 , evaluation(0.0)
00033 , error(_alloc)
00034 , eval_whitelist(_alloc)
00035 {
00036 }
00037
00038 typedef uint64_t _perception_primitive_type;
00039 uint64_t perception_primitive;
00040
00041 typedef double _evaluation_type;
00042 double evaluation;
00043
00044 typedef std::vector< ::vision_msgs::system_error_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::vision_msgs::system_error_<ContainerAllocator> >::other > _error_type;
00045 std::vector< ::vision_msgs::system_error_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::vision_msgs::system_error_<ContainerAllocator> >::other > error;
00046
00047 typedef std::vector<uint64_t, typename ContainerAllocator::template rebind<uint64_t>::other > _eval_whitelist_type;
00048 std::vector<uint64_t, typename ContainerAllocator::template rebind<uint64_t>::other > eval_whitelist;
00049
00050
00051 ROS_DEPRECATED uint32_t get_error_size() const { return (uint32_t)error.size(); }
00052 ROS_DEPRECATED void set_error_size(uint32_t size) { error.resize((size_t)size); }
00053 ROS_DEPRECATED void get_error_vec(std::vector< ::vision_msgs::system_error_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::vision_msgs::system_error_<ContainerAllocator> >::other > & vec) const { vec = this->error; }
00054 ROS_DEPRECATED void set_error_vec(const std::vector< ::vision_msgs::system_error_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::vision_msgs::system_error_<ContainerAllocator> >::other > & vec) { this->error = vec; }
00055 ROS_DEPRECATED uint32_t get_eval_whitelist_size() const { return (uint32_t)eval_whitelist.size(); }
00056 ROS_DEPRECATED void set_eval_whitelist_size(uint32_t size) { eval_whitelist.resize((size_t)size); }
00057 ROS_DEPRECATED void get_eval_whitelist_vec(std::vector<uint64_t, typename ContainerAllocator::template rebind<uint64_t>::other > & vec) const { vec = this->eval_whitelist; }
00058 ROS_DEPRECATED void set_eval_whitelist_vec(const std::vector<uint64_t, typename ContainerAllocator::template rebind<uint64_t>::other > & vec) { this->eval_whitelist = vec; }
00059 private:
00060 static const char* __s_getDataType_() { return "vision_msgs/cop_feedback"; }
00061 public:
00062 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00063
00064 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00065
00066 private:
00067 static const char* __s_getMD5Sum_() { return "e876bab42e04aea08a659bc18c7b47cc"; }
00068 public:
00069 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00070
00071 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00072
00073 private:
00074 static const char* __s_getMessageDefinition_() { return "#Message that cop uses to answer on specified topics, U. Klank klank@in.tum.de\n\
00075 uint64 perception_primitive # Perception primitive that caused this answer\n\
00076 float64 evaluation # A score describing the quality of the outcomes of the perception primitive\n\
00077 system_error[] error # A list of occured system failures which might be caused by the perception primitive\n\
00078 uint64[] eval_whitelist # list results which are included into the evaluation (note: default is all, not none, so an empty list means that all elements have to be evaluated, since the case that none of the results should get an evaluation does not make much sense)\n\
00079 \n\
00080 ================================================================================\n\
00081 MSG: vision_msgs/system_error\n\
00082 uint64 MANIPULATION_POSE_UNREACHABLE = 64\n\
00083 uint64 GRASP_FAILED = 128 # Grasp into the void\n\
00084 uint64 OBJECT_NOT_FOUND = 256\n\
00085 uint64 VISION_PRIMITIVE_FAILED = 512\n\
00086 uint64 CONTRADICTING_TACTILE_FEEDBACK = 1024 # Collide without expecting it\n\
00087 uint64 CONTRADICTING_VISION_RESULTS = 2048\n\
00088 uint64 GRASP_FAILED_AND_CRASHED = 4096 # Throwing something out of the way\n\
00089 uint64 JLO_ERROR = 8192 # Could not get position\n\
00090 uint64 VECTOR_FIELD_CANT_REACH = 16384 # The arm got stuck along the way, did not reach the final grasping pose\n\
00091 \n\
00092 uint64 error_id # One of the error constants defined above\n\
00093 string node_name # The node causing this error\n\
00094 string error_description # Further information about the error\n\
00095 \n\
00096 "; }
00097 public:
00098 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00099
00100 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00101
00102 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00103 {
00104 ros::serialization::OStream stream(write_ptr, 1000000000);
00105 ros::serialization::serialize(stream, perception_primitive);
00106 ros::serialization::serialize(stream, evaluation);
00107 ros::serialization::serialize(stream, error);
00108 ros::serialization::serialize(stream, eval_whitelist);
00109 return stream.getData();
00110 }
00111
00112 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00113 {
00114 ros::serialization::IStream stream(read_ptr, 1000000000);
00115 ros::serialization::deserialize(stream, perception_primitive);
00116 ros::serialization::deserialize(stream, evaluation);
00117 ros::serialization::deserialize(stream, error);
00118 ros::serialization::deserialize(stream, eval_whitelist);
00119 return stream.getData();
00120 }
00121
00122 ROS_DEPRECATED virtual uint32_t serializationLength() const
00123 {
00124 uint32_t size = 0;
00125 size += ros::serialization::serializationLength(perception_primitive);
00126 size += ros::serialization::serializationLength(evaluation);
00127 size += ros::serialization::serializationLength(error);
00128 size += ros::serialization::serializationLength(eval_whitelist);
00129 return size;
00130 }
00131
00132 typedef boost::shared_ptr< ::vision_msgs::cop_feedback_<ContainerAllocator> > Ptr;
00133 typedef boost::shared_ptr< ::vision_msgs::cop_feedback_<ContainerAllocator> const> ConstPtr;
00134 };
00135 typedef ::vision_msgs::cop_feedback_<std::allocator<void> > cop_feedback;
00136
00137 typedef boost::shared_ptr< ::vision_msgs::cop_feedback> cop_feedbackPtr;
00138 typedef boost::shared_ptr< ::vision_msgs::cop_feedback const> cop_feedbackConstPtr;
00139
00140
00141 template<typename ContainerAllocator>
00142 std::ostream& operator<<(std::ostream& s, const ::vision_msgs::cop_feedback_<ContainerAllocator> & v)
00143 {
00144 ros::message_operations::Printer< ::vision_msgs::cop_feedback_<ContainerAllocator> >::stream(s, "", v);
00145 return s;}
00146
00147 }
00148
00149 namespace ros
00150 {
00151 namespace message_traits
00152 {
00153 template<class ContainerAllocator>
00154 struct MD5Sum< ::vision_msgs::cop_feedback_<ContainerAllocator> > {
00155 static const char* value()
00156 {
00157 return "e876bab42e04aea08a659bc18c7b47cc";
00158 }
00159
00160 static const char* value(const ::vision_msgs::cop_feedback_<ContainerAllocator> &) { return value(); }
00161 static const uint64_t static_value1 = 0xe876bab42e04aea0ULL;
00162 static const uint64_t static_value2 = 0x8a659bc18c7b47ccULL;
00163 };
00164
00165 template<class ContainerAllocator>
00166 struct DataType< ::vision_msgs::cop_feedback_<ContainerAllocator> > {
00167 static const char* value()
00168 {
00169 return "vision_msgs/cop_feedback";
00170 }
00171
00172 static const char* value(const ::vision_msgs::cop_feedback_<ContainerAllocator> &) { return value(); }
00173 };
00174
00175 template<class ContainerAllocator>
00176 struct Definition< ::vision_msgs::cop_feedback_<ContainerAllocator> > {
00177 static const char* value()
00178 {
00179 return "#Message that cop uses to answer on specified topics, U. Klank klank@in.tum.de\n\
00180 uint64 perception_primitive # Perception primitive that caused this answer\n\
00181 float64 evaluation # A score describing the quality of the outcomes of the perception primitive\n\
00182 system_error[] error # A list of occured system failures which might be caused by the perception primitive\n\
00183 uint64[] eval_whitelist # list results which are included into the evaluation (note: default is all, not none, so an empty list means that all elements have to be evaluated, since the case that none of the results should get an evaluation does not make much sense)\n\
00184 \n\
00185 ================================================================================\n\
00186 MSG: vision_msgs/system_error\n\
00187 uint64 MANIPULATION_POSE_UNREACHABLE = 64\n\
00188 uint64 GRASP_FAILED = 128 # Grasp into the void\n\
00189 uint64 OBJECT_NOT_FOUND = 256\n\
00190 uint64 VISION_PRIMITIVE_FAILED = 512\n\
00191 uint64 CONTRADICTING_TACTILE_FEEDBACK = 1024 # Collide without expecting it\n\
00192 uint64 CONTRADICTING_VISION_RESULTS = 2048\n\
00193 uint64 GRASP_FAILED_AND_CRASHED = 4096 # Throwing something out of the way\n\
00194 uint64 JLO_ERROR = 8192 # Could not get position\n\
00195 uint64 VECTOR_FIELD_CANT_REACH = 16384 # The arm got stuck along the way, did not reach the final grasping pose\n\
00196 \n\
00197 uint64 error_id # One of the error constants defined above\n\
00198 string node_name # The node causing this error\n\
00199 string error_description # Further information about the error\n\
00200 \n\
00201 ";
00202 }
00203
00204 static const char* value(const ::vision_msgs::cop_feedback_<ContainerAllocator> &) { return value(); }
00205 };
00206
00207 }
00208 }
00209
00210 namespace ros
00211 {
00212 namespace serialization
00213 {
00214
00215 template<class ContainerAllocator> struct Serializer< ::vision_msgs::cop_feedback_<ContainerAllocator> >
00216 {
00217 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00218 {
00219 stream.next(m.perception_primitive);
00220 stream.next(m.evaluation);
00221 stream.next(m.error);
00222 stream.next(m.eval_whitelist);
00223 }
00224
00225 ROS_DECLARE_ALLINONE_SERIALIZER;
00226 };
00227 }
00228 }
00229
00230 namespace ros
00231 {
00232 namespace message_operations
00233 {
00234
00235 template<class ContainerAllocator>
00236 struct Printer< ::vision_msgs::cop_feedback_<ContainerAllocator> >
00237 {
00238 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::vision_msgs::cop_feedback_<ContainerAllocator> & v)
00239 {
00240 s << indent << "perception_primitive: ";
00241 Printer<uint64_t>::stream(s, indent + " ", v.perception_primitive);
00242 s << indent << "evaluation: ";
00243 Printer<double>::stream(s, indent + " ", v.evaluation);
00244 s << indent << "error[]" << std::endl;
00245 for (size_t i = 0; i < v.error.size(); ++i)
00246 {
00247 s << indent << " error[" << i << "]: ";
00248 s << std::endl;
00249 s << indent;
00250 Printer< ::vision_msgs::system_error_<ContainerAllocator> >::stream(s, indent + " ", v.error[i]);
00251 }
00252 s << indent << "eval_whitelist[]" << std::endl;
00253 for (size_t i = 0; i < v.eval_whitelist.size(); ++i)
00254 {
00255 s << indent << " eval_whitelist[" << i << "]: ";
00256 Printer<uint64_t>::stream(s, indent + " ", v.eval_whitelist[i]);
00257 }
00258 }
00259 };
00260
00261
00262 }
00263 }
00264
00265 #endif // VISION_MSGS_MESSAGE_COP_FEEDBACK_H
00266