00001
00002 #ifndef PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPERFINDCONTACTCOMMAND_H
00003 #define PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPERFINDCONTACTCOMMAND_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 PR2GripperFindContactCommand_ : public ros::Message
00018 {
00019 typedef PR2GripperFindContactCommand_<ContainerAllocator> Type;
00020
00021 PR2GripperFindContactCommand_()
00022 : zero_fingertip_sensors(false)
00023 , contact_conditions(0)
00024 {
00025 }
00026
00027 PR2GripperFindContactCommand_(const ContainerAllocator& _alloc)
00028 : zero_fingertip_sensors(false)
00029 , contact_conditions(0)
00030 {
00031 }
00032
00033 typedef uint8_t _zero_fingertip_sensors_type;
00034 uint8_t zero_fingertip_sensors;
00035
00036 typedef int8_t _contact_conditions_type;
00037 int8_t contact_conditions;
00038
00039 enum { BOTH = 0 };
00040 enum { LEFT = 1 };
00041 enum { RIGHT = 2 };
00042 enum { EITHER = 3 };
00043
00044 private:
00045 static const char* __s_getDataType_() { return "pr2_gripper_sensor_msgs/PR2GripperFindContactCommand"; }
00046 public:
00047 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00048
00049 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00050
00051 private:
00052 static const char* __s_getMD5Sum_() { return "4a38a1a8e495aae86921ef2b292ec260"; }
00053 public:
00054 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00055
00056 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00057
00058 private:
00059 static const char* __s_getMessageDefinition_() { return "# set true if you want to calibrate the fingertip sensors on the start\n\
00060 # of the find_contact action. While this is not necessary (and\n\
00061 # the default value will not calibrate the sensors) for best \n\
00062 # performance it is recommended that you set this to true each time \n\
00063 # you are calling find_contact and are confident the fingertips are \n\
00064 # not touching anything\n\
00065 # NOTE: SHOULD ONLY BE TRUE WHEN BOTH FINGERS ARE TOUCHING NOTHING\n\
00066 bool zero_fingertip_sensors\n\
00067 \n\
00068 # the finger contact conditions that determine what our goal is\n\
00069 # Leaving this field blank will result in the robot closing until\n\
00070 # contact on BOTH fingers is achieved\n\
00071 int8 contact_conditions\n\
00072 \n\
00073 # predefined values for the above contact_conditions variable\n\
00074 int8 BOTH = 0 # both fingers must make contact\n\
00075 int8 LEFT = 1 # just the left finger \n\
00076 int8 RIGHT = 2 # just the right finger\n\
00077 int8 EITHER = 3 # either finger, we don't care which\n\
00078 \n\
00079 "; }
00080 public:
00081 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00082
00083 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00084
00085 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00086 {
00087 ros::serialization::OStream stream(write_ptr, 1000000000);
00088 ros::serialization::serialize(stream, zero_fingertip_sensors);
00089 ros::serialization::serialize(stream, contact_conditions);
00090 return stream.getData();
00091 }
00092
00093 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00094 {
00095 ros::serialization::IStream stream(read_ptr, 1000000000);
00096 ros::serialization::deserialize(stream, zero_fingertip_sensors);
00097 ros::serialization::deserialize(stream, contact_conditions);
00098 return stream.getData();
00099 }
00100
00101 ROS_DEPRECATED virtual uint32_t serializationLength() const
00102 {
00103 uint32_t size = 0;
00104 size += ros::serialization::serializationLength(zero_fingertip_sensors);
00105 size += ros::serialization::serializationLength(contact_conditions);
00106 return size;
00107 }
00108
00109 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand_<ContainerAllocator> > Ptr;
00110 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand_<ContainerAllocator> const> ConstPtr;
00111 };
00112 typedef ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand_<std::allocator<void> > PR2GripperFindContactCommand;
00113
00114 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand> PR2GripperFindContactCommandPtr;
00115 typedef boost::shared_ptr< ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand const> PR2GripperFindContactCommandConstPtr;
00116
00117
00118 template<typename ContainerAllocator>
00119 std::ostream& operator<<(std::ostream& s, const ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand_<ContainerAllocator> & v)
00120 {
00121 ros::message_operations::Printer< ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand_<ContainerAllocator> >::stream(s, "", v);
00122 return s;}
00123
00124 }
00125
00126 namespace ros
00127 {
00128 namespace message_traits
00129 {
00130 template<class ContainerAllocator>
00131 struct MD5Sum< ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand_<ContainerAllocator> > {
00132 static const char* value()
00133 {
00134 return "4a38a1a8e495aae86921ef2b292ec260";
00135 }
00136
00137 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand_<ContainerAllocator> &) { return value(); }
00138 static const uint64_t static_value1 = 0x4a38a1a8e495aae8ULL;
00139 static const uint64_t static_value2 = 0x6921ef2b292ec260ULL;
00140 };
00141
00142 template<class ContainerAllocator>
00143 struct DataType< ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand_<ContainerAllocator> > {
00144 static const char* value()
00145 {
00146 return "pr2_gripper_sensor_msgs/PR2GripperFindContactCommand";
00147 }
00148
00149 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand_<ContainerAllocator> &) { return value(); }
00150 };
00151
00152 template<class ContainerAllocator>
00153 struct Definition< ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand_<ContainerAllocator> > {
00154 static const char* value()
00155 {
00156 return "# set true if you want to calibrate the fingertip sensors on the start\n\
00157 # of the find_contact action. While this is not necessary (and\n\
00158 # the default value will not calibrate the sensors) for best \n\
00159 # performance it is recommended that you set this to true each time \n\
00160 # you are calling find_contact and are confident the fingertips are \n\
00161 # not touching anything\n\
00162 # NOTE: SHOULD ONLY BE TRUE WHEN BOTH FINGERS ARE TOUCHING NOTHING\n\
00163 bool zero_fingertip_sensors\n\
00164 \n\
00165 # the finger contact conditions that determine what our goal is\n\
00166 # Leaving this field blank will result in the robot closing until\n\
00167 # contact on BOTH fingers is achieved\n\
00168 int8 contact_conditions\n\
00169 \n\
00170 # predefined values for the above contact_conditions variable\n\
00171 int8 BOTH = 0 # both fingers must make contact\n\
00172 int8 LEFT = 1 # just the left finger \n\
00173 int8 RIGHT = 2 # just the right finger\n\
00174 int8 EITHER = 3 # either finger, we don't care which\n\
00175 \n\
00176 ";
00177 }
00178
00179 static const char* value(const ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand_<ContainerAllocator> &) { return value(); }
00180 };
00181
00182 template<class ContainerAllocator> struct IsFixedSize< ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand_<ContainerAllocator> > : public TrueType {};
00183 }
00184 }
00185
00186 namespace ros
00187 {
00188 namespace serialization
00189 {
00190
00191 template<class ContainerAllocator> struct Serializer< ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand_<ContainerAllocator> >
00192 {
00193 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00194 {
00195 stream.next(m.zero_fingertip_sensors);
00196 stream.next(m.contact_conditions);
00197 }
00198
00199 ROS_DECLARE_ALLINONE_SERIALIZER;
00200 };
00201 }
00202 }
00203
00204 namespace ros
00205 {
00206 namespace message_operations
00207 {
00208
00209 template<class ContainerAllocator>
00210 struct Printer< ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand_<ContainerAllocator> >
00211 {
00212 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_gripper_sensor_msgs::PR2GripperFindContactCommand_<ContainerAllocator> & v)
00213 {
00214 s << indent << "zero_fingertip_sensors: ";
00215 Printer<uint8_t>::stream(s, indent + " ", v.zero_fingertip_sensors);
00216 s << indent << "contact_conditions: ";
00217 Printer<int8_t>::stream(s, indent + " ", v.contact_conditions);
00218 }
00219 };
00220
00221
00222 }
00223 }
00224
00225 #endif // PR2_GRIPPER_SENSOR_MSGS_MESSAGE_PR2GRIPPERFINDCONTACTCOMMAND_H
00226