00001
00002 #ifndef PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPERFORCESERVODATA_H
00003 #define PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPERFORCESERVODATA_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 PR2GripperForceServoData_ : public ros::Message
00019 {
00020 typedef PR2GripperForceServoData_<ContainerAllocator> Type;
00021
00022 PR2GripperForceServoData_()
00023 : stamp()
00024 , left_fingertip_pad_force(0.0)
00025 , right_fingertip_pad_force(0.0)
00026 , joint_effort(0.0)
00027 , force_achieved(false)
00028 , rtstate()
00029 {
00030 }
00031
00032 PR2GripperForceServoData_(const ContainerAllocator& _alloc)
00033 : stamp()
00034 , left_fingertip_pad_force(0.0)
00035 , right_fingertip_pad_force(0.0)
00036 , joint_effort(0.0)
00037 , force_achieved(false)
00038 , rtstate(_alloc)
00039 {
00040 }
00041
00042 typedef ros::Time _stamp_type;
00043 ros::Time stamp;
00044
00045 typedef double _left_fingertip_pad_force_type;
00046 double left_fingertip_pad_force;
00047
00048 typedef double _right_fingertip_pad_force_type;
00049 double right_fingertip_pad_force;
00050
00051 typedef double _joint_effort_type;
00052 double joint_effort;
00053
00054 typedef uint8_t _force_achieved_type;
00055 uint8_t force_achieved;
00056
00057 typedef ::pr2_gripper_sensor_msgs::PR2GripperSensorRTState_<ContainerAllocator> _rtstate_type;
00058 ::pr2_gripper_sensor_msgs::PR2GripperSensorRTState_<ContainerAllocator> rtstate;
00059
00060
00061 private:
00062 static const char* __s_getDataType_() { return "pr2_gripper_sensor_msgs/PR2GripperForceServoData"; }
00063 public:
00064 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00065
00066 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00067
00068 private:
00069 static const char* __s_getMD5Sum_() { return "d3960eb2ecb6a9b4c27065619e47fd06"; }
00070 public:
00071 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00072
00073 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00074
00075 private:
00076 static const char* __s_getMessageDefinition_() { return "# Time the data was recorded at\n\
00077 time stamp\n\
00078 \n\
00079 # the force experienced by the finger Pads (N)\n\
00080 # NOTE:this ignores data from the edges of the finger pressure\n\
00081 float64 left_fingertip_pad_force\n\
00082 float64 right_fingertip_pad_force\n\
00083 \n\
00084 # the current gripper virtual parallel joint effort (in N)\n\
00085 float64 joint_effort\n\
00086 \n\
00087 # true when the gripper is no longer moving\n\
00088 # and we have reached the desired force level\n\
00089 bool force_achieved\n\
00090 \n\
00091 \n\
00092 # the control state of our realtime controller\n\
00093 PR2GripperSensorRTState rtstate\n\
00094 \n\
00095 ================================================================================\n\
00096 MSG: pr2_gripper_sensor_msgs/PR2GripperSensorRTState\n\
00097 # the control state of our realtime controller\n\
00098 int8 realtime_controller_state\n\
00099 \n\
00100 # predefined values to indicate our realtime_controller_state\n\
00101 int8 DISABLED = 0\n\
00102 int8 POSITION_SERVO = 3\n\
00103 int8 FORCE_SERVO = 4\n\
00104 int8 FIND_CONTACT = 5\n\
00105 int8 SLIP_SERVO = 6\n\
00106 "; }
00107 public:
00108 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00109
00110 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00111
00112 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00113 {
00114 ros::serialization::OStream stream(write_ptr, 1000000000);
00115 ros::serialization::serialize(stream, stamp);
00116 ros::serialization::serialize(stream, left_fingertip_pad_force);
00117 ros::serialization::serialize(stream, right_fingertip_pad_force);
00118 ros::serialization::serialize(stream, joint_effort);
00119 ros::serialization::serialize(stream, force_achieved);
00120 ros::serialization::serialize(stream, rtstate);
00121 return stream.getData();
00122 }
00123
00124 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00125 {
00126 ros::serialization::IStream stream(read_ptr, 1000000000);
00127 ros::serialization::deserialize(stream, stamp);
00128 ros::serialization::deserialize(stream, left_fingertip_pad_force);
00129 ros::serialization::deserialize(stream, right_fingertip_pad_force);
00130 ros::serialization::deserialize(stream, joint_effort);
00131 ros::serialization::deserialize(stream, force_achieved);
00132 ros::serialization::deserialize(stream, rtstate);
00133 return stream.getData();
00134 }
00135
00136 ROS_DEPRECATED virtual uint32_t serializationLength() const
00137 {
00138 uint32_t size = 0;
00139 size += ros::serialization::serializationLength(stamp);
00140 size += ros::serialization::serializationLength(left_fingertip_pad_force);
00141 size += ros::serialization::serializationLength(right_fingertip_pad_force);
00142 size += ros::serialization::serializationLength(joint_effort);
00143 size += ros::serialization::serializationLength(force_achieved);
00144 size += ros::serialization::serializationLength(rtstate);
00145 return size;
00146 }
00147
00148 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperForceServoData_<ContainerAllocator> > Ptr;
00149 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperForceServoData_<ContainerAllocator> const> ConstPtr;
00150 };
00151 typedef ::pr2_gripper_sensor_msgs::PR2GripperForceServoData_<std::allocator<void> > PR2GripperForceServoData;
00152
00153 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperForceServoData> PR2GripperForceServoDataPtr;
00154 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperForceServoData const> PR2GripperForceServoDataConstPtr;
00155
00156
00157 template<typename ContainerAllocator>
00158 std::ostream& operator<<(std::ostream& s, const ::pr2_gripper_sensor_msgs::PR2GripperForceServoData_<ContainerAllocator> & v)
00159 {
00160 ros::message_operations::Printer< ::pr2_gripper_sensor_msgs::PR2GripperForceServoData_<ContainerAllocator> >::stream(s, "", v);
00161 return s;}
00162
00163 }
00164
00165 namespace ros
00166 {
00167 namespace message_traits
00168 {
00169 template<class ContainerAllocator>
00170 struct MD5Sum< ::pr2_gripper_sensor_msgs::PR2GripperForceServoData_<ContainerAllocator> > {
00171 static const char* value()
00172 {
00173 return "d3960eb2ecb6a9b4c27065619e47fd06";
00174 }
00175
00176 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperForceServoData_<ContainerAllocator> &) { return value(); }
00177 static const uint64_t static_value1 = 0xd3960eb2ecb6a9b4ULL;
00178 static const uint64_t static_value2 = 0xc27065619e47fd06ULL;
00179 };
00180
00181 template<class ContainerAllocator>
00182 struct DataType< ::pr2_gripper_sensor_msgs::PR2GripperForceServoData_<ContainerAllocator> > {
00183 static const char* value()
00184 {
00185 return "pr2_gripper_sensor_msgs/PR2GripperForceServoData";
00186 }
00187
00188 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperForceServoData_<ContainerAllocator> &) { return value(); }
00189 };
00190
00191 template<class ContainerAllocator>
00192 struct Definition< ::pr2_gripper_sensor_msgs::PR2GripperForceServoData_<ContainerAllocator> > {
00193 static const char* value()
00194 {
00195 return "# Time the data was recorded at\n\
00196 time stamp\n\
00197 \n\
00198 # the force experienced by the finger Pads (N)\n\
00199 # NOTE:this ignores data from the edges of the finger pressure\n\
00200 float64 left_fingertip_pad_force\n\
00201 float64 right_fingertip_pad_force\n\
00202 \n\
00203 # the current gripper virtual parallel joint effort (in N)\n\
00204 float64 joint_effort\n\
00205 \n\
00206 # true when the gripper is no longer moving\n\
00207 # and we have reached the desired force level\n\
00208 bool force_achieved\n\
00209 \n\
00210 \n\
00211 # the control state of our realtime controller\n\
00212 PR2GripperSensorRTState rtstate\n\
00213 \n\
00214 ================================================================================\n\
00215 MSG: pr2_gripper_sensor_msgs/PR2GripperSensorRTState\n\
00216 # the control state of our realtime controller\n\
00217 int8 realtime_controller_state\n\
00218 \n\
00219 # predefined values to indicate our realtime_controller_state\n\
00220 int8 DISABLED = 0\n\
00221 int8 POSITION_SERVO = 3\n\
00222 int8 FORCE_SERVO = 4\n\
00223 int8 FIND_CONTACT = 5\n\
00224 int8 SLIP_SERVO = 6\n\
00225 ";
00226 }
00227
00228 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperForceServoData_<ContainerAllocator> &) { return value(); }
00229 };
00230
00231 template<class ContainerAllocator> struct IsFixedSize< ::pr2_gripper_sensor_msgs::PR2GripperForceServoData_<ContainerAllocator> > : public TrueType {};
00232 }
00233 }
00234
00235 namespace ros
00236 {
00237 namespace serialization
00238 {
00239
00240 template<class ContainerAllocator> struct Serializer< ::pr2_gripper_sensor_msgs::PR2GripperForceServoData_<ContainerAllocator> >
00241 {
00242 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00243 {
00244 stream.next(m.stamp);
00245 stream.next(m.left_fingertip_pad_force);
00246 stream.next(m.right_fingertip_pad_force);
00247 stream.next(m.joint_effort);
00248 stream.next(m.force_achieved);
00249 stream.next(m.rtstate);
00250 }
00251
00252 ROS_DECLARE_ALLINONE_SERIALIZER;
00253 };
00254 }
00255 }
00256
00257 namespace ros
00258 {
00259 namespace message_operations
00260 {
00261
00262 template<class ContainerAllocator>
00263 struct Printer< ::pr2_gripper_sensor_msgs::PR2GripperForceServoData_<ContainerAllocator> >
00264 {
00265 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_gripper_sensor_msgs::PR2GripperForceServoData_<ContainerAllocator> & v)
00266 {
00267 s << indent << "stamp: ";
00268 Printer<ros::Time>::stream(s, indent + " ", v.stamp);
00269 s << indent << "left_fingertip_pad_force: ";
00270 Printer<double>::stream(s, indent + " ", v.left_fingertip_pad_force);
00271 s << indent << "right_fingertip_pad_force: ";
00272 Printer<double>::stream(s, indent + " ", v.right_fingertip_pad_force);
00273 s << indent << "joint_effort: ";
00274 Printer<double>::stream(s, indent + " ", v.joint_effort);
00275 s << indent << "force_achieved: ";
00276 Printer<uint8_t>::stream(s, indent + " ", v.force_achieved);
00277 s << indent << "rtstate: ";
00278 s << std::endl;
00279 Printer< ::pr2_gripper_sensor_msgs::PR2GripperSensorRTState_<ContainerAllocator> >::stream(s, indent + " ", v.rtstate);
00280 }
00281 };
00282
00283
00284 }
00285 }
00286
00287 #endif // PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPERFORCESERVODATA_H
00288