00001
00002 #ifndef GAZEBO_PLUGINS_SERVICE_SPAWNMODEL_H
00003 #define GAZEBO_PLUGINS_SERVICE_SPAWNMODEL_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 "ros/service_traits.h"
00014
00015 #include "gazebo_plugins/GazeboModel.h"
00016
00017
00018
00019 namespace gazebo_plugins
00020 {
00021 template <class ContainerAllocator>
00022 struct SpawnModelRequest_ : public ros::Message
00023 {
00024 typedef SpawnModelRequest_<ContainerAllocator> Type;
00025
00026 SpawnModelRequest_()
00027 : model()
00028 {
00029 }
00030
00031 SpawnModelRequest_(const ContainerAllocator& _alloc)
00032 : model(_alloc)
00033 {
00034 }
00035
00036 typedef ::gazebo_plugins::GazeboModel_<ContainerAllocator> _model_type;
00037 ::gazebo_plugins::GazeboModel_<ContainerAllocator> model;
00038
00039
00040 private:
00041 static const char* __s_getDataType_() { return "gazebo_plugins/SpawnModelRequest"; }
00042 public:
00043 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00044
00045 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00046
00047 private:
00048 static const char* __s_getMD5Sum_() { return "8915810c16a568ad2934526b89348967"; }
00049 public:
00050 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00051
00052 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00053
00054 private:
00055 static const char* __s_getServerMD5Sum_() { return "ce64f81e9bc82e2fce98de7d4eea3e13"; }
00056 public:
00057 ROS_DEPRECATED static const std::string __s_getServerMD5Sum() { return __s_getServerMD5Sum_(); }
00058
00059 ROS_DEPRECATED const std::string __getServerMD5Sum() const { return __s_getServerMD5Sum_(); }
00060
00061 private:
00062 static const char* __s_getMessageDefinition_() { return "gazebo_plugins/GazeboModel model\n\
00063 \n\
00064 ================================================================================\n\
00065 MSG: gazebo_plugins/GazeboModel\n\
00066 # This is a message that hold the data necessary to spawn a model in Gazebo\n\
00067 # this message is used by SpawnModel service calls to RosFactory plugin.\n\
00068 \n\
00069 string model_name # name of the model to be spawned in Gazebo\n\
00070 string robot_model # contains either URDF or Gazebo XML robot model\n\
00071 uint32 xml_type # specifies what the content of robot_model is\n\
00072 string robot_namespace # ros namespace for all the ros interface of the model\n\
00073 geometry_msgs/Pose initial_pose # initial pose in the gazebo world frame\n\
00074 uint32 disable_urdf_joint_limits = 0 # special flag to disable URDF joint limits\n\
00075 uint32 URDF = 0 # enum: robot_model contains XML string for an URDF model\n\
00076 uint32 GAZEBO_XML = 1 # enum: robot_model contains XML string for an URDF model\n\
00077 uint32 URDF_PARAM_NAME = 2 # enum: robot_model contains parameter name containing URDF XML\n\
00078 uint32 GAZEBO_XML_PARAM_NAME = 3 # enum: robot_model contains parameter name containing Gazebo Model XML\n\
00079 uint32 URDF_FILE_NAME = 4 # enum: robot_model contains file name containing URDF XML\n\
00080 uint32 GAZEBO_XML_FILE_NAME = 5 # enum: robot_model contains file name containing Gazebo Model XML\n\
00081 \n\
00082 \n\
00083 ================================================================================\n\
00084 MSG: geometry_msgs/Pose\n\
00085 # A representation of pose in free space, composed of postion and orientation. \n\
00086 Point position\n\
00087 Quaternion orientation\n\
00088 \n\
00089 ================================================================================\n\
00090 MSG: geometry_msgs/Point\n\
00091 # This contains the position of a point in free space\n\
00092 float64 x\n\
00093 float64 y\n\
00094 float64 z\n\
00095 \n\
00096 ================================================================================\n\
00097 MSG: geometry_msgs/Quaternion\n\
00098 # This represents an orientation in free space in quaternion form.\n\
00099 \n\
00100 float64 x\n\
00101 float64 y\n\
00102 float64 z\n\
00103 float64 w\n\
00104 \n\
00105 "; }
00106 public:
00107 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00108
00109 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00110
00111 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00112 {
00113 ros::serialization::OStream stream(write_ptr, 1000000000);
00114 ros::serialization::serialize(stream, model);
00115 return stream.getData();
00116 }
00117
00118 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00119 {
00120 ros::serialization::IStream stream(read_ptr, 1000000000);
00121 ros::serialization::deserialize(stream, model);
00122 return stream.getData();
00123 }
00124
00125 ROS_DEPRECATED virtual uint32_t serializationLength() const
00126 {
00127 uint32_t size = 0;
00128 size += ros::serialization::serializationLength(model);
00129 return size;
00130 }
00131
00132 typedef boost::shared_ptr< ::gazebo_plugins::SpawnModelRequest_<ContainerAllocator> > Ptr;
00133 typedef boost::shared_ptr< ::gazebo_plugins::SpawnModelRequest_<ContainerAllocator> const> ConstPtr;
00134 };
00135 typedef ::gazebo_plugins::SpawnModelRequest_<std::allocator<void> > SpawnModelRequest;
00136
00137 typedef boost::shared_ptr< ::gazebo_plugins::SpawnModelRequest> SpawnModelRequestPtr;
00138 typedef boost::shared_ptr< ::gazebo_plugins::SpawnModelRequest const> SpawnModelRequestConstPtr;
00139
00140
00141 template <class ContainerAllocator>
00142 struct SpawnModelResponse_ : public ros::Message
00143 {
00144 typedef SpawnModelResponse_<ContainerAllocator> Type;
00145
00146 SpawnModelResponse_()
00147 : success(false)
00148 , status_message()
00149 {
00150 }
00151
00152 SpawnModelResponse_(const ContainerAllocator& _alloc)
00153 : success(false)
00154 , status_message(_alloc)
00155 {
00156 }
00157
00158 typedef uint8_t _success_type;
00159 uint8_t success;
00160
00161 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _status_message_type;
00162 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > status_message;
00163
00164
00165 private:
00166 static const char* __s_getDataType_() { return "gazebo_plugins/SpawnModelResponse"; }
00167 public:
00168 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00169
00170 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00171
00172 private:
00173 static const char* __s_getMD5Sum_() { return "2ec6f3eff0161f4257b808b12bc830c2"; }
00174 public:
00175 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00176
00177 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00178
00179 private:
00180 static const char* __s_getServerMD5Sum_() { return "ce64f81e9bc82e2fce98de7d4eea3e13"; }
00181 public:
00182 ROS_DEPRECATED static const std::string __s_getServerMD5Sum() { return __s_getServerMD5Sum_(); }
00183
00184 ROS_DEPRECATED const std::string __getServerMD5Sum() const { return __s_getServerMD5Sum_(); }
00185
00186 private:
00187 static const char* __s_getMessageDefinition_() { return "bool success\n\
00188 string status_message\n\
00189 \n\
00190 \n\
00191 "; }
00192 public:
00193 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00194
00195 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00196
00197 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00198 {
00199 ros::serialization::OStream stream(write_ptr, 1000000000);
00200 ros::serialization::serialize(stream, success);
00201 ros::serialization::serialize(stream, status_message);
00202 return stream.getData();
00203 }
00204
00205 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00206 {
00207 ros::serialization::IStream stream(read_ptr, 1000000000);
00208 ros::serialization::deserialize(stream, success);
00209 ros::serialization::deserialize(stream, status_message);
00210 return stream.getData();
00211 }
00212
00213 ROS_DEPRECATED virtual uint32_t serializationLength() const
00214 {
00215 uint32_t size = 0;
00216 size += ros::serialization::serializationLength(success);
00217 size += ros::serialization::serializationLength(status_message);
00218 return size;
00219 }
00220
00221 typedef boost::shared_ptr< ::gazebo_plugins::SpawnModelResponse_<ContainerAllocator> > Ptr;
00222 typedef boost::shared_ptr< ::gazebo_plugins::SpawnModelResponse_<ContainerAllocator> const> ConstPtr;
00223 };
00224 typedef ::gazebo_plugins::SpawnModelResponse_<std::allocator<void> > SpawnModelResponse;
00225
00226 typedef boost::shared_ptr< ::gazebo_plugins::SpawnModelResponse> SpawnModelResponsePtr;
00227 typedef boost::shared_ptr< ::gazebo_plugins::SpawnModelResponse const> SpawnModelResponseConstPtr;
00228
00229 struct SpawnModel
00230 {
00231
00232 typedef SpawnModelRequest Request;
00233 typedef SpawnModelResponse Response;
00234 Request request;
00235 Response response;
00236
00237 typedef Request RequestType;
00238 typedef Response ResponseType;
00239 };
00240 }
00241
00242 namespace ros
00243 {
00244 namespace message_traits
00245 {
00246 template<class ContainerAllocator>
00247 struct MD5Sum< ::gazebo_plugins::SpawnModelRequest_<ContainerAllocator> > {
00248 static const char* value()
00249 {
00250 return "8915810c16a568ad2934526b89348967";
00251 }
00252
00253 static const char* value(const ::gazebo_plugins::SpawnModelRequest_<ContainerAllocator> &) { return value(); }
00254 static const uint64_t static_value1 = 0x8915810c16a568adULL;
00255 static const uint64_t static_value2 = 0x2934526b89348967ULL;
00256 };
00257
00258 template<class ContainerAllocator>
00259 struct DataType< ::gazebo_plugins::SpawnModelRequest_<ContainerAllocator> > {
00260 static const char* value()
00261 {
00262 return "gazebo_plugins/SpawnModelRequest";
00263 }
00264
00265 static const char* value(const ::gazebo_plugins::SpawnModelRequest_<ContainerAllocator> &) { return value(); }
00266 };
00267
00268 template<class ContainerAllocator>
00269 struct Definition< ::gazebo_plugins::SpawnModelRequest_<ContainerAllocator> > {
00270 static const char* value()
00271 {
00272 return "gazebo_plugins/GazeboModel model\n\
00273 \n\
00274 ================================================================================\n\
00275 MSG: gazebo_plugins/GazeboModel\n\
00276 # This is a message that hold the data necessary to spawn a model in Gazebo\n\
00277 # this message is used by SpawnModel service calls to RosFactory plugin.\n\
00278 \n\
00279 string model_name # name of the model to be spawned in Gazebo\n\
00280 string robot_model # contains either URDF or Gazebo XML robot model\n\
00281 uint32 xml_type # specifies what the content of robot_model is\n\
00282 string robot_namespace # ros namespace for all the ros interface of the model\n\
00283 geometry_msgs/Pose initial_pose # initial pose in the gazebo world frame\n\
00284 uint32 disable_urdf_joint_limits = 0 # special flag to disable URDF joint limits\n\
00285 uint32 URDF = 0 # enum: robot_model contains XML string for an URDF model\n\
00286 uint32 GAZEBO_XML = 1 # enum: robot_model contains XML string for an URDF model\n\
00287 uint32 URDF_PARAM_NAME = 2 # enum: robot_model contains parameter name containing URDF XML\n\
00288 uint32 GAZEBO_XML_PARAM_NAME = 3 # enum: robot_model contains parameter name containing Gazebo Model XML\n\
00289 uint32 URDF_FILE_NAME = 4 # enum: robot_model contains file name containing URDF XML\n\
00290 uint32 GAZEBO_XML_FILE_NAME = 5 # enum: robot_model contains file name containing Gazebo Model XML\n\
00291 \n\
00292 \n\
00293 ================================================================================\n\
00294 MSG: geometry_msgs/Pose\n\
00295 # A representation of pose in free space, composed of postion and orientation. \n\
00296 Point position\n\
00297 Quaternion orientation\n\
00298 \n\
00299 ================================================================================\n\
00300 MSG: geometry_msgs/Point\n\
00301 # This contains the position of a point in free space\n\
00302 float64 x\n\
00303 float64 y\n\
00304 float64 z\n\
00305 \n\
00306 ================================================================================\n\
00307 MSG: geometry_msgs/Quaternion\n\
00308 # This represents an orientation in free space in quaternion form.\n\
00309 \n\
00310 float64 x\n\
00311 float64 y\n\
00312 float64 z\n\
00313 float64 w\n\
00314 \n\
00315 ";
00316 }
00317
00318 static const char* value(const ::gazebo_plugins::SpawnModelRequest_<ContainerAllocator> &) { return value(); }
00319 };
00320
00321 }
00322 }
00323
00324
00325 namespace ros
00326 {
00327 namespace message_traits
00328 {
00329 template<class ContainerAllocator>
00330 struct MD5Sum< ::gazebo_plugins::SpawnModelResponse_<ContainerAllocator> > {
00331 static const char* value()
00332 {
00333 return "2ec6f3eff0161f4257b808b12bc830c2";
00334 }
00335
00336 static const char* value(const ::gazebo_plugins::SpawnModelResponse_<ContainerAllocator> &) { return value(); }
00337 static const uint64_t static_value1 = 0x2ec6f3eff0161f42ULL;
00338 static const uint64_t static_value2 = 0x57b808b12bc830c2ULL;
00339 };
00340
00341 template<class ContainerAllocator>
00342 struct DataType< ::gazebo_plugins::SpawnModelResponse_<ContainerAllocator> > {
00343 static const char* value()
00344 {
00345 return "gazebo_plugins/SpawnModelResponse";
00346 }
00347
00348 static const char* value(const ::gazebo_plugins::SpawnModelResponse_<ContainerAllocator> &) { return value(); }
00349 };
00350
00351 template<class ContainerAllocator>
00352 struct Definition< ::gazebo_plugins::SpawnModelResponse_<ContainerAllocator> > {
00353 static const char* value()
00354 {
00355 return "bool success\n\
00356 string status_message\n\
00357 \n\
00358 \n\
00359 ";
00360 }
00361
00362 static const char* value(const ::gazebo_plugins::SpawnModelResponse_<ContainerAllocator> &) { return value(); }
00363 };
00364
00365 }
00366 }
00367
00368 namespace ros
00369 {
00370 namespace serialization
00371 {
00372
00373 template<class ContainerAllocator> struct Serializer< ::gazebo_plugins::SpawnModelRequest_<ContainerAllocator> >
00374 {
00375 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00376 {
00377 stream.next(m.model);
00378 }
00379
00380 ROS_DECLARE_ALLINONE_SERIALIZER;
00381 };
00382 }
00383 }
00384
00385
00386 namespace ros
00387 {
00388 namespace serialization
00389 {
00390
00391 template<class ContainerAllocator> struct Serializer< ::gazebo_plugins::SpawnModelResponse_<ContainerAllocator> >
00392 {
00393 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00394 {
00395 stream.next(m.success);
00396 stream.next(m.status_message);
00397 }
00398
00399 ROS_DECLARE_ALLINONE_SERIALIZER;
00400 };
00401 }
00402 }
00403
00404 namespace ros
00405 {
00406 namespace service_traits
00407 {
00408 template<>
00409 struct MD5Sum<gazebo_plugins::SpawnModel> {
00410 static const char* value()
00411 {
00412 return "ce64f81e9bc82e2fce98de7d4eea3e13";
00413 }
00414
00415 static const char* value(const gazebo_plugins::SpawnModel&) { return value(); }
00416 };
00417
00418 template<>
00419 struct DataType<gazebo_plugins::SpawnModel> {
00420 static const char* value()
00421 {
00422 return "gazebo_plugins/SpawnModel";
00423 }
00424
00425 static const char* value(const gazebo_plugins::SpawnModel&) { return value(); }
00426 };
00427
00428 template<class ContainerAllocator>
00429 struct MD5Sum<gazebo_plugins::SpawnModelRequest_<ContainerAllocator> > {
00430 static const char* value()
00431 {
00432 return "ce64f81e9bc82e2fce98de7d4eea3e13";
00433 }
00434
00435 static const char* value(const gazebo_plugins::SpawnModelRequest_<ContainerAllocator> &) { return value(); }
00436 };
00437
00438 template<class ContainerAllocator>
00439 struct DataType<gazebo_plugins::SpawnModelRequest_<ContainerAllocator> > {
00440 static const char* value()
00441 {
00442 return "gazebo_plugins/SpawnModel";
00443 }
00444
00445 static const char* value(const gazebo_plugins::SpawnModelRequest_<ContainerAllocator> &) { return value(); }
00446 };
00447
00448 template<class ContainerAllocator>
00449 struct MD5Sum<gazebo_plugins::SpawnModelResponse_<ContainerAllocator> > {
00450 static const char* value()
00451 {
00452 return "ce64f81e9bc82e2fce98de7d4eea3e13";
00453 }
00454
00455 static const char* value(const gazebo_plugins::SpawnModelResponse_<ContainerAllocator> &) { return value(); }
00456 };
00457
00458 template<class ContainerAllocator>
00459 struct DataType<gazebo_plugins::SpawnModelResponse_<ContainerAllocator> > {
00460 static const char* value()
00461 {
00462 return "gazebo_plugins/SpawnModel";
00463 }
00464
00465 static const char* value(const gazebo_plugins::SpawnModelResponse_<ContainerAllocator> &) { return value(); }
00466 };
00467
00468 }
00469 }
00470
00471 #endif // GAZEBO_PLUGINS_SERVICE_SPAWNMODEL_H
00472