00001
00002 #ifndef PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPEREVENTDETECTORCOMMAND_H
00003 #define PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPEREVENTDETECTORCOMMAND_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 PR2GripperEventDetectorCommand_ {
00022 typedef PR2GripperEventDetectorCommand_<ContainerAllocator> Type;
00023
00024 PR2GripperEventDetectorCommand_()
00025 : trigger_conditions(0)
00026 , acceleration_trigger_magnitude(0.0)
00027 , slip_trigger_magnitude(0.0)
00028 {
00029 }
00030
00031 PR2GripperEventDetectorCommand_(const ContainerAllocator& _alloc)
00032 : trigger_conditions(0)
00033 , acceleration_trigger_magnitude(0.0)
00034 , slip_trigger_magnitude(0.0)
00035 {
00036 }
00037
00038 typedef int8_t _trigger_conditions_type;
00039 int8_t trigger_conditions;
00040
00041 typedef double _acceleration_trigger_magnitude_type;
00042 double acceleration_trigger_magnitude;
00043
00044 typedef double _slip_trigger_magnitude_type;
00045 double slip_trigger_magnitude;
00046
00047 enum { FINGER_SIDE_IMPACT_OR_ACC = 0 };
00048 enum { SLIP_AND_ACC = 1 };
00049 enum { FINGER_SIDE_IMPACT_OR_SLIP_OR_ACC = 2 };
00050 enum { SLIP = 3 };
00051 enum { ACC = 4 };
00052
00053 private:
00054 static const char* __s_getDataType_() { return "pr2_gripper_sensor_msgs/PR2GripperEventDetectorCommand"; }
00055 public:
00056 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00057
00058 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00059
00060 private:
00061 static const char* __s_getMD5Sum_() { return "b91a7e1e863671a84c1d06e0cac3146e"; }
00062 public:
00063 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00064
00065 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00066
00067 private:
00068 static const char* __s_getMessageDefinition_() { return "# state variable that defines what events we would like to trigger on\n\
00069 # Leaving this field blank will result in the robot triggering when \n\
00070 # anything touches the sides of the finger or an impact is detected\n\
00071 # with the hand/arm.\n\
00072 int8 trigger_conditions\n\
00073 # definitions for our various trigger_conditions values\n\
00074 # trigger on either acceleration contact or finger sensor side impact\n\
00075 int8 FINGER_SIDE_IMPACT_OR_ACC = 0\n\
00076 # tigger once both slip and acceleration signals occur\n\
00077 int8 SLIP_AND_ACC = 1 \n\
00078 # trigger on either slip, acceleration, or finger sensor side impact\n\
00079 int8 FINGER_SIDE_IMPACT_OR_SLIP_OR_ACC = 2\n\
00080 # trigger only on slip information\n\
00081 int8 SLIP = 3\n\
00082 # trigger only on acceleration contact information\n\
00083 int8 ACC = 4 \n\
00084 \n\
00085 \n\
00086 # the amount of acceleration to trigger on (acceleration vector magnitude)\n\
00087 # Units = m/s^2\n\
00088 # The user needs to be concerned here about not setting the trigger too\n\
00089 # low so that is set off by the robot's own motions.\n\
00090 #\n\
00091 # For large rapid motions, say by a motion planner, 5 m/s^2 is a good level\n\
00092 # For small delicate controlled motions this can be set MUCH lower (try 2.0)\n\
00093 #\n\
00094 # NOTE: When moving the gripper joint (opening/closing the grippr)\n\
00095 # the high gearing of the PR2 gripper causes large acceleration vibrations\n\
00096 # which will cause triggering to occur. This is a known drawback of the PR2.\n\
00097 #\n\
00098 # NOTE: Leaving this value blank will result in a 0 m/s^2 trigger. If you\n\
00099 # are using a trigger_conditions value that returns on acceleration contact\n\
00100 # events then it will immediately exceed your trigger and return\n\
00101 float64 acceleration_trigger_magnitude\n\
00102 \n\
00103 \n\
00104 # the slip detector gain to trigger on (either finger) : try 0.01\n\
00105 # higher values decrease slip sensitivty (to a point)\n\
00106 # lower values increase sensitivity (to a point)\n\
00107 #\n\
00108 # NOTE: Leaving this value blank will result in the most sensitive slip level.\n\
00109 float64 slip_trigger_magnitude\n\
00110 "; }
00111 public:
00112 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00113
00114 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00115
00116 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00117 {
00118 ros::serialization::OStream stream(write_ptr, 1000000000);
00119 ros::serialization::serialize(stream, trigger_conditions);
00120 ros::serialization::serialize(stream, acceleration_trigger_magnitude);
00121 ros::serialization::serialize(stream, slip_trigger_magnitude);
00122 return stream.getData();
00123 }
00124
00125 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00126 {
00127 ros::serialization::IStream stream(read_ptr, 1000000000);
00128 ros::serialization::deserialize(stream, trigger_conditions);
00129 ros::serialization::deserialize(stream, acceleration_trigger_magnitude);
00130 ros::serialization::deserialize(stream, slip_trigger_magnitude);
00131 return stream.getData();
00132 }
00133
00134 ROS_DEPRECATED virtual uint32_t serializationLength() const
00135 {
00136 uint32_t size = 0;
00137 size += ros::serialization::serializationLength(trigger_conditions);
00138 size += ros::serialization::serializationLength(acceleration_trigger_magnitude);
00139 size += ros::serialization::serializationLength(slip_trigger_magnitude);
00140 return size;
00141 }
00142
00143 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> > Ptr;
00144 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> const> ConstPtr;
00145 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00146 };
00147 typedef ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<std::allocator<void> > PR2GripperEventDetectorCommand;
00148
00149 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand> PR2GripperEventDetectorCommandPtr;
00150 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand const> PR2GripperEventDetectorCommandConstPtr;
00151
00152
00153 template<typename ContainerAllocator>
00154 std::ostream& operator<<(std::ostream& s, const ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> & v)
00155 {
00156 ros::message_operations::Printer< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> >::stream(s, "", v);
00157 return s;}
00158
00159 }
00160
00161 namespace ros
00162 {
00163 namespace message_traits
00164 {
00165 template<class ContainerAllocator> struct IsMessage< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> > : public TrueType {};
00166 template<class ContainerAllocator> struct IsMessage< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> const> : public TrueType {};
00167 template<class ContainerAllocator>
00168 struct MD5Sum< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> > {
00169 static const char* value()
00170 {
00171 return "b91a7e1e863671a84c1d06e0cac3146e";
00172 }
00173
00174 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> &) { return value(); }
00175 static const uint64_t static_value1 = 0xb91a7e1e863671a8ULL;
00176 static const uint64_t static_value2 = 0x4c1d06e0cac3146eULL;
00177 };
00178
00179 template<class ContainerAllocator>
00180 struct DataType< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> > {
00181 static const char* value()
00182 {
00183 return "pr2_gripper_sensor_msgs/PR2GripperEventDetectorCommand";
00184 }
00185
00186 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> &) { return value(); }
00187 };
00188
00189 template<class ContainerAllocator>
00190 struct Definition< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> > {
00191 static const char* value()
00192 {
00193 return "# state variable that defines what events we would like to trigger on\n\
00194 # Leaving this field blank will result in the robot triggering when \n\
00195 # anything touches the sides of the finger or an impact is detected\n\
00196 # with the hand/arm.\n\
00197 int8 trigger_conditions\n\
00198 # definitions for our various trigger_conditions values\n\
00199 # trigger on either acceleration contact or finger sensor side impact\n\
00200 int8 FINGER_SIDE_IMPACT_OR_ACC = 0\n\
00201 # tigger once both slip and acceleration signals occur\n\
00202 int8 SLIP_AND_ACC = 1 \n\
00203 # trigger on either slip, acceleration, or finger sensor side impact\n\
00204 int8 FINGER_SIDE_IMPACT_OR_SLIP_OR_ACC = 2\n\
00205 # trigger only on slip information\n\
00206 int8 SLIP = 3\n\
00207 # trigger only on acceleration contact information\n\
00208 int8 ACC = 4 \n\
00209 \n\
00210 \n\
00211 # the amount of acceleration to trigger on (acceleration vector magnitude)\n\
00212 # Units = m/s^2\n\
00213 # The user needs to be concerned here about not setting the trigger too\n\
00214 # low so that is set off by the robot's own motions.\n\
00215 #\n\
00216 # For large rapid motions, say by a motion planner, 5 m/s^2 is a good level\n\
00217 # For small delicate controlled motions this can be set MUCH lower (try 2.0)\n\
00218 #\n\
00219 # NOTE: When moving the gripper joint (opening/closing the grippr)\n\
00220 # the high gearing of the PR2 gripper causes large acceleration vibrations\n\
00221 # which will cause triggering to occur. This is a known drawback of the PR2.\n\
00222 #\n\
00223 # NOTE: Leaving this value blank will result in a 0 m/s^2 trigger. If you\n\
00224 # are using a trigger_conditions value that returns on acceleration contact\n\
00225 # events then it will immediately exceed your trigger and return\n\
00226 float64 acceleration_trigger_magnitude\n\
00227 \n\
00228 \n\
00229 # the slip detector gain to trigger on (either finger) : try 0.01\n\
00230 # higher values decrease slip sensitivty (to a point)\n\
00231 # lower values increase sensitivity (to a point)\n\
00232 #\n\
00233 # NOTE: Leaving this value blank will result in the most sensitive slip level.\n\
00234 float64 slip_trigger_magnitude\n\
00235 ";
00236 }
00237
00238 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> &) { return value(); }
00239 };
00240
00241 template<class ContainerAllocator> struct IsFixedSize< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> > : public TrueType {};
00242 }
00243 }
00244
00245 namespace ros
00246 {
00247 namespace serialization
00248 {
00249
00250 template<class ContainerAllocator> struct Serializer< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> >
00251 {
00252 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00253 {
00254 stream.next(m.trigger_conditions);
00255 stream.next(m.acceleration_trigger_magnitude);
00256 stream.next(m.slip_trigger_magnitude);
00257 }
00258
00259 ROS_DECLARE_ALLINONE_SERIALIZER;
00260 };
00261 }
00262 }
00263
00264 namespace ros
00265 {
00266 namespace message_operations
00267 {
00268
00269 template<class ContainerAllocator>
00270 struct Printer< ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> >
00271 {
00272 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_gripper_sensor_msgs::PR2GripperEventDetectorCommand_<ContainerAllocator> & v)
00273 {
00274 s << indent << "trigger_conditions: ";
00275 Printer<int8_t>::stream(s, indent + " ", v.trigger_conditions);
00276 s << indent << "acceleration_trigger_magnitude: ";
00277 Printer<double>::stream(s, indent + " ", v.acceleration_trigger_magnitude);
00278 s << indent << "slip_trigger_magnitude: ";
00279 Printer<double>::stream(s, indent + " ", v.slip_trigger_magnitude);
00280 }
00281 };
00282
00283
00284 }
00285 }
00286
00287 #endif // PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPEREVENTDETECTORCOMMAND_H
00288