00001
00002 #ifndef RIQ_MSGS_MESSAGE_RIQHANDSTATE_H
00003 #define RIQ_MSGS_MESSAGE_RIQHANDSTATE_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 "riq_msgs/RIQActuatorState.h"
00014 #include "riq_msgs/RIQActuatorState.h"
00015 #include "riq_msgs/RIQActuatorState.h"
00016 #include "riq_msgs/RIQActuatorState.h"
00017
00018 namespace riq_msgs
00019 {
00020 template <class ContainerAllocator>
00021 struct RIQHandState_ : public ros::Message
00022 {
00023 typedef RIQHandState_<ContainerAllocator> Type;
00024
00025 RIQHandState_()
00026 : operational(false)
00027 , status(0)
00028 , mode(0)
00029 , grip(0)
00030 , object(0)
00031 , thumb()
00032 , right_finger()
00033 , left_finger()
00034 , scissors()
00035 {
00036 }
00037
00038 RIQHandState_(const ContainerAllocator& _alloc)
00039 : operational(false)
00040 , status(0)
00041 , mode(0)
00042 , grip(0)
00043 , object(0)
00044 , thumb(_alloc)
00045 , right_finger(_alloc)
00046 , left_finger(_alloc)
00047 , scissors(_alloc)
00048 {
00049 }
00050
00051 typedef uint8_t _operational_type;
00052 uint8_t operational;
00053
00054 typedef int8_t _status_type;
00055 int8_t status;
00056
00057 typedef int8_t _mode_type;
00058 int8_t mode;
00059
00060 typedef int8_t _grip_type;
00061 int8_t grip;
00062
00063 typedef int8_t _object_type;
00064 int8_t object;
00065
00066 typedef ::riq_msgs::RIQActuatorState_<ContainerAllocator> _thumb_type;
00067 ::riq_msgs::RIQActuatorState_<ContainerAllocator> thumb;
00068
00069 typedef ::riq_msgs::RIQActuatorState_<ContainerAllocator> _right_finger_type;
00070 ::riq_msgs::RIQActuatorState_<ContainerAllocator> right_finger;
00071
00072 typedef ::riq_msgs::RIQActuatorState_<ContainerAllocator> _left_finger_type;
00073 ::riq_msgs::RIQActuatorState_<ContainerAllocator> left_finger;
00074
00075 typedef ::riq_msgs::RIQActuatorState_<ContainerAllocator> _scissors_type;
00076 ::riq_msgs::RIQActuatorState_<ContainerAllocator> scissors;
00077
00078 enum { FAULTED = 0 };
00079 enum { IN_PROGRESS = 1 };
00080 enum { ILLEGAL_OR_UNDEFINED = 2 };
00081 enum { SUCCESSFUL = 3 };
00082 enum { CYLINDRICAL = 0 };
00083 enum { PINCH = 1 };
00084 enum { SPHERIOD = 2 };
00085 enum { SCISSORS = 3 };
00086 enum { STOPPED = 0 };
00087 enum { OPENED = 1 };
00088 enum { CLOSED = 2 };
00089 enum { INITIALIZING_OR_CHANGING = 3 };
00090 enum { NOT_DETECTED = 0 };
00091 enum { DETECTED_1_FINGER = 1 };
00092 enum { DETECTED_2_FINGERS = 2 };
00093 enum { DETECTED_ALL_FINGERS = 3 };
00094
00095 private:
00096 static const char* __s_getDataType_() { return "riq_msgs/RIQHandState"; }
00097 public:
00098 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00099
00100 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00101
00102 private:
00103 static const char* __s_getMD5Sum_() { return "3ab70f8c0e9b67b0db99e45af2360afc"; }
00104 public:
00105 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00106
00107 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00108
00109 private:
00110 static const char* __s_getMessageDefinition_() { return "# ROS state information from RobotIQ hand\n\
00111 \n\
00112 # Action status\n\
00113 int8 FAULTED = 0\n\
00114 int8 IN_PROGRESS = 1\n\
00115 int8 ILLEGAL_OR_UNDEFINED = 2\n\
00116 int8 SUCCESSFUL = 3\n\
00117 \n\
00118 # Mode constants\n\
00119 int8 CYLINDRICAL = 0\n\
00120 int8 PINCH = 1\n\
00121 int8 SPHERIOD = 2\n\
00122 int8 SCISSORS = 3\n\
00123 \n\
00124 # Grip\n\
00125 int8 STOPPED = 0\n\
00126 int8 OPENED = 1\n\
00127 int8 CLOSED = 2\n\
00128 int8 INITIALIZING_OR_CHANGING = 3\n\
00129 \n\
00130 # Object detection status\n\
00131 int8 NOT_DETECTED = 0\n\
00132 int8 DETECTED_1_FINGER = 1\n\
00133 int8 DETECTED_2_FINGERS = 2\n\
00134 int8 DETECTED_ALL_FINGERS = 3\n\
00135 \n\
00136 \n\
00137 bool operational # True when RIQ hand is operational, \n\
00138 # False if there is an error, or hand has not been initialized\n\
00139 \n\
00140 int8 status # Result of last requested action\n\
00141 # SUCCESSFULL, FAULTED, IN_PROGRESS, ILLEGAL_OR_UNDEFINED\n\
00142 \n\
00143 int8 mode # Mode gripper is curretly in: \n\
00144 # PINCH, CYLINDRICAL, SPHERIOD, SCISSORS \n\
00145 \n\
00146 int8 grip # Grip\n\
00147 # CLOSED, OPEN, STOPPED, INTIALIZING_OR_CHANGING\n\
00148 \n\
00149 int8 object # Object detection\n\
00150 # NOT_DETECTED, DETECTED_1_FINGER, DETECTED_2_FINGERS, DETECTED_ALL_FINGERS\n\
00151 \n\
00152 RIQActuatorState thumb\n\
00153 RIQActuatorState right_finger\n\
00154 RIQActuatorState left_finger\n\
00155 RIQActuatorState scissors # Scissors is joint motor between right and left finger\n\
00156 ================================================================================\n\
00157 MSG: riq_msgs/RIQActuatorState\n\
00158 # ROS state information for RobotIQ actuator.\n\
00159 \n\
00160 # Measured motor current (in Amps)\n\
00161 float64 current\n\
00162 \n\
00163 # Motor position range from (0.0 to 1.0)\n\
00164 float64 position\n\
00165 \n\
00166 # True when finger / actuator detected an object\n\
00167 bool object_detected\n\
00168 "; }
00169 public:
00170 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00171
00172 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00173
00174 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00175 {
00176 ros::serialization::OStream stream(write_ptr, 1000000000);
00177 ros::serialization::serialize(stream, operational);
00178 ros::serialization::serialize(stream, status);
00179 ros::serialization::serialize(stream, mode);
00180 ros::serialization::serialize(stream, grip);
00181 ros::serialization::serialize(stream, object);
00182 ros::serialization::serialize(stream, thumb);
00183 ros::serialization::serialize(stream, right_finger);
00184 ros::serialization::serialize(stream, left_finger);
00185 ros::serialization::serialize(stream, scissors);
00186 return stream.getData();
00187 }
00188
00189 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00190 {
00191 ros::serialization::IStream stream(read_ptr, 1000000000);
00192 ros::serialization::deserialize(stream, operational);
00193 ros::serialization::deserialize(stream, status);
00194 ros::serialization::deserialize(stream, mode);
00195 ros::serialization::deserialize(stream, grip);
00196 ros::serialization::deserialize(stream, object);
00197 ros::serialization::deserialize(stream, thumb);
00198 ros::serialization::deserialize(stream, right_finger);
00199 ros::serialization::deserialize(stream, left_finger);
00200 ros::serialization::deserialize(stream, scissors);
00201 return stream.getData();
00202 }
00203
00204 ROS_DEPRECATED virtual uint32_t serializationLength() const
00205 {
00206 uint32_t size = 0;
00207 size += ros::serialization::serializationLength(operational);
00208 size += ros::serialization::serializationLength(status);
00209 size += ros::serialization::serializationLength(mode);
00210 size += ros::serialization::serializationLength(grip);
00211 size += ros::serialization::serializationLength(object);
00212 size += ros::serialization::serializationLength(thumb);
00213 size += ros::serialization::serializationLength(right_finger);
00214 size += ros::serialization::serializationLength(left_finger);
00215 size += ros::serialization::serializationLength(scissors);
00216 return size;
00217 }
00218
00219 typedef boost::shared_ptr< ::riq_msgs::RIQHandState_<ContainerAllocator> > Ptr;
00220 typedef boost::shared_ptr< ::riq_msgs::RIQHandState_<ContainerAllocator> const> ConstPtr;
00221 };
00222 typedef ::riq_msgs::RIQHandState_<std::allocator<void> > RIQHandState;
00223
00224 typedef boost::shared_ptr< ::riq_msgs::RIQHandState> RIQHandStatePtr;
00225 typedef boost::shared_ptr< ::riq_msgs::RIQHandState const> RIQHandStateConstPtr;
00226
00227
00228 template<typename ContainerAllocator>
00229 std::ostream& operator<<(std::ostream& s, const ::riq_msgs::RIQHandState_<ContainerAllocator> & v)
00230 {
00231 ros::message_operations::Printer< ::riq_msgs::RIQHandState_<ContainerAllocator> >::stream(s, "", v);
00232 return s;}
00233
00234 }
00235
00236 namespace ros
00237 {
00238 namespace message_traits
00239 {
00240 template<class ContainerAllocator>
00241 struct MD5Sum< ::riq_msgs::RIQHandState_<ContainerAllocator> > {
00242 static const char* value()
00243 {
00244 return "3ab70f8c0e9b67b0db99e45af2360afc";
00245 }
00246
00247 static const char* value(const ::riq_msgs::RIQHandState_<ContainerAllocator> &) { return value(); }
00248 static const uint64_t static_value1 = 0x3ab70f8c0e9b67b0ULL;
00249 static const uint64_t static_value2 = 0xdb99e45af2360afcULL;
00250 };
00251
00252 template<class ContainerAllocator>
00253 struct DataType< ::riq_msgs::RIQHandState_<ContainerAllocator> > {
00254 static const char* value()
00255 {
00256 return "riq_msgs/RIQHandState";
00257 }
00258
00259 static const char* value(const ::riq_msgs::RIQHandState_<ContainerAllocator> &) { return value(); }
00260 };
00261
00262 template<class ContainerAllocator>
00263 struct Definition< ::riq_msgs::RIQHandState_<ContainerAllocator> > {
00264 static const char* value()
00265 {
00266 return "# ROS state information from RobotIQ hand\n\
00267 \n\
00268 # Action status\n\
00269 int8 FAULTED = 0\n\
00270 int8 IN_PROGRESS = 1\n\
00271 int8 ILLEGAL_OR_UNDEFINED = 2\n\
00272 int8 SUCCESSFUL = 3\n\
00273 \n\
00274 # Mode constants\n\
00275 int8 CYLINDRICAL = 0\n\
00276 int8 PINCH = 1\n\
00277 int8 SPHERIOD = 2\n\
00278 int8 SCISSORS = 3\n\
00279 \n\
00280 # Grip\n\
00281 int8 STOPPED = 0\n\
00282 int8 OPENED = 1\n\
00283 int8 CLOSED = 2\n\
00284 int8 INITIALIZING_OR_CHANGING = 3\n\
00285 \n\
00286 # Object detection status\n\
00287 int8 NOT_DETECTED = 0\n\
00288 int8 DETECTED_1_FINGER = 1\n\
00289 int8 DETECTED_2_FINGERS = 2\n\
00290 int8 DETECTED_ALL_FINGERS = 3\n\
00291 \n\
00292 \n\
00293 bool operational # True when RIQ hand is operational, \n\
00294 # False if there is an error, or hand has not been initialized\n\
00295 \n\
00296 int8 status # Result of last requested action\n\
00297 # SUCCESSFULL, FAULTED, IN_PROGRESS, ILLEGAL_OR_UNDEFINED\n\
00298 \n\
00299 int8 mode # Mode gripper is curretly in: \n\
00300 # PINCH, CYLINDRICAL, SPHERIOD, SCISSORS \n\
00301 \n\
00302 int8 grip # Grip\n\
00303 # CLOSED, OPEN, STOPPED, INTIALIZING_OR_CHANGING\n\
00304 \n\
00305 int8 object # Object detection\n\
00306 # NOT_DETECTED, DETECTED_1_FINGER, DETECTED_2_FINGERS, DETECTED_ALL_FINGERS\n\
00307 \n\
00308 RIQActuatorState thumb\n\
00309 RIQActuatorState right_finger\n\
00310 RIQActuatorState left_finger\n\
00311 RIQActuatorState scissors # Scissors is joint motor between right and left finger\n\
00312 ================================================================================\n\
00313 MSG: riq_msgs/RIQActuatorState\n\
00314 # ROS state information for RobotIQ actuator.\n\
00315 \n\
00316 # Measured motor current (in Amps)\n\
00317 float64 current\n\
00318 \n\
00319 # Motor position range from (0.0 to 1.0)\n\
00320 float64 position\n\
00321 \n\
00322 # True when finger / actuator detected an object\n\
00323 bool object_detected\n\
00324 ";
00325 }
00326
00327 static const char* value(const ::riq_msgs::RIQHandState_<ContainerAllocator> &) { return value(); }
00328 };
00329
00330 template<class ContainerAllocator> struct IsFixedSize< ::riq_msgs::RIQHandState_<ContainerAllocator> > : public TrueType {};
00331 }
00332 }
00333
00334 namespace ros
00335 {
00336 namespace serialization
00337 {
00338
00339 template<class ContainerAllocator> struct Serializer< ::riq_msgs::RIQHandState_<ContainerAllocator> >
00340 {
00341 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00342 {
00343 stream.next(m.operational);
00344 stream.next(m.status);
00345 stream.next(m.mode);
00346 stream.next(m.grip);
00347 stream.next(m.object);
00348 stream.next(m.thumb);
00349 stream.next(m.right_finger);
00350 stream.next(m.left_finger);
00351 stream.next(m.scissors);
00352 }
00353
00354 ROS_DECLARE_ALLINONE_SERIALIZER;
00355 };
00356 }
00357 }
00358
00359 namespace ros
00360 {
00361 namespace message_operations
00362 {
00363
00364 template<class ContainerAllocator>
00365 struct Printer< ::riq_msgs::RIQHandState_<ContainerAllocator> >
00366 {
00367 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::riq_msgs::RIQHandState_<ContainerAllocator> & v)
00368 {
00369 s << indent << "operational: ";
00370 Printer<uint8_t>::stream(s, indent + " ", v.operational);
00371 s << indent << "status: ";
00372 Printer<int8_t>::stream(s, indent + " ", v.status);
00373 s << indent << "mode: ";
00374 Printer<int8_t>::stream(s, indent + " ", v.mode);
00375 s << indent << "grip: ";
00376 Printer<int8_t>::stream(s, indent + " ", v.grip);
00377 s << indent << "object: ";
00378 Printer<int8_t>::stream(s, indent + " ", v.object);
00379 s << indent << "thumb: ";
00380 s << std::endl;
00381 Printer< ::riq_msgs::RIQActuatorState_<ContainerAllocator> >::stream(s, indent + " ", v.thumb);
00382 s << indent << "right_finger: ";
00383 s << std::endl;
00384 Printer< ::riq_msgs::RIQActuatorState_<ContainerAllocator> >::stream(s, indent + " ", v.right_finger);
00385 s << indent << "left_finger: ";
00386 s << std::endl;
00387 Printer< ::riq_msgs::RIQActuatorState_<ContainerAllocator> >::stream(s, indent + " ", v.left_finger);
00388 s << indent << "scissors: ";
00389 s << std::endl;
00390 Printer< ::riq_msgs::RIQActuatorState_<ContainerAllocator> >::stream(s, indent + " ", v.scissors);
00391 }
00392 };
00393
00394
00395 }
00396 }
00397
00398 #endif // RIQ_MSGS_MESSAGE_RIQHANDSTATE_H
00399