00001
00002 #ifndef PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPERSLIPSERVODATA_H
00003 #define PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPERSLIPSERVODATA_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 "pr2_gripper_sensor_msgs/PR2GripperSensorRTState.h"
00014
00015 namespace pr2_gripper_sensor_msgs
00016 {
00017 template <class ContainerAllocator>
00018 struct PR2GripperSlipServoData_ : public ros::Message
00019 {
00020 typedef PR2GripperSlipServoData_<ContainerAllocator> Type;
00021
00022 PR2GripperSlipServoData_()
00023 : stamp()
00024 , deformation(0.0)
00025 , left_fingertip_pad_force(0.0)
00026 , right_fingertip_pad_force(0.0)
00027 , joint_effort(0.0)
00028 , slip_detected(false)
00029 , deformation_limit_reached(false)
00030 , fingertip_force_limit_reached(false)
00031 , gripper_empty(false)
00032 , rtstate()
00033 {
00034 }
00035
00036 PR2GripperSlipServoData_(const ContainerAllocator& _alloc)
00037 : stamp()
00038 , deformation(0.0)
00039 , left_fingertip_pad_force(0.0)
00040 , right_fingertip_pad_force(0.0)
00041 , joint_effort(0.0)
00042 , slip_detected(false)
00043 , deformation_limit_reached(false)
00044 , fingertip_force_limit_reached(false)
00045 , gripper_empty(false)
00046 , rtstate(_alloc)
00047 {
00048 }
00049
00050 typedef ros::Time _stamp_type;
00051 ros::Time stamp;
00052
00053 typedef double _deformation_type;
00054 double deformation;
00055
00056 typedef double _left_fingertip_pad_force_type;
00057 double left_fingertip_pad_force;
00058
00059 typedef double _right_fingertip_pad_force_type;
00060 double right_fingertip_pad_force;
00061
00062 typedef double _joint_effort_type;
00063 double joint_effort;
00064
00065 typedef uint8_t _slip_detected_type;
00066 uint8_t slip_detected;
00067
00068 typedef uint8_t _deformation_limit_reached_type;
00069 uint8_t deformation_limit_reached;
00070
00071 typedef uint8_t _fingertip_force_limit_reached_type;
00072 uint8_t fingertip_force_limit_reached;
00073
00074 typedef uint8_t _gripper_empty_type;
00075 uint8_t gripper_empty;
00076
00077 typedef ::pr2_gripper_sensor_msgs::PR2GripperSensorRTState_<ContainerAllocator> _rtstate_type;
00078 ::pr2_gripper_sensor_msgs::PR2GripperSensorRTState_<ContainerAllocator> rtstate;
00079
00080
00081 private:
00082 static const char* __s_getDataType_() { return "pr2_gripper_sensor_msgs/PR2GripperSlipServoData"; }
00083 public:
00084 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00085
00086 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00087
00088 private:
00089 static const char* __s_getMD5Sum_() { return "a49728a2e0c40706b3c9b74046f006aa"; }
00090 public:
00091 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00092
00093 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00094
00095 private:
00096 static const char* __s_getMessageDefinition_() { return "# time the data was recorded at\n\
00097 time stamp\n\
00098 \n\
00099 # the amount of deformation from action start (in meters)\n\
00100 float64 deformation\n\
00101 \n\
00102 # the force experinced by the finger Pads (N)\n\
00103 # NOTE:this ignores data from the edges of the finger pressure\n\
00104 float64 left_fingertip_pad_force\n\
00105 float64 right_fingertip_pad_force\n\
00106 \n\
00107 # the current virtual parallel joint effort of the gripper (in N)\n\
00108 float64 joint_effort\n\
00109 \n\
00110 # true if the object recently slipped\n\
00111 bool slip_detected\n\
00112 \n\
00113 # true if we are at or exceeding the deformation limit\n\
00114 # (see wiki page and param server for more info)\n\
00115 bool deformation_limit_reached\n\
00116 \n\
00117 # true if we are at or exceeding our force \n\
00118 # (see wiki page and param server for more info)\n\
00119 bool fingertip_force_limit_reached\n\
00120 \n\
00121 # true if the controller thinks the gripper is empty\n\
00122 # (see wiki page for more info)\n\
00123 bool gripper_empty\n\
00124 \n\
00125 # the control state of our realtime controller\n\
00126 PR2GripperSensorRTState rtstate\n\
00127 ================================================================================\n\
00128 MSG: pr2_gripper_sensor_msgs/PR2GripperSensorRTState\n\
00129 # the control state of our realtime controller\n\
00130 int8 realtime_controller_state\n\
00131 \n\
00132 # predefined values to indicate our realtime_controller_state\n\
00133 int8 DISABLED = 0\n\
00134 int8 POSITION_SERVO = 3\n\
00135 int8 FORCE_SERVO = 4\n\
00136 int8 FIND_CONTACT = 5\n\
00137 int8 SLIP_SERVO = 6\n\
00138 "; }
00139 public:
00140 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00141
00142 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00143
00144 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00145 {
00146 ros::serialization::OStream stream(write_ptr, 1000000000);
00147 ros::serialization::serialize(stream, stamp);
00148 ros::serialization::serialize(stream, deformation);
00149 ros::serialization::serialize(stream, left_fingertip_pad_force);
00150 ros::serialization::serialize(stream, right_fingertip_pad_force);
00151 ros::serialization::serialize(stream, joint_effort);
00152 ros::serialization::serialize(stream, slip_detected);
00153 ros::serialization::serialize(stream, deformation_limit_reached);
00154 ros::serialization::serialize(stream, fingertip_force_limit_reached);
00155 ros::serialization::serialize(stream, gripper_empty);
00156 ros::serialization::serialize(stream, rtstate);
00157 return stream.getData();
00158 }
00159
00160 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00161 {
00162 ros::serialization::IStream stream(read_ptr, 1000000000);
00163 ros::serialization::deserialize(stream, stamp);
00164 ros::serialization::deserialize(stream, deformation);
00165 ros::serialization::deserialize(stream, left_fingertip_pad_force);
00166 ros::serialization::deserialize(stream, right_fingertip_pad_force);
00167 ros::serialization::deserialize(stream, joint_effort);
00168 ros::serialization::deserialize(stream, slip_detected);
00169 ros::serialization::deserialize(stream, deformation_limit_reached);
00170 ros::serialization::deserialize(stream, fingertip_force_limit_reached);
00171 ros::serialization::deserialize(stream, gripper_empty);
00172 ros::serialization::deserialize(stream, rtstate);
00173 return stream.getData();
00174 }
00175
00176 ROS_DEPRECATED virtual uint32_t serializationLength() const
00177 {
00178 uint32_t size = 0;
00179 size += ros::serialization::serializationLength(stamp);
00180 size += ros::serialization::serializationLength(deformation);
00181 size += ros::serialization::serializationLength(left_fingertip_pad_force);
00182 size += ros::serialization::serializationLength(right_fingertip_pad_force);
00183 size += ros::serialization::serializationLength(joint_effort);
00184 size += ros::serialization::serializationLength(slip_detected);
00185 size += ros::serialization::serializationLength(deformation_limit_reached);
00186 size += ros::serialization::serializationLength(fingertip_force_limit_reached);
00187 size += ros::serialization::serializationLength(gripper_empty);
00188 size += ros::serialization::serializationLength(rtstate);
00189 return size;
00190 }
00191
00192 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData_<ContainerAllocator> > Ptr;
00193 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData_<ContainerAllocator> const> ConstPtr;
00194 };
00195 typedef ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData_<std::allocator<void> > PR2GripperSlipServoData;
00196
00197 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData> PR2GripperSlipServoDataPtr;
00198 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData const> PR2GripperSlipServoDataConstPtr;
00199
00200
00201 template<typename ContainerAllocator>
00202 std::ostream& operator<<(std::ostream& s, const ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData_<ContainerAllocator> & v)
00203 {
00204 ros::message_operations::Printer< ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData_<ContainerAllocator> >::stream(s, "", v);
00205 return s;}
00206
00207 }
00208
00209 namespace ros
00210 {
00211 namespace message_traits
00212 {
00213 template<class ContainerAllocator>
00214 struct MD5Sum< ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData_<ContainerAllocator> > {
00215 static const char* value()
00216 {
00217 return "a49728a2e0c40706b3c9b74046f006aa";
00218 }
00219
00220 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData_<ContainerAllocator> &) { return value(); }
00221 static const uint64_t static_value1 = 0xa49728a2e0c40706ULL;
00222 static const uint64_t static_value2 = 0xb3c9b74046f006aaULL;
00223 };
00224
00225 template<class ContainerAllocator>
00226 struct DataType< ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData_<ContainerAllocator> > {
00227 static const char* value()
00228 {
00229 return "pr2_gripper_sensor_msgs/PR2GripperSlipServoData";
00230 }
00231
00232 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData_<ContainerAllocator> &) { return value(); }
00233 };
00234
00235 template<class ContainerAllocator>
00236 struct Definition< ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData_<ContainerAllocator> > {
00237 static const char* value()
00238 {
00239 return "# time the data was recorded at\n\
00240 time stamp\n\
00241 \n\
00242 # the amount of deformation from action start (in meters)\n\
00243 float64 deformation\n\
00244 \n\
00245 # the force experinced by the finger Pads (N)\n\
00246 # NOTE:this ignores data from the edges of the finger pressure\n\
00247 float64 left_fingertip_pad_force\n\
00248 float64 right_fingertip_pad_force\n\
00249 \n\
00250 # the current virtual parallel joint effort of the gripper (in N)\n\
00251 float64 joint_effort\n\
00252 \n\
00253 # true if the object recently slipped\n\
00254 bool slip_detected\n\
00255 \n\
00256 # true if we are at or exceeding the deformation limit\n\
00257 # (see wiki page and param server for more info)\n\
00258 bool deformation_limit_reached\n\
00259 \n\
00260 # true if we are at or exceeding our force \n\
00261 # (see wiki page and param server for more info)\n\
00262 bool fingertip_force_limit_reached\n\
00263 \n\
00264 # true if the controller thinks the gripper is empty\n\
00265 # (see wiki page for more info)\n\
00266 bool gripper_empty\n\
00267 \n\
00268 # the control state of our realtime controller\n\
00269 PR2GripperSensorRTState rtstate\n\
00270 ================================================================================\n\
00271 MSG: pr2_gripper_sensor_msgs/PR2GripperSensorRTState\n\
00272 # the control state of our realtime controller\n\
00273 int8 realtime_controller_state\n\
00274 \n\
00275 # predefined values to indicate our realtime_controller_state\n\
00276 int8 DISABLED = 0\n\
00277 int8 POSITION_SERVO = 3\n\
00278 int8 FORCE_SERVO = 4\n\
00279 int8 FIND_CONTACT = 5\n\
00280 int8 SLIP_SERVO = 6\n\
00281 ";
00282 }
00283
00284 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData_<ContainerAllocator> &) { return value(); }
00285 };
00286
00287 template<class ContainerAllocator> struct IsFixedSize< ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData_<ContainerAllocator> > : public TrueType {};
00288 }
00289 }
00290
00291 namespace ros
00292 {
00293 namespace serialization
00294 {
00295
00296 template<class ContainerAllocator> struct Serializer< ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData_<ContainerAllocator> >
00297 {
00298 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00299 {
00300 stream.next(m.stamp);
00301 stream.next(m.deformation);
00302 stream.next(m.left_fingertip_pad_force);
00303 stream.next(m.right_fingertip_pad_force);
00304 stream.next(m.joint_effort);
00305 stream.next(m.slip_detected);
00306 stream.next(m.deformation_limit_reached);
00307 stream.next(m.fingertip_force_limit_reached);
00308 stream.next(m.gripper_empty);
00309 stream.next(m.rtstate);
00310 }
00311
00312 ROS_DECLARE_ALLINONE_SERIALIZER;
00313 };
00314 }
00315 }
00316
00317 namespace ros
00318 {
00319 namespace message_operations
00320 {
00321
00322 template<class ContainerAllocator>
00323 struct Printer< ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData_<ContainerAllocator> >
00324 {
00325 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_gripper_sensor_msgs::PR2GripperSlipServoData_<ContainerAllocator> & v)
00326 {
00327 s << indent << "stamp: ";
00328 Printer<ros::Time>::stream(s, indent + " ", v.stamp);
00329 s << indent << "deformation: ";
00330 Printer<double>::stream(s, indent + " ", v.deformation);
00331 s << indent << "left_fingertip_pad_force: ";
00332 Printer<double>::stream(s, indent + " ", v.left_fingertip_pad_force);
00333 s << indent << "right_fingertip_pad_force: ";
00334 Printer<double>::stream(s, indent + " ", v.right_fingertip_pad_force);
00335 s << indent << "joint_effort: ";
00336 Printer<double>::stream(s, indent + " ", v.joint_effort);
00337 s << indent << "slip_detected: ";
00338 Printer<uint8_t>::stream(s, indent + " ", v.slip_detected);
00339 s << indent << "deformation_limit_reached: ";
00340 Printer<uint8_t>::stream(s, indent + " ", v.deformation_limit_reached);
00341 s << indent << "fingertip_force_limit_reached: ";
00342 Printer<uint8_t>::stream(s, indent + " ", v.fingertip_force_limit_reached);
00343 s << indent << "gripper_empty: ";
00344 Printer<uint8_t>::stream(s, indent + " ", v.gripper_empty);
00345 s << indent << "rtstate: ";
00346 s << std::endl;
00347 Printer< ::pr2_gripper_sensor_msgs::PR2GripperSensorRTState_<ContainerAllocator> >::stream(s, indent + " ", v.rtstate);
00348 }
00349 };
00350
00351
00352 }
00353 }
00354
00355 #endif // PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPERSLIPSERVODATA_H
00356