00001
00002 #ifndef GAZEBO_PLUGINS_MESSAGE_GAZEBOMODEL_H
00003 #define GAZEBO_PLUGINS_MESSAGE_GAZEBOMODEL_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/Pose.h"
00014
00015 namespace gazebo_plugins
00016 {
00017 template <class ContainerAllocator>
00018 struct GazeboModel_ : public ros::Message
00019 {
00020 typedef GazeboModel_<ContainerAllocator> Type;
00021
00022 GazeboModel_()
00023 : model_name()
00024 , robot_model()
00025 , xml_type(0)
00026 , robot_namespace()
00027 , initial_pose()
00028 {
00029 }
00030
00031 GazeboModel_(const ContainerAllocator& _alloc)
00032 : model_name(_alloc)
00033 , robot_model(_alloc)
00034 , xml_type(0)
00035 , robot_namespace(_alloc)
00036 , initial_pose(_alloc)
00037 {
00038 }
00039
00040 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _model_name_type;
00041 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > model_name;
00042
00043 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _robot_model_type;
00044 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > robot_model;
00045
00046 typedef uint32_t _xml_type_type;
00047 uint32_t xml_type;
00048
00049 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _robot_namespace_type;
00050 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > robot_namespace;
00051
00052 typedef ::geometry_msgs::Pose_<ContainerAllocator> _initial_pose_type;
00053 ::geometry_msgs::Pose_<ContainerAllocator> initial_pose;
00054
00055 enum { disable_urdf_joint_limits = 0 };
00056 enum { URDF = 0 };
00057 enum { GAZEBO_XML = 1 };
00058 enum { URDF_PARAM_NAME = 2 };
00059 enum { GAZEBO_XML_PARAM_NAME = 3 };
00060 enum { URDF_FILE_NAME = 4 };
00061 enum { GAZEBO_XML_FILE_NAME = 5 };
00062
00063 private:
00064 static const char* __s_getDataType_() { return "gazebo_plugins/GazeboModel"; }
00065 public:
00066 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00067
00068 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00069
00070 private:
00071 static const char* __s_getMD5Sum_() { return "d714ee18a610705f8552f4aa20321c29"; }
00072 public:
00073 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00074
00075 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00076
00077 private:
00078 static const char* __s_getMessageDefinition_() { return "# This is a message that hold the data necessary to spawn a model in Gazebo\n\
00079 # this message is used by SpawnModel service calls to RosFactory plugin.\n\
00080 \n\
00081 string model_name # name of the model to be spawned in Gazebo\n\
00082 string robot_model # contains either URDF or Gazebo XML robot model\n\
00083 uint32 xml_type # specifies what the content of robot_model is\n\
00084 string robot_namespace # ros namespace for all the ros interface of the model\n\
00085 geometry_msgs/Pose initial_pose # initial pose in the gazebo world frame\n\
00086 uint32 disable_urdf_joint_limits = 0 # special flag to disable URDF joint limits\n\
00087 uint32 URDF = 0 # enum: robot_model contains XML string for an URDF model\n\
00088 uint32 GAZEBO_XML = 1 # enum: robot_model contains XML string for an URDF model\n\
00089 uint32 URDF_PARAM_NAME = 2 # enum: robot_model contains parameter name containing URDF XML\n\
00090 uint32 GAZEBO_XML_PARAM_NAME = 3 # enum: robot_model contains parameter name containing Gazebo Model XML\n\
00091 uint32 URDF_FILE_NAME = 4 # enum: robot_model contains file name containing URDF XML\n\
00092 uint32 GAZEBO_XML_FILE_NAME = 5 # enum: robot_model contains file name containing Gazebo Model XML\n\
00093 \n\
00094 \n\
00095 ================================================================================\n\
00096 MSG: geometry_msgs/Pose\n\
00097 # A representation of pose in free space, composed of postion and orientation. \n\
00098 Point position\n\
00099 Quaternion orientation\n\
00100 \n\
00101 ================================================================================\n\
00102 MSG: geometry_msgs/Point\n\
00103 # This contains the position of a point in free space\n\
00104 float64 x\n\
00105 float64 y\n\
00106 float64 z\n\
00107 \n\
00108 ================================================================================\n\
00109 MSG: geometry_msgs/Quaternion\n\
00110 # This represents an orientation in free space in quaternion form.\n\
00111 \n\
00112 float64 x\n\
00113 float64 y\n\
00114 float64 z\n\
00115 float64 w\n\
00116 \n\
00117 "; }
00118 public:
00119 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00120
00121 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00122
00123 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00124 {
00125 ros::serialization::OStream stream(write_ptr, 1000000000);
00126 ros::serialization::serialize(stream, model_name);
00127 ros::serialization::serialize(stream, robot_model);
00128 ros::serialization::serialize(stream, xml_type);
00129 ros::serialization::serialize(stream, robot_namespace);
00130 ros::serialization::serialize(stream, initial_pose);
00131 return stream.getData();
00132 }
00133
00134 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00135 {
00136 ros::serialization::IStream stream(read_ptr, 1000000000);
00137 ros::serialization::deserialize(stream, model_name);
00138 ros::serialization::deserialize(stream, robot_model);
00139 ros::serialization::deserialize(stream, xml_type);
00140 ros::serialization::deserialize(stream, robot_namespace);
00141 ros::serialization::deserialize(stream, initial_pose);
00142 return stream.getData();
00143 }
00144
00145 ROS_DEPRECATED virtual uint32_t serializationLength() const
00146 {
00147 uint32_t size = 0;
00148 size += ros::serialization::serializationLength(model_name);
00149 size += ros::serialization::serializationLength(robot_model);
00150 size += ros::serialization::serializationLength(xml_type);
00151 size += ros::serialization::serializationLength(robot_namespace);
00152 size += ros::serialization::serializationLength(initial_pose);
00153 return size;
00154 }
00155
00156 typedef boost::shared_ptr< ::gazebo_plugins::GazeboModel_<ContainerAllocator> > Ptr;
00157 typedef boost::shared_ptr< ::gazebo_plugins::GazeboModel_<ContainerAllocator> const> ConstPtr;
00158 };
00159 typedef ::gazebo_plugins::GazeboModel_<std::allocator<void> > GazeboModel;
00160
00161 typedef boost::shared_ptr< ::gazebo_plugins::GazeboModel> GazeboModelPtr;
00162 typedef boost::shared_ptr< ::gazebo_plugins::GazeboModel const> GazeboModelConstPtr;
00163
00164
00165 template<typename ContainerAllocator>
00166 std::ostream& operator<<(std::ostream& s, const ::gazebo_plugins::GazeboModel_<ContainerAllocator> & v)
00167 {
00168 ros::message_operations::Printer< ::gazebo_plugins::GazeboModel_<ContainerAllocator> >::stream(s, "", v);
00169 return s;}
00170
00171 }
00172
00173 namespace ros
00174 {
00175 namespace message_traits
00176 {
00177 template<class ContainerAllocator>
00178 struct MD5Sum< ::gazebo_plugins::GazeboModel_<ContainerAllocator> > {
00179 static const char* value()
00180 {
00181 return "d714ee18a610705f8552f4aa20321c29";
00182 }
00183
00184 static const char* value(const ::gazebo_plugins::GazeboModel_<ContainerAllocator> &) { return value(); }
00185 static const uint64_t static_value1 = 0xd714ee18a610705fULL;
00186 static const uint64_t static_value2 = 0x8552f4aa20321c29ULL;
00187 };
00188
00189 template<class ContainerAllocator>
00190 struct DataType< ::gazebo_plugins::GazeboModel_<ContainerAllocator> > {
00191 static const char* value()
00192 {
00193 return "gazebo_plugins/GazeboModel";
00194 }
00195
00196 static const char* value(const ::gazebo_plugins::GazeboModel_<ContainerAllocator> &) { return value(); }
00197 };
00198
00199 template<class ContainerAllocator>
00200 struct Definition< ::gazebo_plugins::GazeboModel_<ContainerAllocator> > {
00201 static const char* value()
00202 {
00203 return "# This is a message that hold the data necessary to spawn a model in Gazebo\n\
00204 # this message is used by SpawnModel service calls to RosFactory plugin.\n\
00205 \n\
00206 string model_name # name of the model to be spawned in Gazebo\n\
00207 string robot_model # contains either URDF or Gazebo XML robot model\n\
00208 uint32 xml_type # specifies what the content of robot_model is\n\
00209 string robot_namespace # ros namespace for all the ros interface of the model\n\
00210 geometry_msgs/Pose initial_pose # initial pose in the gazebo world frame\n\
00211 uint32 disable_urdf_joint_limits = 0 # special flag to disable URDF joint limits\n\
00212 uint32 URDF = 0 # enum: robot_model contains XML string for an URDF model\n\
00213 uint32 GAZEBO_XML = 1 # enum: robot_model contains XML string for an URDF model\n\
00214 uint32 URDF_PARAM_NAME = 2 # enum: robot_model contains parameter name containing URDF XML\n\
00215 uint32 GAZEBO_XML_PARAM_NAME = 3 # enum: robot_model contains parameter name containing Gazebo Model XML\n\
00216 uint32 URDF_FILE_NAME = 4 # enum: robot_model contains file name containing URDF XML\n\
00217 uint32 GAZEBO_XML_FILE_NAME = 5 # enum: robot_model contains file name containing Gazebo Model XML\n\
00218 \n\
00219 \n\
00220 ================================================================================\n\
00221 MSG: geometry_msgs/Pose\n\
00222 # A representation of pose in free space, composed of postion and orientation. \n\
00223 Point position\n\
00224 Quaternion orientation\n\
00225 \n\
00226 ================================================================================\n\
00227 MSG: geometry_msgs/Point\n\
00228 # This contains the position of a point in free space\n\
00229 float64 x\n\
00230 float64 y\n\
00231 float64 z\n\
00232 \n\
00233 ================================================================================\n\
00234 MSG: geometry_msgs/Quaternion\n\
00235 # This represents an orientation in free space in quaternion form.\n\
00236 \n\
00237 float64 x\n\
00238 float64 y\n\
00239 float64 z\n\
00240 float64 w\n\
00241 \n\
00242 ";
00243 }
00244
00245 static const char* value(const ::gazebo_plugins::GazeboModel_<ContainerAllocator> &) { return value(); }
00246 };
00247
00248 }
00249 }
00250
00251 namespace ros
00252 {
00253 namespace serialization
00254 {
00255
00256 template<class ContainerAllocator> struct Serializer< ::gazebo_plugins::GazeboModel_<ContainerAllocator> >
00257 {
00258 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00259 {
00260 stream.next(m.model_name);
00261 stream.next(m.robot_model);
00262 stream.next(m.xml_type);
00263 stream.next(m.robot_namespace);
00264 stream.next(m.initial_pose);
00265 }
00266
00267 ROS_DECLARE_ALLINONE_SERIALIZER;
00268 };
00269 }
00270 }
00271
00272 namespace ros
00273 {
00274 namespace message_operations
00275 {
00276
00277 template<class ContainerAllocator>
00278 struct Printer< ::gazebo_plugins::GazeboModel_<ContainerAllocator> >
00279 {
00280 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::gazebo_plugins::GazeboModel_<ContainerAllocator> & v)
00281 {
00282 s << indent << "model_name: ";
00283 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.model_name);
00284 s << indent << "robot_model: ";
00285 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.robot_model);
00286 s << indent << "xml_type: ";
00287 Printer<uint32_t>::stream(s, indent + " ", v.xml_type);
00288 s << indent << "robot_namespace: ";
00289 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.robot_namespace);
00290 s << indent << "initial_pose: ";
00291 s << std::endl;
00292 Printer< ::geometry_msgs::Pose_<ContainerAllocator> >::stream(s, indent + " ", v.initial_pose);
00293 }
00294 };
00295
00296
00297 }
00298 }
00299
00300 #endif // GAZEBO_PLUGINS_MESSAGE_GAZEBOMODEL_H
00301