00001
00002 #ifndef GAZEBO_PLUGINS_MESSAGE_CONTACTSSTATE_H
00003 #define GAZEBO_PLUGINS_MESSAGE_CONTACTSSTATE_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 "std_msgs/Header.h"
00014 #include "gazebo_plugins/ContactState.h"
00015
00016 namespace gazebo_plugins
00017 {
00018 template <class ContainerAllocator>
00019 struct ContactsState_ : public ros::Message
00020 {
00021 typedef ContactsState_<ContainerAllocator> Type;
00022
00023 ContactsState_()
00024 : header()
00025 , states()
00026 {
00027 }
00028
00029 ContactsState_(const ContainerAllocator& _alloc)
00030 : header(_alloc)
00031 , states(_alloc)
00032 {
00033 }
00034
00035 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00036 ::std_msgs::Header_<ContainerAllocator> header;
00037
00038 typedef std::vector< ::gazebo_plugins::ContactState_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::gazebo_plugins::ContactState_<ContainerAllocator> >::other > _states_type;
00039 std::vector< ::gazebo_plugins::ContactState_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::gazebo_plugins::ContactState_<ContainerAllocator> >::other > states;
00040
00041
00042 ROS_DEPRECATED uint32_t get_states_size() const { return (uint32_t)states.size(); }
00043 ROS_DEPRECATED void set_states_size(uint32_t size) { states.resize((size_t)size); }
00044 ROS_DEPRECATED void get_states_vec(std::vector< ::gazebo_plugins::ContactState_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::gazebo_plugins::ContactState_<ContainerAllocator> >::other > & vec) const { vec = this->states; }
00045 ROS_DEPRECATED void set_states_vec(const std::vector< ::gazebo_plugins::ContactState_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::gazebo_plugins::ContactState_<ContainerAllocator> >::other > & vec) { this->states = vec; }
00046 private:
00047 static const char* __s_getDataType_() { return "gazebo_plugins/ContactsState"; }
00048 public:
00049 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00050
00051 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00052
00053 private:
00054 static const char* __s_getMD5Sum_() { return "3faf37b14dd23b6abd0b6b1dfe846b7c"; }
00055 public:
00056 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00057
00058 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00059
00060 private:
00061 static const char* __s_getMessageDefinition_() { return "Header header # stamp\n\
00062 gazebo_plugins/ContactState[] states # array of geom pairs in contact\n\
00063 \n\
00064 ================================================================================\n\
00065 MSG: std_msgs/Header\n\
00066 # Standard metadata for higher-level stamped data types.\n\
00067 # This is generally used to communicate timestamped data \n\
00068 # in a particular coordinate frame.\n\
00069 # \n\
00070 # sequence ID: consecutively increasing ID \n\
00071 uint32 seq\n\
00072 #Two-integer timestamp that is expressed as:\n\
00073 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00074 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00075 # time-handling sugar is provided by the client library\n\
00076 time stamp\n\
00077 #Frame this data is associated with\n\
00078 # 0: no frame\n\
00079 # 1: global frame\n\
00080 string frame_id\n\
00081 \n\
00082 ================================================================================\n\
00083 MSG: gazebo_plugins/ContactState\n\
00084 string info # text info on this contact\n\
00085 string geom1_name # name of contact geom1\n\
00086 string geom2_name # name of contact geom2\n\
00087 geometry_msgs/Wrench[] wrenches # list of forces/torques\n\
00088 geometry_msgs/Vector3[] contact_positions # list of contact position\n\
00089 geometry_msgs/Vector3[] contact_normals # list of contact normals\n\
00090 float64[] depths # list of penetration depths\n\
00091 \n\
00092 ================================================================================\n\
00093 MSG: geometry_msgs/Wrench\n\
00094 # This represents force in free space, seperated into \n\
00095 # it's linear and angular parts. \n\
00096 Vector3 force\n\
00097 Vector3 torque\n\
00098 \n\
00099 ================================================================================\n\
00100 MSG: geometry_msgs/Vector3\n\
00101 # This represents a vector in free space. \n\
00102 \n\
00103 float64 x\n\
00104 float64 y\n\
00105 float64 z\n\
00106 "; }
00107 public:
00108 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00109
00110 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00111
00112 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00113 {
00114 ros::serialization::OStream stream(write_ptr, 1000000000);
00115 ros::serialization::serialize(stream, header);
00116 ros::serialization::serialize(stream, states);
00117 return stream.getData();
00118 }
00119
00120 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00121 {
00122 ros::serialization::IStream stream(read_ptr, 1000000000);
00123 ros::serialization::deserialize(stream, header);
00124 ros::serialization::deserialize(stream, states);
00125 return stream.getData();
00126 }
00127
00128 ROS_DEPRECATED virtual uint32_t serializationLength() const
00129 {
00130 uint32_t size = 0;
00131 size += ros::serialization::serializationLength(header);
00132 size += ros::serialization::serializationLength(states);
00133 return size;
00134 }
00135
00136 typedef boost::shared_ptr< ::gazebo_plugins::ContactsState_<ContainerAllocator> > Ptr;
00137 typedef boost::shared_ptr< ::gazebo_plugins::ContactsState_<ContainerAllocator> const> ConstPtr;
00138 };
00139 typedef ::gazebo_plugins::ContactsState_<std::allocator<void> > ContactsState;
00140
00141 typedef boost::shared_ptr< ::gazebo_plugins::ContactsState> ContactsStatePtr;
00142 typedef boost::shared_ptr< ::gazebo_plugins::ContactsState const> ContactsStateConstPtr;
00143
00144
00145 template<typename ContainerAllocator>
00146 std::ostream& operator<<(std::ostream& s, const ::gazebo_plugins::ContactsState_<ContainerAllocator> & v)
00147 {
00148 ros::message_operations::Printer< ::gazebo_plugins::ContactsState_<ContainerAllocator> >::stream(s, "", v);
00149 return s;}
00150
00151 }
00152
00153 namespace ros
00154 {
00155 namespace message_traits
00156 {
00157 template<class ContainerAllocator>
00158 struct MD5Sum< ::gazebo_plugins::ContactsState_<ContainerAllocator> > {
00159 static const char* value()
00160 {
00161 return "3faf37b14dd23b6abd0b6b1dfe846b7c";
00162 }
00163
00164 static const char* value(const ::gazebo_plugins::ContactsState_<ContainerAllocator> &) { return value(); }
00165 static const uint64_t static_value1 = 0x3faf37b14dd23b6aULL;
00166 static const uint64_t static_value2 = 0xbd0b6b1dfe846b7cULL;
00167 };
00168
00169 template<class ContainerAllocator>
00170 struct DataType< ::gazebo_plugins::ContactsState_<ContainerAllocator> > {
00171 static const char* value()
00172 {
00173 return "gazebo_plugins/ContactsState";
00174 }
00175
00176 static const char* value(const ::gazebo_plugins::ContactsState_<ContainerAllocator> &) { return value(); }
00177 };
00178
00179 template<class ContainerAllocator>
00180 struct Definition< ::gazebo_plugins::ContactsState_<ContainerAllocator> > {
00181 static const char* value()
00182 {
00183 return "Header header # stamp\n\
00184 gazebo_plugins/ContactState[] states # array of geom pairs in contact\n\
00185 \n\
00186 ================================================================================\n\
00187 MSG: std_msgs/Header\n\
00188 # Standard metadata for higher-level stamped data types.\n\
00189 # This is generally used to communicate timestamped data \n\
00190 # in a particular coordinate frame.\n\
00191 # \n\
00192 # sequence ID: consecutively increasing ID \n\
00193 uint32 seq\n\
00194 #Two-integer timestamp that is expressed as:\n\
00195 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00196 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00197 # time-handling sugar is provided by the client library\n\
00198 time stamp\n\
00199 #Frame this data is associated with\n\
00200 # 0: no frame\n\
00201 # 1: global frame\n\
00202 string frame_id\n\
00203 \n\
00204 ================================================================================\n\
00205 MSG: gazebo_plugins/ContactState\n\
00206 string info # text info on this contact\n\
00207 string geom1_name # name of contact geom1\n\
00208 string geom2_name # name of contact geom2\n\
00209 geometry_msgs/Wrench[] wrenches # list of forces/torques\n\
00210 geometry_msgs/Vector3[] contact_positions # list of contact position\n\
00211 geometry_msgs/Vector3[] contact_normals # list of contact normals\n\
00212 float64[] depths # list of penetration depths\n\
00213 \n\
00214 ================================================================================\n\
00215 MSG: geometry_msgs/Wrench\n\
00216 # This represents force in free space, seperated into \n\
00217 # it's linear and angular parts. \n\
00218 Vector3 force\n\
00219 Vector3 torque\n\
00220 \n\
00221 ================================================================================\n\
00222 MSG: geometry_msgs/Vector3\n\
00223 # This represents a vector in free space. \n\
00224 \n\
00225 float64 x\n\
00226 float64 y\n\
00227 float64 z\n\
00228 ";
00229 }
00230
00231 static const char* value(const ::gazebo_plugins::ContactsState_<ContainerAllocator> &) { return value(); }
00232 };
00233
00234 template<class ContainerAllocator> struct HasHeader< ::gazebo_plugins::ContactsState_<ContainerAllocator> > : public TrueType {};
00235 template<class ContainerAllocator> struct HasHeader< const ::gazebo_plugins::ContactsState_<ContainerAllocator> > : public TrueType {};
00236 }
00237 }
00238
00239 namespace ros
00240 {
00241 namespace serialization
00242 {
00243
00244 template<class ContainerAllocator> struct Serializer< ::gazebo_plugins::ContactsState_<ContainerAllocator> >
00245 {
00246 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00247 {
00248 stream.next(m.header);
00249 stream.next(m.states);
00250 }
00251
00252 ROS_DECLARE_ALLINONE_SERIALIZER;
00253 };
00254 }
00255 }
00256
00257 namespace ros
00258 {
00259 namespace message_operations
00260 {
00261
00262 template<class ContainerAllocator>
00263 struct Printer< ::gazebo_plugins::ContactsState_<ContainerAllocator> >
00264 {
00265 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::gazebo_plugins::ContactsState_<ContainerAllocator> & v)
00266 {
00267 s << indent << "header: ";
00268 s << std::endl;
00269 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00270 s << indent << "states[]" << std::endl;
00271 for (size_t i = 0; i < v.states.size(); ++i)
00272 {
00273 s << indent << " states[" << i << "]: ";
00274 s << std::endl;
00275 s << indent;
00276 Printer< ::gazebo_plugins::ContactState_<ContainerAllocator> >::stream(s, indent + " ", v.states[i]);
00277 }
00278 }
00279 };
00280
00281
00282 }
00283 }
00284
00285 #endif // GAZEBO_PLUGINS_MESSAGE_CONTACTSSTATE_H
00286