00001
00002 #ifndef RIQ_MSGS_MESSAGE_RIQHANDSTATE_H
00003 #define RIQ_MSGS_MESSAGE_RIQHANDSTATE_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 "riq_msgs/RIQActuatorState.h"
00018 #include "riq_msgs/RIQActuatorState.h"
00019 #include "riq_msgs/RIQActuatorState.h"
00020 #include "riq_msgs/RIQActuatorState.h"
00021
00022 namespace riq_msgs
00023 {
00024 template <class ContainerAllocator>
00025 struct RIQHandState_ {
00026 typedef RIQHandState_<ContainerAllocator> Type;
00027
00028 RIQHandState_()
00029 : operational(false)
00030 , status(0)
00031 , mode(0)
00032 , grip(0)
00033 , object(0)
00034 , thumb()
00035 , right_finger()
00036 , left_finger()
00037 , scissors()
00038 {
00039 }
00040
00041 RIQHandState_(const ContainerAllocator& _alloc)
00042 : operational(false)
00043 , status(0)
00044 , mode(0)
00045 , grip(0)
00046 , object(0)
00047 , thumb(_alloc)
00048 , right_finger(_alloc)
00049 , left_finger(_alloc)
00050 , scissors(_alloc)
00051 {
00052 }
00053
00054 typedef uint8_t _operational_type;
00055 uint8_t operational;
00056
00057 typedef int8_t _status_type;
00058 int8_t status;
00059
00060 typedef int8_t _mode_type;
00061 int8_t mode;
00062
00063 typedef int8_t _grip_type;
00064 int8_t grip;
00065
00066 typedef int8_t _object_type;
00067 int8_t object;
00068
00069 typedef ::riq_msgs::RIQActuatorState_<ContainerAllocator> _thumb_type;
00070 ::riq_msgs::RIQActuatorState_<ContainerAllocator> thumb;
00071
00072 typedef ::riq_msgs::RIQActuatorState_<ContainerAllocator> _right_finger_type;
00073 ::riq_msgs::RIQActuatorState_<ContainerAllocator> right_finger;
00074
00075 typedef ::riq_msgs::RIQActuatorState_<ContainerAllocator> _left_finger_type;
00076 ::riq_msgs::RIQActuatorState_<ContainerAllocator> left_finger;
00077
00078 typedef ::riq_msgs::RIQActuatorState_<ContainerAllocator> _scissors_type;
00079 ::riq_msgs::RIQActuatorState_<ContainerAllocator> scissors;
00080
00081 enum { FAULTED = 0 };
00082 enum { IN_PROGRESS = 1 };
00083 enum { ILLEGAL_OR_UNDEFINED = 2 };
00084 enum { SUCCESSFUL = 3 };
00085 enum { CYLINDRICAL = 0 };
00086 enum { PINCH = 1 };
00087 enum { SPHERIOD = 2 };
00088 enum { SCISSORS = 3 };
00089 enum { STOPPED = 0 };
00090 enum { OPENED = 1 };
00091 enum { CLOSED = 2 };
00092 enum { INITIALIZING_OR_CHANGING = 3 };
00093 enum { NOT_DETECTED = 0 };
00094 enum { DETECTED_1_FINGER = 1 };
00095 enum { DETECTED_2_FINGERS = 2 };
00096 enum { DETECTED_ALL_FINGERS = 3 };
00097
00098 typedef boost::shared_ptr< ::riq_msgs::RIQHandState_<ContainerAllocator> > Ptr;
00099 typedef boost::shared_ptr< ::riq_msgs::RIQHandState_<ContainerAllocator> const> ConstPtr;
00100 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00101 };
00102 typedef ::riq_msgs::RIQHandState_<std::allocator<void> > RIQHandState;
00103
00104 typedef boost::shared_ptr< ::riq_msgs::RIQHandState> RIQHandStatePtr;
00105 typedef boost::shared_ptr< ::riq_msgs::RIQHandState const> RIQHandStateConstPtr;
00106
00107
00108 template<typename ContainerAllocator>
00109 std::ostream& operator<<(std::ostream& s, const ::riq_msgs::RIQHandState_<ContainerAllocator> & v)
00110 {
00111 ros::message_operations::Printer< ::riq_msgs::RIQHandState_<ContainerAllocator> >::stream(s, "", v);
00112 return s;}
00113
00114 }
00115
00116 namespace ros
00117 {
00118 namespace message_traits
00119 {
00120 template<class ContainerAllocator> struct IsMessage< ::riq_msgs::RIQHandState_<ContainerAllocator> > : public TrueType {};
00121 template<class ContainerAllocator> struct IsMessage< ::riq_msgs::RIQHandState_<ContainerAllocator> const> : public TrueType {};
00122 template<class ContainerAllocator>
00123 struct MD5Sum< ::riq_msgs::RIQHandState_<ContainerAllocator> > {
00124 static const char* value()
00125 {
00126 return "3ab70f8c0e9b67b0db99e45af2360afc";
00127 }
00128
00129 static const char* value(const ::riq_msgs::RIQHandState_<ContainerAllocator> &) { return value(); }
00130 static const uint64_t static_value1 = 0x3ab70f8c0e9b67b0ULL;
00131 static const uint64_t static_value2 = 0xdb99e45af2360afcULL;
00132 };
00133
00134 template<class ContainerAllocator>
00135 struct DataType< ::riq_msgs::RIQHandState_<ContainerAllocator> > {
00136 static const char* value()
00137 {
00138 return "riq_msgs/RIQHandState";
00139 }
00140
00141 static const char* value(const ::riq_msgs::RIQHandState_<ContainerAllocator> &) { return value(); }
00142 };
00143
00144 template<class ContainerAllocator>
00145 struct Definition< ::riq_msgs::RIQHandState_<ContainerAllocator> > {
00146 static const char* value()
00147 {
00148 return "# ROS state information from RobotIQ hand\n\
00149 \n\
00150 # Action status\n\
00151 int8 FAULTED = 0\n\
00152 int8 IN_PROGRESS = 1\n\
00153 int8 ILLEGAL_OR_UNDEFINED = 2\n\
00154 int8 SUCCESSFUL = 3\n\
00155 \n\
00156 # Mode constants\n\
00157 int8 CYLINDRICAL = 0\n\
00158 int8 PINCH = 1\n\
00159 int8 SPHERIOD = 2\n\
00160 int8 SCISSORS = 3\n\
00161 \n\
00162 # Grip\n\
00163 int8 STOPPED = 0\n\
00164 int8 OPENED = 1\n\
00165 int8 CLOSED = 2\n\
00166 int8 INITIALIZING_OR_CHANGING = 3\n\
00167 \n\
00168 # Object detection status\n\
00169 int8 NOT_DETECTED = 0\n\
00170 int8 DETECTED_1_FINGER = 1\n\
00171 int8 DETECTED_2_FINGERS = 2\n\
00172 int8 DETECTED_ALL_FINGERS = 3\n\
00173 \n\
00174 \n\
00175 bool operational # True when RIQ hand is operational, \n\
00176 # False if there is an error, or hand has not been initialized\n\
00177 \n\
00178 int8 status # Result of last requested action\n\
00179 # SUCCESSFULL, FAULTED, IN_PROGRESS, ILLEGAL_OR_UNDEFINED\n\
00180 \n\
00181 int8 mode # Mode gripper is curretly in: \n\
00182 # PINCH, CYLINDRICAL, SPHERIOD, SCISSORS \n\
00183 \n\
00184 int8 grip # Grip\n\
00185 # CLOSED, OPEN, STOPPED, INTIALIZING_OR_CHANGING\n\
00186 \n\
00187 int8 object # Object detection\n\
00188 # NOT_DETECTED, DETECTED_1_FINGER, DETECTED_2_FINGERS, DETECTED_ALL_FINGERS\n\
00189 \n\
00190 RIQActuatorState thumb\n\
00191 RIQActuatorState right_finger\n\
00192 RIQActuatorState left_finger\n\
00193 RIQActuatorState scissors # Scissors is joint motor between right and left finger\n\
00194 ================================================================================\n\
00195 MSG: riq_msgs/RIQActuatorState\n\
00196 # ROS state information for RobotIQ actuator.\n\
00197 \n\
00198 # Measured motor current (in Amps)\n\
00199 float64 current\n\
00200 \n\
00201 # Motor position range from (0.0 to 1.0)\n\
00202 float64 position\n\
00203 \n\
00204 # True when finger / actuator detected an object\n\
00205 bool object_detected\n\
00206 ";
00207 }
00208
00209 static const char* value(const ::riq_msgs::RIQHandState_<ContainerAllocator> &) { return value(); }
00210 };
00211
00212 template<class ContainerAllocator> struct IsFixedSize< ::riq_msgs::RIQHandState_<ContainerAllocator> > : public TrueType {};
00213 }
00214 }
00215
00216 namespace ros
00217 {
00218 namespace serialization
00219 {
00220
00221 template<class ContainerAllocator> struct Serializer< ::riq_msgs::RIQHandState_<ContainerAllocator> >
00222 {
00223 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00224 {
00225 stream.next(m.operational);
00226 stream.next(m.status);
00227 stream.next(m.mode);
00228 stream.next(m.grip);
00229 stream.next(m.object);
00230 stream.next(m.thumb);
00231 stream.next(m.right_finger);
00232 stream.next(m.left_finger);
00233 stream.next(m.scissors);
00234 }
00235
00236 ROS_DECLARE_ALLINONE_SERIALIZER;
00237 };
00238 }
00239 }
00240
00241 namespace ros
00242 {
00243 namespace message_operations
00244 {
00245
00246 template<class ContainerAllocator>
00247 struct Printer< ::riq_msgs::RIQHandState_<ContainerAllocator> >
00248 {
00249 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::riq_msgs::RIQHandState_<ContainerAllocator> & v)
00250 {
00251 s << indent << "operational: ";
00252 Printer<uint8_t>::stream(s, indent + " ", v.operational);
00253 s << indent << "status: ";
00254 Printer<int8_t>::stream(s, indent + " ", v.status);
00255 s << indent << "mode: ";
00256 Printer<int8_t>::stream(s, indent + " ", v.mode);
00257 s << indent << "grip: ";
00258 Printer<int8_t>::stream(s, indent + " ", v.grip);
00259 s << indent << "object: ";
00260 Printer<int8_t>::stream(s, indent + " ", v.object);
00261 s << indent << "thumb: ";
00262 s << std::endl;
00263 Printer< ::riq_msgs::RIQActuatorState_<ContainerAllocator> >::stream(s, indent + " ", v.thumb);
00264 s << indent << "right_finger: ";
00265 s << std::endl;
00266 Printer< ::riq_msgs::RIQActuatorState_<ContainerAllocator> >::stream(s, indent + " ", v.right_finger);
00267 s << indent << "left_finger: ";
00268 s << std::endl;
00269 Printer< ::riq_msgs::RIQActuatorState_<ContainerAllocator> >::stream(s, indent + " ", v.left_finger);
00270 s << indent << "scissors: ";
00271 s << std::endl;
00272 Printer< ::riq_msgs::RIQActuatorState_<ContainerAllocator> >::stream(s, indent + " ", v.scissors);
00273 }
00274 };
00275
00276
00277 }
00278 }
00279
00280 #endif // RIQ_MSGS_MESSAGE_RIQHANDSTATE_H
00281