00001
00002 #ifndef PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPEREVENTDETECTORDATA_H
00003 #define PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPEREVENTDETECTORDATA_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 PR2GripperEventDetectorData_ : public ros::Message
00018 {
00019 typedef PR2GripperEventDetectorData_<ContainerAllocator> Type;
00020
00021 PR2GripperEventDetectorData_()
00022 : stamp()
00023 , trigger_conditions_met(false)
00024 , slip_event(false)
00025 , acceleration_event(false)
00026 , acceleration_vector()
00027 {
00028 acceleration_vector.assign(0.0);
00029 }
00030
00031 PR2GripperEventDetectorData_(const ContainerAllocator& _alloc)
00032 : stamp()
00033 , trigger_conditions_met(false)
00034 , slip_event(false)
00035 , acceleration_event(false)
00036 , acceleration_vector()
00037 {
00038 acceleration_vector.assign(0.0);
00039 }
00040
00041 typedef ros::Time _stamp_type;
00042 ros::Time stamp;
00043
00044 typedef uint8_t _trigger_conditions_met_type;
00045 uint8_t trigger_conditions_met;
00046
00047 typedef uint8_t _slip_event_type;
00048 uint8_t slip_event;
00049
00050 typedef uint8_t _acceleration_event_type;
00051 uint8_t acceleration_event;
00052
00053 typedef boost::array<double, 3> _acceleration_vector_type;
00054 boost::array<double, 3> acceleration_vector;
00055
00056
00057 ROS_DEPRECATED uint32_t get_acceleration_vector_size() const { return (uint32_t)acceleration_vector.size(); }
00058 private:
00059 static const char* __s_getDataType_() { return "pr2_gripper_sensor_msgs/PR2GripperEventDetectorData"; }
00060 public:
00061 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00062
00063 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00064
00065 private:
00066 static const char* __s_getMD5Sum_() { return "9536d682ef6215440ecc47846d4117c2"; }
00067 public:
00068 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00069
00070 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00071
00072 private:
00073 static const char* __s_getMessageDefinition_() { return "# Time the data was recorded at\n\
00074 time stamp\n\
00075 \n\
00076 # true if the trigger conditions have been met \n\
00077 # (see PR2GripperEventDetectorCommand)\n\
00078 bool trigger_conditions_met\n\
00079 \n\
00080 # true if the pressure sensors detected a slip event\n\
00081 # slip events occur when the finger pressure sensors\n\
00082 # high-freq. content exceeds the slip_trigger_magnitude variable\n\
00083 # (see PR2GripperEventDetectorCommand)\n\
00084 bool slip_event\n\
00085 \n\
00086 # true if the hand-mounted accelerometer detected a contact acceleration\n\
00087 # acceleration events occur when the palm accelerometer\n\
00088 # high-freq. content exceeds the acc_trigger_magnitude variable\n\
00089 # (see PR2GripperEventDetectorCommand)\n\
00090 bool acceleration_event\n\
00091 \n\
00092 # the high-freq acceleration vector that was last seen (x,y,z)\n\
00093 float64[3] acceleration_vector\n\
00094 "; }
00095 public:
00096 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00097
00098 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00099
00100 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00101 {
00102 ros::serialization::OStream stream(write_ptr, 1000000000);
00103 ros::serialization::serialize(stream, stamp);
00104 ros::serialization::serialize(stream, trigger_conditions_met);
00105 ros::serialization::serialize(stream, slip_event);
00106 ros::serialization::serialize(stream, acceleration_event);
00107 ros::serialization::serialize(stream, acceleration_vector);
00108 return stream.getData();
00109 }
00110
00111 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00112 {
00113 ros::serialization::IStream stream(read_ptr, 1000000000);
00114 ros::serialization::deserialize(stream, stamp);
00115 ros::serialization::deserialize(stream, trigger_conditions_met);
00116 ros::serialization::deserialize(stream, slip_event);
00117 ros::serialization::deserialize(stream, acceleration_event);
00118 ros::serialization::deserialize(stream, acceleration_vector);
00119 return stream.getData();
00120 }
00121
00122 ROS_DEPRECATED virtual uint32_t serializationLength() const
00123 {
00124 uint32_t size = 0;
00125 size += ros::serialization::serializationLength(stamp);
00126 size += ros::serialization::serializationLength(trigger_conditions_met);
00127 size += ros::serialization::serializationLength(slip_event);
00128 size += ros::serialization::serializationLength(acceleration_event);
00129 size += ros::serialization::serializationLength(acceleration_vector);
00130 return size;
00131 }
00132
00133 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> > Ptr;
00134 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> const> ConstPtr;
00135 };
00136 typedef ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<std::allocator<void> > PR2GripperEventDetectorData;
00137
00138 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData> PR2GripperEventDetectorDataPtr;
00139 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData const> PR2GripperEventDetectorDataConstPtr;
00140
00141
00142 template<typename ContainerAllocator>
00143 std::ostream& operator<<(std::ostream& s, const ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> & v)
00144 {
00145 ros::message_operations::Printer< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> >::stream(s, "", v);
00146 return s;}
00147
00148 }
00149
00150 namespace ros
00151 {
00152 namespace message_traits
00153 {
00154 template<class ContainerAllocator>
00155 struct MD5Sum< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> > {
00156 static const char* value()
00157 {
00158 return "9536d682ef6215440ecc47846d4117c2";
00159 }
00160
00161 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> &) { return value(); }
00162 static const uint64_t static_value1 = 0x9536d682ef621544ULL;
00163 static const uint64_t static_value2 = 0x0ecc47846d4117c2ULL;
00164 };
00165
00166 template<class ContainerAllocator>
00167 struct DataType< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> > {
00168 static const char* value()
00169 {
00170 return "pr2_gripper_sensor_msgs/PR2GripperEventDetectorData";
00171 }
00172
00173 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> &) { return value(); }
00174 };
00175
00176 template<class ContainerAllocator>
00177 struct Definition< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> > {
00178 static const char* value()
00179 {
00180 return "# Time the data was recorded at\n\
00181 time stamp\n\
00182 \n\
00183 # true if the trigger conditions have been met \n\
00184 # (see PR2GripperEventDetectorCommand)\n\
00185 bool trigger_conditions_met\n\
00186 \n\
00187 # true if the pressure sensors detected a slip event\n\
00188 # slip events occur when the finger pressure sensors\n\
00189 # high-freq. content exceeds the slip_trigger_magnitude variable\n\
00190 # (see PR2GripperEventDetectorCommand)\n\
00191 bool slip_event\n\
00192 \n\
00193 # true if the hand-mounted accelerometer detected a contact acceleration\n\
00194 # acceleration events occur when the palm accelerometer\n\
00195 # high-freq. content exceeds the acc_trigger_magnitude variable\n\
00196 # (see PR2GripperEventDetectorCommand)\n\
00197 bool acceleration_event\n\
00198 \n\
00199 # the high-freq acceleration vector that was last seen (x,y,z)\n\
00200 float64[3] acceleration_vector\n\
00201 ";
00202 }
00203
00204 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> &) { return value(); }
00205 };
00206
00207 template<class ContainerAllocator> struct IsFixedSize< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> > : public TrueType {};
00208 }
00209 }
00210
00211 namespace ros
00212 {
00213 namespace serialization
00214 {
00215
00216 template<class ContainerAllocator> struct Serializer< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> >
00217 {
00218 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00219 {
00220 stream.next(m.stamp);
00221 stream.next(m.trigger_conditions_met);
00222 stream.next(m.slip_event);
00223 stream.next(m.acceleration_event);
00224 stream.next(m.acceleration_vector);
00225 }
00226
00227 ROS_DECLARE_ALLINONE_SERIALIZER;
00228 };
00229 }
00230 }
00231
00232 namespace ros
00233 {
00234 namespace message_operations
00235 {
00236
00237 template<class ContainerAllocator>
00238 struct Printer< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> >
00239 {
00240 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> & v)
00241 {
00242 s << indent << "stamp: ";
00243 Printer<ros::Time>::stream(s, indent + " ", v.stamp);
00244 s << indent << "trigger_conditions_met: ";
00245 Printer<uint8_t>::stream(s, indent + " ", v.trigger_conditions_met);
00246 s << indent << "slip_event: ";
00247 Printer<uint8_t>::stream(s, indent + " ", v.slip_event);
00248 s << indent << "acceleration_event: ";
00249 Printer<uint8_t>::stream(s, indent + " ", v.acceleration_event);
00250 s << indent << "acceleration_vector[]" << std::endl;
00251 for (size_t i = 0; i < v.acceleration_vector.size(); ++i)
00252 {
00253 s << indent << " acceleration_vector[" << i << "]: ";
00254 Printer<double>::stream(s, indent + " ", v.acceleration_vector[i]);
00255 }
00256 }
00257 };
00258
00259
00260 }
00261 }
00262
00263 #endif // PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPEREVENTDETECTORDATA_H
00264