$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/WorldState.msg */ 00002 #ifndef GAZEBO_MSGS_MESSAGE_WORLDSTATE_H 00003 #define GAZEBO_MSGS_MESSAGE_WORLDSTATE_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 "std_msgs/Header.h" 00018 #include "geometry_msgs/Pose.h" 00019 #include "geometry_msgs/Twist.h" 00020 #include "geometry_msgs/Wrench.h" 00021 00022 namespace gazebo_msgs 00023 { 00024 template <class ContainerAllocator> 00025 struct WorldState_ { 00026 typedef WorldState_<ContainerAllocator> Type; 00027 00028 WorldState_() 00029 : header() 00030 , name() 00031 , pose() 00032 , twist() 00033 , wrench() 00034 { 00035 } 00036 00037 WorldState_(const ContainerAllocator& _alloc) 00038 : header(_alloc) 00039 , name(_alloc) 00040 , pose(_alloc) 00041 , twist(_alloc) 00042 , wrench(_alloc) 00043 { 00044 } 00045 00046 typedef ::std_msgs::Header_<ContainerAllocator> _header_type; 00047 ::std_msgs::Header_<ContainerAllocator> header; 00048 00049 typedef std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > _name_type; 00050 std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > name; 00051 00052 typedef std::vector< ::geometry_msgs::Pose_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Pose_<ContainerAllocator> >::other > _pose_type; 00053 std::vector< ::geometry_msgs::Pose_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Pose_<ContainerAllocator> >::other > pose; 00054 00055 typedef std::vector< ::geometry_msgs::Twist_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Twist_<ContainerAllocator> >::other > _twist_type; 00056 std::vector< ::geometry_msgs::Twist_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Twist_<ContainerAllocator> >::other > twist; 00057 00058 typedef std::vector< ::geometry_msgs::Wrench_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Wrench_<ContainerAllocator> >::other > _wrench_type; 00059 std::vector< ::geometry_msgs::Wrench_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Wrench_<ContainerAllocator> >::other > wrench; 00060 00061 00062 ROS_DEPRECATED uint32_t get_name_size() const { return (uint32_t)name.size(); } 00063 ROS_DEPRECATED void set_name_size(uint32_t size) { name.resize((size_t)size); } 00064 ROS_DEPRECATED void get_name_vec(std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > & vec) const { vec = this->name; } 00065 ROS_DEPRECATED void set_name_vec(const std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > & vec) { this->name = vec; } 00066 ROS_DEPRECATED uint32_t get_pose_size() const { return (uint32_t)pose.size(); } 00067 ROS_DEPRECATED void set_pose_size(uint32_t size) { pose.resize((size_t)size); } 00068 ROS_DEPRECATED void get_pose_vec(std::vector< ::geometry_msgs::Pose_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Pose_<ContainerAllocator> >::other > & vec) const { vec = this->pose; } 00069 ROS_DEPRECATED void set_pose_vec(const std::vector< ::geometry_msgs::Pose_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Pose_<ContainerAllocator> >::other > & vec) { this->pose = vec; } 00070 ROS_DEPRECATED uint32_t get_twist_size() const { return (uint32_t)twist.size(); } 00071 ROS_DEPRECATED void set_twist_size(uint32_t size) { twist.resize((size_t)size); } 00072 ROS_DEPRECATED void get_twist_vec(std::vector< ::geometry_msgs::Twist_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Twist_<ContainerAllocator> >::other > & vec) const { vec = this->twist; } 00073 ROS_DEPRECATED void set_twist_vec(const std::vector< ::geometry_msgs::Twist_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Twist_<ContainerAllocator> >::other > & vec) { this->twist = vec; } 00074 ROS_DEPRECATED uint32_t get_wrench_size() const { return (uint32_t)wrench.size(); } 00075 ROS_DEPRECATED void set_wrench_size(uint32_t size) { wrench.resize((size_t)size); } 00076 ROS_DEPRECATED void get_wrench_vec(std::vector< ::geometry_msgs::Wrench_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Wrench_<ContainerAllocator> >::other > & vec) const { vec = this->wrench; } 00077 ROS_DEPRECATED void set_wrench_vec(const std::vector< ::geometry_msgs::Wrench_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Wrench_<ContainerAllocator> >::other > & vec) { this->wrench = vec; } 00078 private: 00079 static const char* __s_getDataType_() { return "gazebo_msgs/WorldState"; } 00080 public: 00081 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00082 00083 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00084 00085 private: 00086 static const char* __s_getMD5Sum_() { return "de1a9de3ab7ba97ac0e9ec01a4eb481e"; } 00087 public: 00088 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00089 00090 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00091 00092 private: 00093 static const char* __s_getMessageDefinition_() { return "# This is a message that holds data necessary to reconstruct a snapshot of the world\n\ 00094 #\n\ 00095 # = Approach to Message Passing =\n\ 00096 # The state of the world is defined by either\n\ 00097 # 1. Inertial Model pose, twist\n\ 00098 # * kinematic data - connectivity graph from Model to each Link\n\ 00099 # * joint angles\n\ 00100 # * joint velocities\n\ 00101 # * Applied forces - Body wrench\n\ 00102 # * relative transform from Body to each collision Geom\n\ 00103 # Or\n\ 00104 # 2. Inertial (absolute) Body pose, twist, wrench\n\ 00105 # * relative transform from Body to each collision Geom - constant, so not sent over wire\n\ 00106 # * back compute from canonical body info to get Model pose and twist.\n\ 00107 #\n\ 00108 # Chooing (2.) because it matches most physics engines out there\n\ 00109 # and is simpler.\n\ 00110 #\n\ 00111 # = Future =\n\ 00112 # Consider impacts on using reduced coordinates / graph (parent/child links) approach\n\ 00113 # constraint and physics solvers.\n\ 00114 #\n\ 00115 # = Application =\n\ 00116 # This message is used to do the following:\n\ 00117 # * reconstruct the world and objects for sensor generation\n\ 00118 # * stop / start simulation - need pose, twist, wrench of each body\n\ 00119 # * collision detection - need pose of each collision geometry. velocity/acceleration if \n\ 00120 #\n\ 00121 # = Assumptions =\n\ 00122 # Assuming that each (physics) processor node locally already has\n\ 00123 # * collision information - Trimesh for Geoms, etc\n\ 00124 # * relative transforms from Body to Geom - this is assumed to be fixed, do not send oved wire\n\ 00125 # * inertial information - does not vary in time\n\ 00126 # * visual information - does not vary in time\n\ 00127 #\n\ 00128 \n\ 00129 Header header\n\ 00130 \n\ 00131 string[] name\n\ 00132 geometry_msgs/Pose[] pose\n\ 00133 geometry_msgs/Twist[] twist\n\ 00134 geometry_msgs/Wrench[] wrench\n\ 00135 \n\ 00136 ================================================================================\n\ 00137 MSG: std_msgs/Header\n\ 00138 # Standard metadata for higher-level stamped data types.\n\ 00139 # This is generally used to communicate timestamped data \n\ 00140 # in a particular coordinate frame.\n\ 00141 # \n\ 00142 # sequence ID: consecutively increasing ID \n\ 00143 uint32 seq\n\ 00144 #Two-integer timestamp that is expressed as:\n\ 00145 # * stamp.secs: seconds (stamp_secs) since epoch\n\ 00146 # * stamp.nsecs: nanoseconds since stamp_secs\n\ 00147 # time-handling sugar is provided by the client library\n\ 00148 time stamp\n\ 00149 #Frame this data is associated with\n\ 00150 # 0: no frame\n\ 00151 # 1: global frame\n\ 00152 string frame_id\n\ 00153 \n\ 00154 ================================================================================\n\ 00155 MSG: geometry_msgs/Pose\n\ 00156 # A representation of pose in free space, composed of postion and orientation. \n\ 00157 Point position\n\ 00158 Quaternion orientation\n\ 00159 \n\ 00160 ================================================================================\n\ 00161 MSG: geometry_msgs/Point\n\ 00162 # This contains the position of a point in free space\n\ 00163 float64 x\n\ 00164 float64 y\n\ 00165 float64 z\n\ 00166 \n\ 00167 ================================================================================\n\ 00168 MSG: geometry_msgs/Quaternion\n\ 00169 # This represents an orientation in free space in quaternion form.\n\ 00170 \n\ 00171 float64 x\n\ 00172 float64 y\n\ 00173 float64 z\n\ 00174 float64 w\n\ 00175 \n\ 00176 ================================================================================\n\ 00177 MSG: geometry_msgs/Twist\n\ 00178 # This expresses velocity in free space broken into it's linear and angular parts. \n\ 00179 Vector3 linear\n\ 00180 Vector3 angular\n\ 00181 \n\ 00182 ================================================================================\n\ 00183 MSG: geometry_msgs/Vector3\n\ 00184 # This represents a vector in free space. \n\ 00185 \n\ 00186 float64 x\n\ 00187 float64 y\n\ 00188 float64 z\n\ 00189 ================================================================================\n\ 00190 MSG: geometry_msgs/Wrench\n\ 00191 # This represents force in free space, seperated into \n\ 00192 # it's linear and angular parts. \n\ 00193 Vector3 force\n\ 00194 Vector3 torque\n\ 00195 \n\ 00196 "; } 00197 public: 00198 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00199 00200 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00201 00202 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00203 { 00204 ros::serialization::OStream stream(write_ptr, 1000000000); 00205 ros::serialization::serialize(stream, header); 00206 ros::serialization::serialize(stream, name); 00207 ros::serialization::serialize(stream, pose); 00208 ros::serialization::serialize(stream, twist); 00209 ros::serialization::serialize(stream, wrench); 00210 return stream.getData(); 00211 } 00212 00213 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00214 { 00215 ros::serialization::IStream stream(read_ptr, 1000000000); 00216 ros::serialization::deserialize(stream, header); 00217 ros::serialization::deserialize(stream, name); 00218 ros::serialization::deserialize(stream, pose); 00219 ros::serialization::deserialize(stream, twist); 00220 ros::serialization::deserialize(stream, wrench); 00221 return stream.getData(); 00222 } 00223 00224 ROS_DEPRECATED virtual uint32_t serializationLength() const 00225 { 00226 uint32_t size = 0; 00227 size += ros::serialization::serializationLength(header); 00228 size += ros::serialization::serializationLength(name); 00229 size += ros::serialization::serializationLength(pose); 00230 size += ros::serialization::serializationLength(twist); 00231 size += ros::serialization::serializationLength(wrench); 00232 return size; 00233 } 00234 00235 typedef boost::shared_ptr< ::gazebo_msgs::WorldState_<ContainerAllocator> > Ptr; 00236 typedef boost::shared_ptr< ::gazebo_msgs::WorldState_<ContainerAllocator> const> ConstPtr; 00237 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00238 }; // struct WorldState 00239 typedef ::gazebo_msgs::WorldState_<std::allocator<void> > WorldState; 00240 00241 typedef boost::shared_ptr< ::gazebo_msgs::WorldState> WorldStatePtr; 00242 typedef boost::shared_ptr< ::gazebo_msgs::WorldState const> WorldStateConstPtr; 00243 00244 00245 template<typename ContainerAllocator> 00246 std::ostream& operator<<(std::ostream& s, const ::gazebo_msgs::WorldState_<ContainerAllocator> & v) 00247 { 00248 ros::message_operations::Printer< ::gazebo_msgs::WorldState_<ContainerAllocator> >::stream(s, "", v); 00249 return s;} 00250 00251 } // namespace gazebo_msgs 00252 00253 namespace ros 00254 { 00255 namespace message_traits 00256 { 00257 template<class ContainerAllocator> struct IsMessage< ::gazebo_msgs::WorldState_<ContainerAllocator> > : public TrueType {}; 00258 template<class ContainerAllocator> struct IsMessage< ::gazebo_msgs::WorldState_<ContainerAllocator> const> : public TrueType {}; 00259 template<class ContainerAllocator> 00260 struct MD5Sum< ::gazebo_msgs::WorldState_<ContainerAllocator> > { 00261 static const char* value() 00262 { 00263 return "de1a9de3ab7ba97ac0e9ec01a4eb481e"; 00264 } 00265 00266 static const char* value(const ::gazebo_msgs::WorldState_<ContainerAllocator> &) { return value(); } 00267 static const uint64_t static_value1 = 0xde1a9de3ab7ba97aULL; 00268 static const uint64_t static_value2 = 0xc0e9ec01a4eb481eULL; 00269 }; 00270 00271 template<class ContainerAllocator> 00272 struct DataType< ::gazebo_msgs::WorldState_<ContainerAllocator> > { 00273 static const char* value() 00274 { 00275 return "gazebo_msgs/WorldState"; 00276 } 00277 00278 static const char* value(const ::gazebo_msgs::WorldState_<ContainerAllocator> &) { return value(); } 00279 }; 00280 00281 template<class ContainerAllocator> 00282 struct Definition< ::gazebo_msgs::WorldState_<ContainerAllocator> > { 00283 static const char* value() 00284 { 00285 return "# This is a message that holds data necessary to reconstruct a snapshot of the world\n\ 00286 #\n\ 00287 # = Approach to Message Passing =\n\ 00288 # The state of the world is defined by either\n\ 00289 # 1. Inertial Model pose, twist\n\ 00290 # * kinematic data - connectivity graph from Model to each Link\n\ 00291 # * joint angles\n\ 00292 # * joint velocities\n\ 00293 # * Applied forces - Body wrench\n\ 00294 # * relative transform from Body to each collision Geom\n\ 00295 # Or\n\ 00296 # 2. Inertial (absolute) Body pose, twist, wrench\n\ 00297 # * relative transform from Body to each collision Geom - constant, so not sent over wire\n\ 00298 # * back compute from canonical body info to get Model pose and twist.\n\ 00299 #\n\ 00300 # Chooing (2.) because it matches most physics engines out there\n\ 00301 # and is simpler.\n\ 00302 #\n\ 00303 # = Future =\n\ 00304 # Consider impacts on using reduced coordinates / graph (parent/child links) approach\n\ 00305 # constraint and physics solvers.\n\ 00306 #\n\ 00307 # = Application =\n\ 00308 # This message is used to do the following:\n\ 00309 # * reconstruct the world and objects for sensor generation\n\ 00310 # * stop / start simulation - need pose, twist, wrench of each body\n\ 00311 # * collision detection - need pose of each collision geometry. velocity/acceleration if \n\ 00312 #\n\ 00313 # = Assumptions =\n\ 00314 # Assuming that each (physics) processor node locally already has\n\ 00315 # * collision information - Trimesh for Geoms, etc\n\ 00316 # * relative transforms from Body to Geom - this is assumed to be fixed, do not send oved wire\n\ 00317 # * inertial information - does not vary in time\n\ 00318 # * visual information - does not vary in time\n\ 00319 #\n\ 00320 \n\ 00321 Header header\n\ 00322 \n\ 00323 string[] name\n\ 00324 geometry_msgs/Pose[] pose\n\ 00325 geometry_msgs/Twist[] twist\n\ 00326 geometry_msgs/Wrench[] wrench\n\ 00327 \n\ 00328 ================================================================================\n\ 00329 MSG: std_msgs/Header\n\ 00330 # Standard metadata for higher-level stamped data types.\n\ 00331 # This is generally used to communicate timestamped data \n\ 00332 # in a particular coordinate frame.\n\ 00333 # \n\ 00334 # sequence ID: consecutively increasing ID \n\ 00335 uint32 seq\n\ 00336 #Two-integer timestamp that is expressed as:\n\ 00337 # * stamp.secs: seconds (stamp_secs) since epoch\n\ 00338 # * stamp.nsecs: nanoseconds since stamp_secs\n\ 00339 # time-handling sugar is provided by the client library\n\ 00340 time stamp\n\ 00341 #Frame this data is associated with\n\ 00342 # 0: no frame\n\ 00343 # 1: global frame\n\ 00344 string frame_id\n\ 00345 \n\ 00346 ================================================================================\n\ 00347 MSG: geometry_msgs/Pose\n\ 00348 # A representation of pose in free space, composed of postion and orientation. \n\ 00349 Point position\n\ 00350 Quaternion orientation\n\ 00351 \n\ 00352 ================================================================================\n\ 00353 MSG: geometry_msgs/Point\n\ 00354 # This contains the position of a point in free space\n\ 00355 float64 x\n\ 00356 float64 y\n\ 00357 float64 z\n\ 00358 \n\ 00359 ================================================================================\n\ 00360 MSG: geometry_msgs/Quaternion\n\ 00361 # This represents an orientation in free space in quaternion form.\n\ 00362 \n\ 00363 float64 x\n\ 00364 float64 y\n\ 00365 float64 z\n\ 00366 float64 w\n\ 00367 \n\ 00368 ================================================================================\n\ 00369 MSG: geometry_msgs/Twist\n\ 00370 # This expresses velocity in free space broken into it's linear and angular parts. \n\ 00371 Vector3 linear\n\ 00372 Vector3 angular\n\ 00373 \n\ 00374 ================================================================================\n\ 00375 MSG: geometry_msgs/Vector3\n\ 00376 # This represents a vector in free space. \n\ 00377 \n\ 00378 float64 x\n\ 00379 float64 y\n\ 00380 float64 z\n\ 00381 ================================================================================\n\ 00382 MSG: geometry_msgs/Wrench\n\ 00383 # This represents force in free space, seperated into \n\ 00384 # it's linear and angular parts. \n\ 00385 Vector3 force\n\ 00386 Vector3 torque\n\ 00387 \n\ 00388 "; 00389 } 00390 00391 static const char* value(const ::gazebo_msgs::WorldState_<ContainerAllocator> &) { return value(); } 00392 }; 00393 00394 template<class ContainerAllocator> struct HasHeader< ::gazebo_msgs::WorldState_<ContainerAllocator> > : public TrueType {}; 00395 template<class ContainerAllocator> struct HasHeader< const ::gazebo_msgs::WorldState_<ContainerAllocator> > : public TrueType {}; 00396 } // namespace message_traits 00397 } // namespace ros 00398 00399 namespace ros 00400 { 00401 namespace serialization 00402 { 00403 00404 template<class ContainerAllocator> struct Serializer< ::gazebo_msgs::WorldState_<ContainerAllocator> > 00405 { 00406 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00407 { 00408 stream.next(m.header); 00409 stream.next(m.name); 00410 stream.next(m.pose); 00411 stream.next(m.twist); 00412 stream.next(m.wrench); 00413 } 00414 00415 ROS_DECLARE_ALLINONE_SERIALIZER; 00416 }; // struct WorldState_ 00417 } // namespace serialization 00418 } // namespace ros 00419 00420 namespace ros 00421 { 00422 namespace message_operations 00423 { 00424 00425 template<class ContainerAllocator> 00426 struct Printer< ::gazebo_msgs::WorldState_<ContainerAllocator> > 00427 { 00428 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::gazebo_msgs::WorldState_<ContainerAllocator> & v) 00429 { 00430 s << indent << "header: "; 00431 s << std::endl; 00432 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header); 00433 s << indent << "name[]" << std::endl; 00434 for (size_t i = 0; i < v.name.size(); ++i) 00435 { 00436 s << indent << " name[" << i << "]: "; 00437 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name[i]); 00438 } 00439 s << indent << "pose[]" << std::endl; 00440 for (size_t i = 0; i < v.pose.size(); ++i) 00441 { 00442 s << indent << " pose[" << i << "]: "; 00443 s << std::endl; 00444 s << indent; 00445 Printer< ::geometry_msgs::Pose_<ContainerAllocator> >::stream(s, indent + " ", v.pose[i]); 00446 } 00447 s << indent << "twist[]" << std::endl; 00448 for (size_t i = 0; i < v.twist.size(); ++i) 00449 { 00450 s << indent << " twist[" << i << "]: "; 00451 s << std::endl; 00452 s << indent; 00453 Printer< ::geometry_msgs::Twist_<ContainerAllocator> >::stream(s, indent + " ", v.twist[i]); 00454 } 00455 s << indent << "wrench[]" << std::endl; 00456 for (size_t i = 0; i < v.wrench.size(); ++i) 00457 { 00458 s << indent << " wrench[" << i << "]: "; 00459 s << std::endl; 00460 s << indent; 00461 Printer< ::geometry_msgs::Wrench_<ContainerAllocator> >::stream(s, indent + " ", v.wrench[i]); 00462 } 00463 } 00464 }; 00465 00466 00467 } // namespace message_operations 00468 } // namespace ros 00469 00470 #endif // GAZEBO_MSGS_MESSAGE_WORLDSTATE_H 00471