00001
00002 #ifndef PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPERSENSORRAWDATA_H
00003 #define PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPERSENSORRAWDATA_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
00014 namespace pr2_gripper_sensor_msgs
00015 {
00016 template <class ContainerAllocator>
00017 struct PR2GripperSensorRawData_ : public ros::Message
00018 {
00019 typedef PR2GripperSensorRawData_<ContainerAllocator> Type;
00020
00021 PR2GripperSensorRawData_()
00022 : stamp()
00023 , left_finger_pad_force(0.0)
00024 , right_finger_pad_force(0.0)
00025 , left_finger_pad_force_filtered(0.0)
00026 , right_finger_pad_force_filtered(0.0)
00027 , left_finger_pad_forces()
00028 , right_finger_pad_forces()
00029 , left_finger_pad_forces_filtered()
00030 , right_finger_pad_forces_filtered()
00031 , acc_x_raw(0.0)
00032 , acc_y_raw(0.0)
00033 , acc_z_raw(0.0)
00034 , acc_x_filtered(0.0)
00035 , acc_y_filtered(0.0)
00036 , acc_z_filtered(0.0)
00037 , left_contact(false)
00038 , right_contact(false)
00039 {
00040 left_finger_pad_forces.assign(0.0);
00041 right_finger_pad_forces.assign(0.0);
00042 left_finger_pad_forces_filtered.assign(0.0);
00043 right_finger_pad_forces_filtered.assign(0.0);
00044 }
00045
00046 PR2GripperSensorRawData_(const ContainerAllocator& _alloc)
00047 : stamp()
00048 , left_finger_pad_force(0.0)
00049 , right_finger_pad_force(0.0)
00050 , left_finger_pad_force_filtered(0.0)
00051 , right_finger_pad_force_filtered(0.0)
00052 , left_finger_pad_forces()
00053 , right_finger_pad_forces()
00054 , left_finger_pad_forces_filtered()
00055 , right_finger_pad_forces_filtered()
00056 , acc_x_raw(0.0)
00057 , acc_y_raw(0.0)
00058 , acc_z_raw(0.0)
00059 , acc_x_filtered(0.0)
00060 , acc_y_filtered(0.0)
00061 , acc_z_filtered(0.0)
00062 , left_contact(false)
00063 , right_contact(false)
00064 {
00065 left_finger_pad_forces.assign(0.0);
00066 right_finger_pad_forces.assign(0.0);
00067 left_finger_pad_forces_filtered.assign(0.0);
00068 right_finger_pad_forces_filtered.assign(0.0);
00069 }
00070
00071 typedef ros::Time _stamp_type;
00072 ros::Time stamp;
00073
00074 typedef double _left_finger_pad_force_type;
00075 double left_finger_pad_force;
00076
00077 typedef double _right_finger_pad_force_type;
00078 double right_finger_pad_force;
00079
00080 typedef double _left_finger_pad_force_filtered_type;
00081 double left_finger_pad_force_filtered;
00082
00083 typedef double _right_finger_pad_force_filtered_type;
00084 double right_finger_pad_force_filtered;
00085
00086 typedef boost::array<double, 22> _left_finger_pad_forces_type;
00087 boost::array<double, 22> left_finger_pad_forces;
00088
00089 typedef boost::array<double, 22> _right_finger_pad_forces_type;
00090 boost::array<double, 22> right_finger_pad_forces;
00091
00092 typedef boost::array<double, 22> _left_finger_pad_forces_filtered_type;
00093 boost::array<double, 22> left_finger_pad_forces_filtered;
00094
00095 typedef boost::array<double, 22> _right_finger_pad_forces_filtered_type;
00096 boost::array<double, 22> right_finger_pad_forces_filtered;
00097
00098 typedef double _acc_x_raw_type;
00099 double acc_x_raw;
00100
00101 typedef double _acc_y_raw_type;
00102 double acc_y_raw;
00103
00104 typedef double _acc_z_raw_type;
00105 double acc_z_raw;
00106
00107 typedef double _acc_x_filtered_type;
00108 double acc_x_filtered;
00109
00110 typedef double _acc_y_filtered_type;
00111 double acc_y_filtered;
00112
00113 typedef double _acc_z_filtered_type;
00114 double acc_z_filtered;
00115
00116 typedef uint8_t _left_contact_type;
00117 uint8_t left_contact;
00118
00119 typedef uint8_t _right_contact_type;
00120 uint8_t right_contact;
00121
00122
00123 ROS_DEPRECATED uint32_t get_left_finger_pad_forces_size() const { return (uint32_t)left_finger_pad_forces.size(); }
00124 ROS_DEPRECATED uint32_t get_right_finger_pad_forces_size() const { return (uint32_t)right_finger_pad_forces.size(); }
00125 ROS_DEPRECATED uint32_t get_left_finger_pad_forces_filtered_size() const { return (uint32_t)left_finger_pad_forces_filtered.size(); }
00126 ROS_DEPRECATED uint32_t get_right_finger_pad_forces_filtered_size() const { return (uint32_t)right_finger_pad_forces_filtered.size(); }
00127 private:
00128 static const char* __s_getDataType_() { return "pr2_gripper_sensor_msgs/PR2GripperSensorRawData"; }
00129 public:
00130 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00131
00132 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00133
00134 private:
00135 static const char* __s_getMD5Sum_() { return "696a1f2e6969deb0bc6998636ae1b17e"; }
00136 public:
00137 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00138
00139 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00140
00141 private:
00142 static const char* __s_getMessageDefinition_() { return "# NOTE: This message is only for debugging purposes. It is not intended for API usage - and is not published under release code.\n\
00143 \n\
00144 # Standard ROS header\n\
00145 time stamp\n\
00146 \n\
00147 # corrected for zero contact\n\
00148 float64 left_finger_pad_force\n\
00149 float64 right_finger_pad_force\n\
00150 \n\
00151 # filtered values : high pass filter at 5 Hz after correcting for zero contact\n\
00152 float64 left_finger_pad_force_filtered\n\
00153 float64 right_finger_pad_force_filtered\n\
00154 \n\
00155 # corrected for zero contact\n\
00156 float64[22] left_finger_pad_forces\n\
00157 float64[22] right_finger_pad_forces\n\
00158 \n\
00159 # filtered values : high pass filter at 5 Hz after correcting for zero contact\n\
00160 float64[22] left_finger_pad_forces_filtered\n\
00161 float64[22] right_finger_pad_forces_filtered\n\
00162 \n\
00163 # raw acceleration values\n\
00164 float64 acc_x_raw\n\
00165 float64 acc_y_raw\n\
00166 float64 acc_z_raw\n\
00167 \n\
00168 # filtered acceleration values\n\
00169 float64 acc_x_filtered\n\
00170 float64 acc_y_filtered\n\
00171 float64 acc_z_filtered\n\
00172 \n\
00173 # boolean variables indicating whether contact exists or not\n\
00174 bool left_contact\n\
00175 bool right_contact\n\
00176 "; }
00177 public:
00178 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00179
00180 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00181
00182 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00183 {
00184 ros::serialization::OStream stream(write_ptr, 1000000000);
00185 ros::serialization::serialize(stream, stamp);
00186 ros::serialization::serialize(stream, left_finger_pad_force);
00187 ros::serialization::serialize(stream, right_finger_pad_force);
00188 ros::serialization::serialize(stream, left_finger_pad_force_filtered);
00189 ros::serialization::serialize(stream, right_finger_pad_force_filtered);
00190 ros::serialization::serialize(stream, left_finger_pad_forces);
00191 ros::serialization::serialize(stream, right_finger_pad_forces);
00192 ros::serialization::serialize(stream, left_finger_pad_forces_filtered);
00193 ros::serialization::serialize(stream, right_finger_pad_forces_filtered);
00194 ros::serialization::serialize(stream, acc_x_raw);
00195 ros::serialization::serialize(stream, acc_y_raw);
00196 ros::serialization::serialize(stream, acc_z_raw);
00197 ros::serialization::serialize(stream, acc_x_filtered);
00198 ros::serialization::serialize(stream, acc_y_filtered);
00199 ros::serialization::serialize(stream, acc_z_filtered);
00200 ros::serialization::serialize(stream, left_contact);
00201 ros::serialization::serialize(stream, right_contact);
00202 return stream.getData();
00203 }
00204
00205 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00206 {
00207 ros::serialization::IStream stream(read_ptr, 1000000000);
00208 ros::serialization::deserialize(stream, stamp);
00209 ros::serialization::deserialize(stream, left_finger_pad_force);
00210 ros::serialization::deserialize(stream, right_finger_pad_force);
00211 ros::serialization::deserialize(stream, left_finger_pad_force_filtered);
00212 ros::serialization::deserialize(stream, right_finger_pad_force_filtered);
00213 ros::serialization::deserialize(stream, left_finger_pad_forces);
00214 ros::serialization::deserialize(stream, right_finger_pad_forces);
00215 ros::serialization::deserialize(stream, left_finger_pad_forces_filtered);
00216 ros::serialization::deserialize(stream, right_finger_pad_forces_filtered);
00217 ros::serialization::deserialize(stream, acc_x_raw);
00218 ros::serialization::deserialize(stream, acc_y_raw);
00219 ros::serialization::deserialize(stream, acc_z_raw);
00220 ros::serialization::deserialize(stream, acc_x_filtered);
00221 ros::serialization::deserialize(stream, acc_y_filtered);
00222 ros::serialization::deserialize(stream, acc_z_filtered);
00223 ros::serialization::deserialize(stream, left_contact);
00224 ros::serialization::deserialize(stream, right_contact);
00225 return stream.getData();
00226 }
00227
00228 ROS_DEPRECATED virtual uint32_t serializationLength() const
00229 {
00230 uint32_t size = 0;
00231 size += ros::serialization::serializationLength(stamp);
00232 size += ros::serialization::serializationLength(left_finger_pad_force);
00233 size += ros::serialization::serializationLength(right_finger_pad_force);
00234 size += ros::serialization::serializationLength(left_finger_pad_force_filtered);
00235 size += ros::serialization::serializationLength(right_finger_pad_force_filtered);
00236 size += ros::serialization::serializationLength(left_finger_pad_forces);
00237 size += ros::serialization::serializationLength(right_finger_pad_forces);
00238 size += ros::serialization::serializationLength(left_finger_pad_forces_filtered);
00239 size += ros::serialization::serializationLength(right_finger_pad_forces_filtered);
00240 size += ros::serialization::serializationLength(acc_x_raw);
00241 size += ros::serialization::serializationLength(acc_y_raw);
00242 size += ros::serialization::serializationLength(acc_z_raw);
00243 size += ros::serialization::serializationLength(acc_x_filtered);
00244 size += ros::serialization::serializationLength(acc_y_filtered);
00245 size += ros::serialization::serializationLength(acc_z_filtered);
00246 size += ros::serialization::serializationLength(left_contact);
00247 size += ros::serialization::serializationLength(right_contact);
00248 return size;
00249 }
00250
00251 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData_<ContainerAllocator> > Ptr;
00252 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData_<ContainerAllocator> const> ConstPtr;
00253 };
00254 typedef ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData_<std::allocator<void> > PR2GripperSensorRawData;
00255
00256 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData> PR2GripperSensorRawDataPtr;
00257 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData const> PR2GripperSensorRawDataConstPtr;
00258
00259
00260 template<typename ContainerAllocator>
00261 std::ostream& operator<<(std::ostream& s, const ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData_<ContainerAllocator> & v)
00262 {
00263 ros::message_operations::Printer< ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData_<ContainerAllocator> >::stream(s, "", v);
00264 return s;}
00265
00266 }
00267
00268 namespace ros
00269 {
00270 namespace message_traits
00271 {
00272 template<class ContainerAllocator>
00273 struct MD5Sum< ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData_<ContainerAllocator> > {
00274 static const char* value()
00275 {
00276 return "696a1f2e6969deb0bc6998636ae1b17e";
00277 }
00278
00279 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData_<ContainerAllocator> &) { return value(); }
00280 static const uint64_t static_value1 = 0x696a1f2e6969deb0ULL;
00281 static const uint64_t static_value2 = 0xbc6998636ae1b17eULL;
00282 };
00283
00284 template<class ContainerAllocator>
00285 struct DataType< ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData_<ContainerAllocator> > {
00286 static const char* value()
00287 {
00288 return "pr2_gripper_sensor_msgs/PR2GripperSensorRawData";
00289 }
00290
00291 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData_<ContainerAllocator> &) { return value(); }
00292 };
00293
00294 template<class ContainerAllocator>
00295 struct Definition< ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData_<ContainerAllocator> > {
00296 static const char* value()
00297 {
00298 return "# NOTE: This message is only for debugging purposes. It is not intended for API usage - and is not published under release code.\n\
00299 \n\
00300 # Standard ROS header\n\
00301 time stamp\n\
00302 \n\
00303 # corrected for zero contact\n\
00304 float64 left_finger_pad_force\n\
00305 float64 right_finger_pad_force\n\
00306 \n\
00307 # filtered values : high pass filter at 5 Hz after correcting for zero contact\n\
00308 float64 left_finger_pad_force_filtered\n\
00309 float64 right_finger_pad_force_filtered\n\
00310 \n\
00311 # corrected for zero contact\n\
00312 float64[22] left_finger_pad_forces\n\
00313 float64[22] right_finger_pad_forces\n\
00314 \n\
00315 # filtered values : high pass filter at 5 Hz after correcting for zero contact\n\
00316 float64[22] left_finger_pad_forces_filtered\n\
00317 float64[22] right_finger_pad_forces_filtered\n\
00318 \n\
00319 # raw acceleration values\n\
00320 float64 acc_x_raw\n\
00321 float64 acc_y_raw\n\
00322 float64 acc_z_raw\n\
00323 \n\
00324 # filtered acceleration values\n\
00325 float64 acc_x_filtered\n\
00326 float64 acc_y_filtered\n\
00327 float64 acc_z_filtered\n\
00328 \n\
00329 # boolean variables indicating whether contact exists or not\n\
00330 bool left_contact\n\
00331 bool right_contact\n\
00332 ";
00333 }
00334
00335 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData_<ContainerAllocator> &) { return value(); }
00336 };
00337
00338 template<class ContainerAllocator> struct IsFixedSize< ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData_<ContainerAllocator> > : public TrueType {};
00339 }
00340 }
00341
00342 namespace ros
00343 {
00344 namespace serialization
00345 {
00346
00347 template<class ContainerAllocator> struct Serializer< ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData_<ContainerAllocator> >
00348 {
00349 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00350 {
00351 stream.next(m.stamp);
00352 stream.next(m.left_finger_pad_force);
00353 stream.next(m.right_finger_pad_force);
00354 stream.next(m.left_finger_pad_force_filtered);
00355 stream.next(m.right_finger_pad_force_filtered);
00356 stream.next(m.left_finger_pad_forces);
00357 stream.next(m.right_finger_pad_forces);
00358 stream.next(m.left_finger_pad_forces_filtered);
00359 stream.next(m.right_finger_pad_forces_filtered);
00360 stream.next(m.acc_x_raw);
00361 stream.next(m.acc_y_raw);
00362 stream.next(m.acc_z_raw);
00363 stream.next(m.acc_x_filtered);
00364 stream.next(m.acc_y_filtered);
00365 stream.next(m.acc_z_filtered);
00366 stream.next(m.left_contact);
00367 stream.next(m.right_contact);
00368 }
00369
00370 ROS_DECLARE_ALLINONE_SERIALIZER;
00371 };
00372 }
00373 }
00374
00375 namespace ros
00376 {
00377 namespace message_operations
00378 {
00379
00380 template<class ContainerAllocator>
00381 struct Printer< ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData_<ContainerAllocator> >
00382 {
00383 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_gripper_sensor_msgs::PR2GripperSensorRawData_<ContainerAllocator> & v)
00384 {
00385 s << indent << "stamp: ";
00386 Printer<ros::Time>::stream(s, indent + " ", v.stamp);
00387 s << indent << "left_finger_pad_force: ";
00388 Printer<double>::stream(s, indent + " ", v.left_finger_pad_force);
00389 s << indent << "right_finger_pad_force: ";
00390 Printer<double>::stream(s, indent + " ", v.right_finger_pad_force);
00391 s << indent << "left_finger_pad_force_filtered: ";
00392 Printer<double>::stream(s, indent + " ", v.left_finger_pad_force_filtered);
00393 s << indent << "right_finger_pad_force_filtered: ";
00394 Printer<double>::stream(s, indent + " ", v.right_finger_pad_force_filtered);
00395 s << indent << "left_finger_pad_forces[]" << std::endl;
00396 for (size_t i = 0; i < v.left_finger_pad_forces.size(); ++i)
00397 {
00398 s << indent << " left_finger_pad_forces[" << i << "]: ";
00399 Printer<double>::stream(s, indent + " ", v.left_finger_pad_forces[i]);
00400 }
00401 s << indent << "right_finger_pad_forces[]" << std::endl;
00402 for (size_t i = 0; i < v.right_finger_pad_forces.size(); ++i)
00403 {
00404 s << indent << " right_finger_pad_forces[" << i << "]: ";
00405 Printer<double>::stream(s, indent + " ", v.right_finger_pad_forces[i]);
00406 }
00407 s << indent << "left_finger_pad_forces_filtered[]" << std::endl;
00408 for (size_t i = 0; i < v.left_finger_pad_forces_filtered.size(); ++i)
00409 {
00410 s << indent << " left_finger_pad_forces_filtered[" << i << "]: ";
00411 Printer<double>::stream(s, indent + " ", v.left_finger_pad_forces_filtered[i]);
00412 }
00413 s << indent << "right_finger_pad_forces_filtered[]" << std::endl;
00414 for (size_t i = 0; i < v.right_finger_pad_forces_filtered.size(); ++i)
00415 {
00416 s << indent << " right_finger_pad_forces_filtered[" << i << "]: ";
00417 Printer<double>::stream(s, indent + " ", v.right_finger_pad_forces_filtered[i]);
00418 }
00419 s << indent << "acc_x_raw: ";
00420 Printer<double>::stream(s, indent + " ", v.acc_x_raw);
00421 s << indent << "acc_y_raw: ";
00422 Printer<double>::stream(s, indent + " ", v.acc_y_raw);
00423 s << indent << "acc_z_raw: ";
00424 Printer<double>::stream(s, indent + " ", v.acc_z_raw);
00425 s << indent << "acc_x_filtered: ";
00426 Printer<double>::stream(s, indent + " ", v.acc_x_filtered);
00427 s << indent << "acc_y_filtered: ";
00428 Printer<double>::stream(s, indent + " ", v.acc_y_filtered);
00429 s << indent << "acc_z_filtered: ";
00430 Printer<double>::stream(s, indent + " ", v.acc_z_filtered);
00431 s << indent << "left_contact: ";
00432 Printer<uint8_t>::stream(s, indent + " ", v.left_contact);
00433 s << indent << "right_contact: ";
00434 Printer<uint8_t>::stream(s, indent + " ", v.right_contact);
00435 }
00436 };
00437
00438
00439 }
00440 }
00441
00442 #endif // PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPERSENSORRAWDATA_H
00443