Go to the documentation of this file.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 <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
00018 namespace pr2_gripper_sensor_msgs
00019 {
00020 template <class ContainerAllocator>
00021 struct PR2GripperEventDetectorData_ {
00022 typedef PR2GripperEventDetectorData_<ContainerAllocator> Type;
00023
00024 PR2GripperEventDetectorData_()
00025 : stamp()
00026 , trigger_conditions_met(false)
00027 , slip_event(false)
00028 , acceleration_event(false)
00029 , acceleration_vector()
00030 {
00031 acceleration_vector.assign(0.0);
00032 }
00033
00034 PR2GripperEventDetectorData_(const ContainerAllocator& _alloc)
00035 : stamp()
00036 , trigger_conditions_met(false)
00037 , slip_event(false)
00038 , acceleration_event(false)
00039 , acceleration_vector()
00040 {
00041 acceleration_vector.assign(0.0);
00042 }
00043
00044 typedef ros::Time _stamp_type;
00045 ros::Time stamp;
00046
00047 typedef uint8_t _trigger_conditions_met_type;
00048 uint8_t trigger_conditions_met;
00049
00050 typedef uint8_t _slip_event_type;
00051 uint8_t slip_event;
00052
00053 typedef uint8_t _acceleration_event_type;
00054 uint8_t acceleration_event;
00055
00056 typedef boost::array<double, 3> _acceleration_vector_type;
00057 boost::array<double, 3> acceleration_vector;
00058
00059
00060 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> > Ptr;
00061 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> const> ConstPtr;
00062 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00063 };
00064 typedef ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<std::allocator<void> > PR2GripperEventDetectorData;
00065
00066 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData> PR2GripperEventDetectorDataPtr;
00067 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData const> PR2GripperEventDetectorDataConstPtr;
00068
00069
00070 template<typename ContainerAllocator>
00071 std::ostream& operator<<(std::ostream& s, const ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> & v)
00072 {
00073 ros::message_operations::Printer< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> >::stream(s, "", v);
00074 return s;}
00075
00076 }
00077
00078 namespace ros
00079 {
00080 namespace message_traits
00081 {
00082 template<class ContainerAllocator> struct IsMessage< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> > : public TrueType {};
00083 template<class ContainerAllocator> struct IsMessage< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> const> : public TrueType {};
00084 template<class ContainerAllocator>
00085 struct MD5Sum< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> > {
00086 static const char* value()
00087 {
00088 return "9536d682ef6215440ecc47846d4117c2";
00089 }
00090
00091 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> &) { return value(); }
00092 static const uint64_t static_value1 = 0x9536d682ef621544ULL;
00093 static const uint64_t static_value2 = 0x0ecc47846d4117c2ULL;
00094 };
00095
00096 template<class ContainerAllocator>
00097 struct DataType< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> > {
00098 static const char* value()
00099 {
00100 return "pr2_gripper_sensor_msgs/PR2GripperEventDetectorData";
00101 }
00102
00103 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> &) { return value(); }
00104 };
00105
00106 template<class ContainerAllocator>
00107 struct Definition< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> > {
00108 static const char* value()
00109 {
00110 return "# Time the data was recorded at\n\
00111 time stamp\n\
00112 \n\
00113 # true if the trigger conditions have been met \n\
00114 # (see PR2GripperEventDetectorCommand)\n\
00115 bool trigger_conditions_met\n\
00116 \n\
00117 # true if the pressure sensors detected a slip event\n\
00118 # slip events occur when the finger pressure sensors\n\
00119 # high-freq. content exceeds the slip_trigger_magnitude variable\n\
00120 # (see PR2GripperEventDetectorCommand)\n\
00121 bool slip_event\n\
00122 \n\
00123 # true if the hand-mounted accelerometer detected a contact acceleration\n\
00124 # acceleration events occur when the palm accelerometer\n\
00125 # high-freq. content exceeds the acc_trigger_magnitude variable\n\
00126 # (see PR2GripperEventDetectorCommand)\n\
00127 bool acceleration_event\n\
00128 \n\
00129 # the high-freq acceleration vector that was last seen (x,y,z)\n\
00130 float64[3] acceleration_vector\n\
00131 ";
00132 }
00133
00134 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> &) { return value(); }
00135 };
00136
00137 template<class ContainerAllocator> struct IsFixedSize< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> > : public TrueType {};
00138 }
00139 }
00140
00141 namespace ros
00142 {
00143 namespace serialization
00144 {
00145
00146 template<class ContainerAllocator> struct Serializer< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> >
00147 {
00148 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00149 {
00150 stream.next(m.stamp);
00151 stream.next(m.trigger_conditions_met);
00152 stream.next(m.slip_event);
00153 stream.next(m.acceleration_event);
00154 stream.next(m.acceleration_vector);
00155 }
00156
00157 ROS_DECLARE_ALLINONE_SERIALIZER;
00158 };
00159 }
00160 }
00161
00162 namespace ros
00163 {
00164 namespace message_operations
00165 {
00166
00167 template<class ContainerAllocator>
00168 struct Printer< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> >
00169 {
00170 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorData_<ContainerAllocator> & v)
00171 {
00172 s << indent << "stamp: ";
00173 Printer<ros::Time>::stream(s, indent + " ", v.stamp);
00174 s << indent << "trigger_conditions_met: ";
00175 Printer<uint8_t>::stream(s, indent + " ", v.trigger_conditions_met);
00176 s << indent << "slip_event: ";
00177 Printer<uint8_t>::stream(s, indent + " ", v.slip_event);
00178 s << indent << "acceleration_event: ";
00179 Printer<uint8_t>::stream(s, indent + " ", v.acceleration_event);
00180 s << indent << "acceleration_vector[]" << std::endl;
00181 for (size_t i = 0; i < v.acceleration_vector.size(); ++i)
00182 {
00183 s << indent << " acceleration_vector[" << i << "]: ";
00184 Printer<double>::stream(s, indent + " ", v.acceleration_vector[i]);
00185 }
00186 }
00187 };
00188
00189
00190 }
00191 }
00192
00193 #endif // PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPEREVENTDETECTORDATA_H
00194