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