00001
00002 #ifndef FINGERTIP_PRESSURE_MESSAGE_PRESSUREINFOELEMENT_H
00003 #define FINGERTIP_PRESSURE_MESSAGE_PRESSUREINFOELEMENT_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 #include "geometry_msgs/Vector3.h"
00014 #include "geometry_msgs/Vector3.h"
00015 #include "geometry_msgs/Vector3.h"
00016
00017 namespace fingertip_pressure
00018 {
00019 template <class ContainerAllocator>
00020 struct PressureInfoElement_ : public ros::Message
00021 {
00022 typedef PressureInfoElement_<ContainerAllocator> Type;
00023
00024 PressureInfoElement_()
00025 : frame_id()
00026 , center()
00027 , halfside1()
00028 , halfside2()
00029 , force_per_unit()
00030 {
00031 }
00032
00033 PressureInfoElement_(const ContainerAllocator& _alloc)
00034 : frame_id(_alloc)
00035 , center(_alloc)
00036 , halfside1(_alloc)
00037 , halfside2(_alloc)
00038 , force_per_unit(_alloc)
00039 {
00040 }
00041
00042 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _frame_id_type;
00043 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > frame_id;
00044
00045 typedef std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > _center_type;
00046 std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > center;
00047
00048 typedef std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > _halfside1_type;
00049 std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > halfside1;
00050
00051 typedef std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > _halfside2_type;
00052 std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > halfside2;
00053
00054 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _force_per_unit_type;
00055 std::vector<double, typename ContainerAllocator::template rebind<double>::other > force_per_unit;
00056
00057
00058 ROS_DEPRECATED uint32_t get_center_size() const { return (uint32_t)center.size(); }
00059 ROS_DEPRECATED void set_center_size(uint32_t size) { center.resize((size_t)size); }
00060 ROS_DEPRECATED void get_center_vec(std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > & vec) const { vec = this->center; }
00061 ROS_DEPRECATED void set_center_vec(const std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > & vec) { this->center = vec; }
00062 ROS_DEPRECATED uint32_t get_halfside1_size() const { return (uint32_t)halfside1.size(); }
00063 ROS_DEPRECATED void set_halfside1_size(uint32_t size) { halfside1.resize((size_t)size); }
00064 ROS_DEPRECATED void get_halfside1_vec(std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > & vec) const { vec = this->halfside1; }
00065 ROS_DEPRECATED void set_halfside1_vec(const std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > & vec) { this->halfside1 = vec; }
00066 ROS_DEPRECATED uint32_t get_halfside2_size() const { return (uint32_t)halfside2.size(); }
00067 ROS_DEPRECATED void set_halfside2_size(uint32_t size) { halfside2.resize((size_t)size); }
00068 ROS_DEPRECATED void get_halfside2_vec(std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > & vec) const { vec = this->halfside2; }
00069 ROS_DEPRECATED void set_halfside2_vec(const std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > & vec) { this->halfside2 = vec; }
00070 ROS_DEPRECATED uint32_t get_force_per_unit_size() const { return (uint32_t)force_per_unit.size(); }
00071 ROS_DEPRECATED void set_force_per_unit_size(uint32_t size) { force_per_unit.resize((size_t)size); }
00072 ROS_DEPRECATED void get_force_per_unit_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->force_per_unit; }
00073 ROS_DEPRECATED void set_force_per_unit_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->force_per_unit = vec; }
00074 private:
00075 static const char* __s_getDataType_() { return "fingertip_pressure/PressureInfoElement"; }
00076 public:
00077 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00078
00079 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00080
00081 private:
00082 static const char* __s_getMD5Sum_() { return "1cb486bb542ab85e1ff8d84fe9cc899f"; }
00083 public:
00084 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00085
00086 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00087
00088 private:
00089 static const char* __s_getMessageDefinition_() { return "string frame_id # Frame ID\n\
00090 geometry_msgs/Vector3[] center # Corner of sensor (meters)\n\
00091 geometry_msgs/Vector3[] halfside1 # Half of one edge of sensor (meters)\n\
00092 geometry_msgs/Vector3[] halfside2 # Half of perpendicular edge of sensor (meters)\n\
00093 # Sensor corners are at center+-halfside1+-halfside2\n\
00094 # Cross product of halfside1 and halfside2 points out\n\
00095 float64[] force_per_unit # Multiply this by the raw sensor value to get a force\n\
00096 \n\
00097 ================================================================================\n\
00098 MSG: geometry_msgs/Vector3\n\
00099 # This represents a vector in free space. \n\
00100 \n\
00101 float64 x\n\
00102 float64 y\n\
00103 float64 z\n\
00104 "; }
00105 public:
00106 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00107
00108 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00109
00110 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00111 {
00112 ros::serialization::OStream stream(write_ptr, 1000000000);
00113 ros::serialization::serialize(stream, frame_id);
00114 ros::serialization::serialize(stream, center);
00115 ros::serialization::serialize(stream, halfside1);
00116 ros::serialization::serialize(stream, halfside2);
00117 ros::serialization::serialize(stream, force_per_unit);
00118 return stream.getData();
00119 }
00120
00121 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00122 {
00123 ros::serialization::IStream stream(read_ptr, 1000000000);
00124 ros::serialization::deserialize(stream, frame_id);
00125 ros::serialization::deserialize(stream, center);
00126 ros::serialization::deserialize(stream, halfside1);
00127 ros::serialization::deserialize(stream, halfside2);
00128 ros::serialization::deserialize(stream, force_per_unit);
00129 return stream.getData();
00130 }
00131
00132 ROS_DEPRECATED virtual uint32_t serializationLength() const
00133 {
00134 uint32_t size = 0;
00135 size += ros::serialization::serializationLength(frame_id);
00136 size += ros::serialization::serializationLength(center);
00137 size += ros::serialization::serializationLength(halfside1);
00138 size += ros::serialization::serializationLength(halfside2);
00139 size += ros::serialization::serializationLength(force_per_unit);
00140 return size;
00141 }
00142
00143 typedef boost::shared_ptr< ::fingertip_pressure::PressureInfoElement_<ContainerAllocator> > Ptr;
00144 typedef boost::shared_ptr< ::fingertip_pressure::PressureInfoElement_<ContainerAllocator> const> ConstPtr;
00145 };
00146 typedef ::fingertip_pressure::PressureInfoElement_<std::allocator<void> > PressureInfoElement;
00147
00148 typedef boost::shared_ptr< ::fingertip_pressure::PressureInfoElement> PressureInfoElementPtr;
00149 typedef boost::shared_ptr< ::fingertip_pressure::PressureInfoElement const> PressureInfoElementConstPtr;
00150
00151
00152 template<typename ContainerAllocator>
00153 std::ostream& operator<<(std::ostream& s, const ::fingertip_pressure::PressureInfoElement_<ContainerAllocator> & v)
00154 {
00155 ros::message_operations::Printer< ::fingertip_pressure::PressureInfoElement_<ContainerAllocator> >::stream(s, "", v);
00156 return s;}
00157
00158 }
00159
00160 namespace ros
00161 {
00162 namespace message_traits
00163 {
00164 template<class ContainerAllocator>
00165 struct MD5Sum< ::fingertip_pressure::PressureInfoElement_<ContainerAllocator> > {
00166 static const char* value()
00167 {
00168 return "1cb486bb542ab85e1ff8d84fe9cc899f";
00169 }
00170
00171 static const char* value(const ::fingertip_pressure::PressureInfoElement_<ContainerAllocator> &) { return value(); }
00172 static const uint64_t static_value1 = 0x1cb486bb542ab85eULL;
00173 static const uint64_t static_value2 = 0x1ff8d84fe9cc899fULL;
00174 };
00175
00176 template<class ContainerAllocator>
00177 struct DataType< ::fingertip_pressure::PressureInfoElement_<ContainerAllocator> > {
00178 static const char* value()
00179 {
00180 return "fingertip_pressure/PressureInfoElement";
00181 }
00182
00183 static const char* value(const ::fingertip_pressure::PressureInfoElement_<ContainerAllocator> &) { return value(); }
00184 };
00185
00186 template<class ContainerAllocator>
00187 struct Definition< ::fingertip_pressure::PressureInfoElement_<ContainerAllocator> > {
00188 static const char* value()
00189 {
00190 return "string frame_id # Frame ID\n\
00191 geometry_msgs/Vector3[] center # Corner of sensor (meters)\n\
00192 geometry_msgs/Vector3[] halfside1 # Half of one edge of sensor (meters)\n\
00193 geometry_msgs/Vector3[] halfside2 # Half of perpendicular edge of sensor (meters)\n\
00194 # Sensor corners are at center+-halfside1+-halfside2\n\
00195 # Cross product of halfside1 and halfside2 points out\n\
00196 float64[] force_per_unit # Multiply this by the raw sensor value to get a force\n\
00197 \n\
00198 ================================================================================\n\
00199 MSG: geometry_msgs/Vector3\n\
00200 # This represents a vector in free space. \n\
00201 \n\
00202 float64 x\n\
00203 float64 y\n\
00204 float64 z\n\
00205 ";
00206 }
00207
00208 static const char* value(const ::fingertip_pressure::PressureInfoElement_<ContainerAllocator> &) { return value(); }
00209 };
00210
00211 }
00212 }
00213
00214 namespace ros
00215 {
00216 namespace serialization
00217 {
00218
00219 template<class ContainerAllocator> struct Serializer< ::fingertip_pressure::PressureInfoElement_<ContainerAllocator> >
00220 {
00221 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00222 {
00223 stream.next(m.frame_id);
00224 stream.next(m.center);
00225 stream.next(m.halfside1);
00226 stream.next(m.halfside2);
00227 stream.next(m.force_per_unit);
00228 }
00229
00230 ROS_DECLARE_ALLINONE_SERIALIZER;
00231 };
00232 }
00233 }
00234
00235 namespace ros
00236 {
00237 namespace message_operations
00238 {
00239
00240 template<class ContainerAllocator>
00241 struct Printer< ::fingertip_pressure::PressureInfoElement_<ContainerAllocator> >
00242 {
00243 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::fingertip_pressure::PressureInfoElement_<ContainerAllocator> & v)
00244 {
00245 s << indent << "frame_id: ";
00246 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.frame_id);
00247 s << indent << "center[]" << std::endl;
00248 for (size_t i = 0; i < v.center.size(); ++i)
00249 {
00250 s << indent << " center[" << i << "]: ";
00251 s << std::endl;
00252 s << indent;
00253 Printer< ::geometry_msgs::Vector3_<ContainerAllocator> >::stream(s, indent + " ", v.center[i]);
00254 }
00255 s << indent << "halfside1[]" << std::endl;
00256 for (size_t i = 0; i < v.halfside1.size(); ++i)
00257 {
00258 s << indent << " halfside1[" << i << "]: ";
00259 s << std::endl;
00260 s << indent;
00261 Printer< ::geometry_msgs::Vector3_<ContainerAllocator> >::stream(s, indent + " ", v.halfside1[i]);
00262 }
00263 s << indent << "halfside2[]" << std::endl;
00264 for (size_t i = 0; i < v.halfside2.size(); ++i)
00265 {
00266 s << indent << " halfside2[" << i << "]: ";
00267 s << std::endl;
00268 s << indent;
00269 Printer< ::geometry_msgs::Vector3_<ContainerAllocator> >::stream(s, indent + " ", v.halfside2[i]);
00270 }
00271 s << indent << "force_per_unit[]" << std::endl;
00272 for (size_t i = 0; i < v.force_per_unit.size(); ++i)
00273 {
00274 s << indent << " force_per_unit[" << i << "]: ";
00275 Printer<double>::stream(s, indent + " ", v.force_per_unit[i]);
00276 }
00277 }
00278 };
00279
00280
00281 }
00282 }
00283
00284 #endif // FINGERTIP_PRESSURE_MESSAGE_PRESSUREINFOELEMENT_H
00285