$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-simulator_gazebo/doc_stacks/2013-03-02_13-33-37.038309/simulator_gazebo/gazebo_msgs/msg/ContactState.msg */ 00002 #ifndef GAZEBO_MSGS_MESSAGE_CONTACTSTATE_H 00003 #define GAZEBO_MSGS_MESSAGE_CONTACTSTATE_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 #include "geometry_msgs/Wrench.h" 00018 #include "geometry_msgs/Wrench.h" 00019 #include "geometry_msgs/Vector3.h" 00020 #include "geometry_msgs/Vector3.h" 00021 00022 namespace gazebo_msgs 00023 { 00024 template <class ContainerAllocator> 00025 struct ContactState_ { 00026 typedef ContactState_<ContainerAllocator> Type; 00027 00028 ContactState_() 00029 : info() 00030 , geom1_name() 00031 , geom2_name() 00032 , wrenches() 00033 , total_wrench() 00034 , contact_positions() 00035 , contact_normals() 00036 , depths() 00037 { 00038 } 00039 00040 ContactState_(const ContainerAllocator& _alloc) 00041 : info(_alloc) 00042 , geom1_name(_alloc) 00043 , geom2_name(_alloc) 00044 , wrenches(_alloc) 00045 , total_wrench(_alloc) 00046 , contact_positions(_alloc) 00047 , contact_normals(_alloc) 00048 , depths(_alloc) 00049 { 00050 } 00051 00052 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _info_type; 00053 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > info; 00054 00055 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _geom1_name_type; 00056 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > geom1_name; 00057 00058 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _geom2_name_type; 00059 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > geom2_name; 00060 00061 typedef std::vector< ::geometry_msgs::Wrench_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Wrench_<ContainerAllocator> >::other > _wrenches_type; 00062 std::vector< ::geometry_msgs::Wrench_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Wrench_<ContainerAllocator> >::other > wrenches; 00063 00064 typedef ::geometry_msgs::Wrench_<ContainerAllocator> _total_wrench_type; 00065 ::geometry_msgs::Wrench_<ContainerAllocator> total_wrench; 00066 00067 typedef std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > _contact_positions_type; 00068 std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > contact_positions; 00069 00070 typedef std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > _contact_normals_type; 00071 std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > contact_normals; 00072 00073 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _depths_type; 00074 std::vector<double, typename ContainerAllocator::template rebind<double>::other > depths; 00075 00076 00077 ROS_DEPRECATED uint32_t get_wrenches_size() const { return (uint32_t)wrenches.size(); } 00078 ROS_DEPRECATED void set_wrenches_size(uint32_t size) { wrenches.resize((size_t)size); } 00079 ROS_DEPRECATED void get_wrenches_vec(std::vector< ::geometry_msgs::Wrench_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Wrench_<ContainerAllocator> >::other > & vec) const { vec = this->wrenches; } 00080 ROS_DEPRECATED void set_wrenches_vec(const std::vector< ::geometry_msgs::Wrench_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Wrench_<ContainerAllocator> >::other > & vec) { this->wrenches = vec; } 00081 ROS_DEPRECATED uint32_t get_contact_positions_size() const { return (uint32_t)contact_positions.size(); } 00082 ROS_DEPRECATED void set_contact_positions_size(uint32_t size) { contact_positions.resize((size_t)size); } 00083 ROS_DEPRECATED void get_contact_positions_vec(std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > & vec) const { vec = this->contact_positions; } 00084 ROS_DEPRECATED void set_contact_positions_vec(const std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > & vec) { this->contact_positions = vec; } 00085 ROS_DEPRECATED uint32_t get_contact_normals_size() const { return (uint32_t)contact_normals.size(); } 00086 ROS_DEPRECATED void set_contact_normals_size(uint32_t size) { contact_normals.resize((size_t)size); } 00087 ROS_DEPRECATED void get_contact_normals_vec(std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > & vec) const { vec = this->contact_normals; } 00088 ROS_DEPRECATED void set_contact_normals_vec(const std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > & vec) { this->contact_normals = vec; } 00089 ROS_DEPRECATED uint32_t get_depths_size() const { return (uint32_t)depths.size(); } 00090 ROS_DEPRECATED void set_depths_size(uint32_t size) { depths.resize((size_t)size); } 00091 ROS_DEPRECATED void get_depths_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->depths; } 00092 ROS_DEPRECATED void set_depths_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->depths = vec; } 00093 private: 00094 static const char* __s_getDataType_() { return "gazebo_msgs/ContactState"; } 00095 public: 00096 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00097 00098 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00099 00100 private: 00101 static const char* __s_getMD5Sum_() { return "7f688fc24d90d16872fdc9ea8c6e45ab"; } 00102 public: 00103 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00104 00105 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00106 00107 private: 00108 static const char* __s_getMessageDefinition_() { return "string info # text info on this contact\n\ 00109 string geom1_name # name of contact geom1\n\ 00110 string geom2_name # name of contact geom2\n\ 00111 geometry_msgs/Wrench[] wrenches # list of forces/torques\n\ 00112 geometry_msgs/Wrench total_wrench # sum of forces/torques in every DOF\n\ 00113 geometry_msgs/Vector3[] contact_positions # list of contact position\n\ 00114 geometry_msgs/Vector3[] contact_normals # list of contact normals\n\ 00115 float64[] depths # list of penetration depths\n\ 00116 \n\ 00117 ================================================================================\n\ 00118 MSG: geometry_msgs/Wrench\n\ 00119 # This represents force in free space, seperated into \n\ 00120 # it's linear and angular parts. \n\ 00121 Vector3 force\n\ 00122 Vector3 torque\n\ 00123 \n\ 00124 ================================================================================\n\ 00125 MSG: geometry_msgs/Vector3\n\ 00126 # This represents a vector in free space. \n\ 00127 \n\ 00128 float64 x\n\ 00129 float64 y\n\ 00130 float64 z\n\ 00131 "; } 00132 public: 00133 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00134 00135 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00136 00137 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00138 { 00139 ros::serialization::OStream stream(write_ptr, 1000000000); 00140 ros::serialization::serialize(stream, info); 00141 ros::serialization::serialize(stream, geom1_name); 00142 ros::serialization::serialize(stream, geom2_name); 00143 ros::serialization::serialize(stream, wrenches); 00144 ros::serialization::serialize(stream, total_wrench); 00145 ros::serialization::serialize(stream, contact_positions); 00146 ros::serialization::serialize(stream, contact_normals); 00147 ros::serialization::serialize(stream, depths); 00148 return stream.getData(); 00149 } 00150 00151 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00152 { 00153 ros::serialization::IStream stream(read_ptr, 1000000000); 00154 ros::serialization::deserialize(stream, info); 00155 ros::serialization::deserialize(stream, geom1_name); 00156 ros::serialization::deserialize(stream, geom2_name); 00157 ros::serialization::deserialize(stream, wrenches); 00158 ros::serialization::deserialize(stream, total_wrench); 00159 ros::serialization::deserialize(stream, contact_positions); 00160 ros::serialization::deserialize(stream, contact_normals); 00161 ros::serialization::deserialize(stream, depths); 00162 return stream.getData(); 00163 } 00164 00165 ROS_DEPRECATED virtual uint32_t serializationLength() const 00166 { 00167 uint32_t size = 0; 00168 size += ros::serialization::serializationLength(info); 00169 size += ros::serialization::serializationLength(geom1_name); 00170 size += ros::serialization::serializationLength(geom2_name); 00171 size += ros::serialization::serializationLength(wrenches); 00172 size += ros::serialization::serializationLength(total_wrench); 00173 size += ros::serialization::serializationLength(contact_positions); 00174 size += ros::serialization::serializationLength(contact_normals); 00175 size += ros::serialization::serializationLength(depths); 00176 return size; 00177 } 00178 00179 typedef boost::shared_ptr< ::gazebo_msgs::ContactState_<ContainerAllocator> > Ptr; 00180 typedef boost::shared_ptr< ::gazebo_msgs::ContactState_<ContainerAllocator> const> ConstPtr; 00181 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00182 }; // struct ContactState 00183 typedef ::gazebo_msgs::ContactState_<std::allocator<void> > ContactState; 00184 00185 typedef boost::shared_ptr< ::gazebo_msgs::ContactState> ContactStatePtr; 00186 typedef boost::shared_ptr< ::gazebo_msgs::ContactState const> ContactStateConstPtr; 00187 00188 00189 template<typename ContainerAllocator> 00190 std::ostream& operator<<(std::ostream& s, const ::gazebo_msgs::ContactState_<ContainerAllocator> & v) 00191 { 00192 ros::message_operations::Printer< ::gazebo_msgs::ContactState_<ContainerAllocator> >::stream(s, "", v); 00193 return s;} 00194 00195 } // namespace gazebo_msgs 00196 00197 namespace ros 00198 { 00199 namespace message_traits 00200 { 00201 template<class ContainerAllocator> struct IsMessage< ::gazebo_msgs::ContactState_<ContainerAllocator> > : public TrueType {}; 00202 template<class ContainerAllocator> struct IsMessage< ::gazebo_msgs::ContactState_<ContainerAllocator> const> : public TrueType {}; 00203 template<class ContainerAllocator> 00204 struct MD5Sum< ::gazebo_msgs::ContactState_<ContainerAllocator> > { 00205 static const char* value() 00206 { 00207 return "7f688fc24d90d16872fdc9ea8c6e45ab"; 00208 } 00209 00210 static const char* value(const ::gazebo_msgs::ContactState_<ContainerAllocator> &) { return value(); } 00211 static const uint64_t static_value1 = 0x7f688fc24d90d168ULL; 00212 static const uint64_t static_value2 = 0x72fdc9ea8c6e45abULL; 00213 }; 00214 00215 template<class ContainerAllocator> 00216 struct DataType< ::gazebo_msgs::ContactState_<ContainerAllocator> > { 00217 static const char* value() 00218 { 00219 return "gazebo_msgs/ContactState"; 00220 } 00221 00222 static const char* value(const ::gazebo_msgs::ContactState_<ContainerAllocator> &) { return value(); } 00223 }; 00224 00225 template<class ContainerAllocator> 00226 struct Definition< ::gazebo_msgs::ContactState_<ContainerAllocator> > { 00227 static const char* value() 00228 { 00229 return "string info # text info on this contact\n\ 00230 string geom1_name # name of contact geom1\n\ 00231 string geom2_name # name of contact geom2\n\ 00232 geometry_msgs/Wrench[] wrenches # list of forces/torques\n\ 00233 geometry_msgs/Wrench total_wrench # sum of forces/torques in every DOF\n\ 00234 geometry_msgs/Vector3[] contact_positions # list of contact position\n\ 00235 geometry_msgs/Vector3[] contact_normals # list of contact normals\n\ 00236 float64[] depths # list of penetration depths\n\ 00237 \n\ 00238 ================================================================================\n\ 00239 MSG: geometry_msgs/Wrench\n\ 00240 # This represents force in free space, seperated into \n\ 00241 # it's linear and angular parts. \n\ 00242 Vector3 force\n\ 00243 Vector3 torque\n\ 00244 \n\ 00245 ================================================================================\n\ 00246 MSG: geometry_msgs/Vector3\n\ 00247 # This represents a vector in free space. \n\ 00248 \n\ 00249 float64 x\n\ 00250 float64 y\n\ 00251 float64 z\n\ 00252 "; 00253 } 00254 00255 static const char* value(const ::gazebo_msgs::ContactState_<ContainerAllocator> &) { return value(); } 00256 }; 00257 00258 } // namespace message_traits 00259 } // namespace ros 00260 00261 namespace ros 00262 { 00263 namespace serialization 00264 { 00265 00266 template<class ContainerAllocator> struct Serializer< ::gazebo_msgs::ContactState_<ContainerAllocator> > 00267 { 00268 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00269 { 00270 stream.next(m.info); 00271 stream.next(m.geom1_name); 00272 stream.next(m.geom2_name); 00273 stream.next(m.wrenches); 00274 stream.next(m.total_wrench); 00275 stream.next(m.contact_positions); 00276 stream.next(m.contact_normals); 00277 stream.next(m.depths); 00278 } 00279 00280 ROS_DECLARE_ALLINONE_SERIALIZER; 00281 }; // struct ContactState_ 00282 } // namespace serialization 00283 } // namespace ros 00284 00285 namespace ros 00286 { 00287 namespace message_operations 00288 { 00289 00290 template<class ContainerAllocator> 00291 struct Printer< ::gazebo_msgs::ContactState_<ContainerAllocator> > 00292 { 00293 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::gazebo_msgs::ContactState_<ContainerAllocator> & v) 00294 { 00295 s << indent << "info: "; 00296 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.info); 00297 s << indent << "geom1_name: "; 00298 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.geom1_name); 00299 s << indent << "geom2_name: "; 00300 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.geom2_name); 00301 s << indent << "wrenches[]" << std::endl; 00302 for (size_t i = 0; i < v.wrenches.size(); ++i) 00303 { 00304 s << indent << " wrenches[" << i << "]: "; 00305 s << std::endl; 00306 s << indent; 00307 Printer< ::geometry_msgs::Wrench_<ContainerAllocator> >::stream(s, indent + " ", v.wrenches[i]); 00308 } 00309 s << indent << "total_wrench: "; 00310 s << std::endl; 00311 Printer< ::geometry_msgs::Wrench_<ContainerAllocator> >::stream(s, indent + " ", v.total_wrench); 00312 s << indent << "contact_positions[]" << std::endl; 00313 for (size_t i = 0; i < v.contact_positions.size(); ++i) 00314 { 00315 s << indent << " contact_positions[" << i << "]: "; 00316 s << std::endl; 00317 s << indent; 00318 Printer< ::geometry_msgs::Vector3_<ContainerAllocator> >::stream(s, indent + " ", v.contact_positions[i]); 00319 } 00320 s << indent << "contact_normals[]" << std::endl; 00321 for (size_t i = 0; i < v.contact_normals.size(); ++i) 00322 { 00323 s << indent << " contact_normals[" << i << "]: "; 00324 s << std::endl; 00325 s << indent; 00326 Printer< ::geometry_msgs::Vector3_<ContainerAllocator> >::stream(s, indent + " ", v.contact_normals[i]); 00327 } 00328 s << indent << "depths[]" << std::endl; 00329 for (size_t i = 0; i < v.depths.size(); ++i) 00330 { 00331 s << indent << " depths[" << i << "]: "; 00332 Printer<double>::stream(s, indent + " ", v.depths[i]); 00333 } 00334 } 00335 }; 00336 00337 00338 } // namespace message_operations 00339 } // namespace ros 00340 00341 #endif // GAZEBO_MSGS_MESSAGE_CONTACTSTATE_H 00342