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