17#ifndef GAZEBO_MSGS_MSGS_HH_
18#define GAZEBO_MSGS_MSGS_HH_
24#include <ignition/math/Inertial.hh>
25#include <ignition/math/MassMatrix3.hh>
26#include <ignition/math/Plane.hh>
27#include <ignition/math/Pose3.hh>
28#include <ignition/math/Quaternion.hh>
29#include <ignition/math/Vector2.hh>
30#include <ignition/math/Vector3.hh>
32#include <ignition/msgs/color.pb.h>
33#include <ignition/msgs/material.pb.h>
35#include "gazebo/msgs/MessageTypes.hh"
57 const std::string &_data =
"");
63 void Init(google::protobuf::Message &_message,
const std::string &_id =
"");
68 void Stamp(msgs::Header *_header);
77 std::string Package(
const std::string &type,
78 const google::protobuf::Message &message);
145 msgs::Vector3d
Convert(
const ignition::math::Vector3d &_v);
151 msgs::Vector2d
Convert(
const ignition::math::Vector2d &_v);
157 msgs::Quaternion
Convert(
const ignition::math::Quaterniond &_q);
163 msgs::Pose
Convert(
const ignition::math::Pose3d &_p);
169 msgs::Color
Convert(
const ignition::math::Color &_c);
181 msgs::Inertial
Convert(
const ignition::math::Inertiald &_i);
187 msgs::Inertial
Convert(
const ignition::math::MassMatrix3d &_m);
193 msgs::PlaneGeom
Convert(
const ignition::math::Planed &_p);
225 ignition::math::Vector3d
ConvertIgn(
const msgs::Vector3d &_v);
231 ignition::math::Vector2d
ConvertIgn(
const msgs::Vector2d &_v);
237 ignition::math::Quaterniond
ConvertIgn(
const msgs::Quaternion &_q);
249 ignition::math::Inertiald
Convert(
const msgs::Inertial &_i);
261 ignition::math::Color
Convert(
const msgs::Color &_c);
273 ignition::math::Planed
ConvertIgn(
const msgs::PlaneGeom &_p);
285 void Set(msgs::Vector3d *_pt,
const ignition::math::Vector3d &_v);
291 void Set(msgs::Vector2d *_pt,
const ignition::math::Vector2d &_v);
297 void Set(msgs::Quaternion *_q,
const ignition::math::Quaterniond &_v);
303 void Set(msgs::Pose *_p,
const ignition::math::Pose3d &_v);
309 void Set(msgs::Color *_c,
const ignition::math::Color &_v);
322 void Set(msgs::SphericalCoordinates *_s,
329 void Set(msgs::Inertial *_i,
const ignition::math::Inertiald &_m);
335 void Set(msgs::Inertial *_i,
const ignition::math::MassMatrix3d &_m);
341 void Set(msgs::PlaneGeom *_p,
const ignition::math::Planed &_v);
422 sdf::ElementPtr _sdf = sdf::ElementPtr());
433 sdf::ElementPtr _sdf = sdf::ElementPtr());
501 sdf::ElementPtr _sdf = sdf::ElementPtr());
510 sdf::ElementPtr _sdf = sdf::ElementPtr());
519 sdf::ElementPtr _sdf = sdf::ElementPtr());
528 sdf::ElementPtr _sdf = sdf::ElementPtr());
539 sdf::ElementPtr _sdf = sdf::ElementPtr());
548 sdf::ElementPtr _sdf = sdf::ElementPtr());
557 sdf::ElementPtr _sdf = sdf::ElementPtr());
569 sdf::ElementPtr _sdf = sdf::ElementPtr());
578 sdf::ElementPtr _sdf = sdf::ElementPtr());
589 const ignition::math::Vector3d &_size);
602 const double _radius,
const double _length);
613 const double _radius);
632 sdf::ElementPtr _sdf = sdf::ElementPtr());
641 sdf::ElementPtr _sdf = sdf::ElementPtr());
645 const google::protobuf::FieldDescriptor *GetFD(
646 google::protobuf::Message &message,
const std::string &name);
653 msgs::Header *
GetHeader(google::protobuf::Message &_message);
691 const msgs::LogicalCameraSensor &_msg,
692 sdf::ElementPtr _sdf = sdf::ElementPtr());
701 sdf::ElementPtr _sdf = sdf::ElementPtr());
710 sdf::ElementPtr _sdf = sdf::ElementPtr());
719 sdf::ElementPtr _sdf = sdf::ElementPtr());
739 const msgs::Material::ShaderType &_type);
747 const ignition::msgs::Material::ShaderType &_type);
755 const msgs::Material::Script &_script);
763 const ignition::msgs::Material::Script &_script);
Encapsulates an image.
Definition Image.hh:66
Convert spherical coordinates for planetary surfaces.
Definition SphericalCoordinates.hh:40
A Time class, can be used to hold wall- or sim-time.
Definition Time.hh:48
GAZEBO_VISIBLE void Stamp(msgs::Header *_header)
Time stamp a header.
GAZEBO_VISIBLE msgs::TrackVisual TrackVisualFromSDF(sdf::ElementPtr _sdf)
Create a msgs::TrackVisual from a track visual SDF element.
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
GAZEBO_VISIBLE sdf::ElementPtr LightToSDF(const msgs::Light &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from a msgs::Light.
GAZEBO_VISIBLE sdf::ElementPtr IMUSensorToSDF(const msgs::IMUSensor &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from a msgs::IMUSensor.
GAZEBO_VISIBLE void Set(common::Image &_img, const msgs::Image &_msg)
Convert a msgs::Image to a common::Image.
GAZEBO_VISIBLE msgs::MeshGeom MeshFromSDF(sdf::ElementPtr _sdf)
Create a msgs::MeshGeom from a mesh SDF element.
GAZEBO_VISIBLE msgs::Request * CreateRequest(const std::string &_request, const std::string &_data="")
Create a request message.
GAZEBO_VISIBLE void AddBoxLink(msgs::Model &_model, const double _mass, const ignition::math::Vector3d &_size)
Add a simple box link to a Model message.
GAZEBO_VISIBLE msgs::Vector3d Convert(const ignition::math::Vector3d &_v)
Convert a ignition::math::Vector3 to a msgs::Vector3d.
GAZEBO_VISIBLE msgs::RaySensor RaySensorFromSDF(sdf::ElementPtr _sdf)
Create a msgs::RaySensor from a ray sensor SDF element.
GAZEBO_VISIBLE msgs::Geometry::Type ConvertGeometryType(const std::string &_str)
Convert a string to a msgs::Geometry::Type enum.
GAZEBO_VISIBLE msgs::Friction FrictionFromSDF(sdf::ElementPtr _sdf)
Create a msgs::Friction from a friction SDF element.
GAZEBO_VISIBLE msgs::GPSSensor GPSSensorFromSDF(sdf::ElementPtr _sdf)
Create a msgs::GPSSensor from a gps sensor SDF element.
GAZEBO_VISIBLE msgs::Collision CollisionFromSDF(sdf::ElementPtr _sdf)
Create a msgs::Collision from a collision SDF element.
GAZEBO_VISIBLE sdf::ElementPtr SurfaceToSDF(const msgs::Surface &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from a msgs::Surface.
GAZEBO_VISIBLE msgs::Visual VisualFromSDF(sdf::ElementPtr _sdf)
Create a msgs::Visual from a visual SDF element.
GAZEBO_VISIBLE sdf::ElementPtr SensorNoiseToSDF(const msgs::SensorNoise &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from a msgs::SensorNoise.
GAZEBO_VISIBLE sdf::ElementPtr MaterialToSDF(const msgs::Material &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from a msgs::Material If _sdf is supplied and _msg has script uri's t...
GAZEBO_VISIBLE sdf::ElementPtr CameraSensorToSDF(const msgs::CameraSensor &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from a msgs::CameraSensor.
GAZEBO_VISIBLE sdf::ElementPtr GPSSensorToSDF(const msgs::GPSSensor &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from a msgs::GPSSensor.
GAZEBO_VISIBLE sdf::ElementPtr LogicalCameraSensorToSDF(const msgs::LogicalCameraSensor &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from a msgs::LogicalCameraSensor.
GAZEBO_VISIBLE msgs::Joint JointFromSDF(sdf::ElementPtr _sdf)
Create a msgs::Joint from a joint SDF element.
GAZEBO_VISIBLE msgs::LogicalCameraSensor LogicalCameraSensorFromSDF(sdf::ElementPtr _sdf)
Create a msgs::LogicalCameraSensor from a logical camera sensor.
GAZEBO_VISIBLE msgs::Sensor SensorFromSDF(sdf::ElementPtr _sdf)
Create a msgs::Sensor from a sensor SDF element.
GAZEBO_VISIBLE sdf::ElementPtr PluginToSDF(const msgs::Plugin &_plugin, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from a msgs::Plugin.
GAZEBO_VISIBLE msgs::Geometry GeometryFromSDF(sdf::ElementPtr _sdf)
Create a msgs::Geometry from a geometry SDF element.
GAZEBO_VISIBLE sdf::ElementPtr ModelToSDF(const msgs::Model &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from msgs::Model.
GAZEBO_VISIBLE msgs::Header * GetHeader(google::protobuf::Message &_message)
Get the header from a protobuf message.
GAZEBO_VISIBLE void AddLinkGeom(Model &_msg, const Geometry &_geom)
Add a link with a collision and visual of specified geometry to a model message.
GAZEBO_VISIBLE msgs::CameraSensor CameraSensorFromSDF(sdf::ElementPtr _sdf)
Create a msgs::CameraSensor from a camera sensor SDF element.
GAZEBO_VISIBLE msgs::Axis AxisFromSDF(sdf::ElementPtr _sdf)
Create a msgs::Axis from an axis SDF element.
GAZEBO_VISIBLE msgs::Scene SceneFromSDF(sdf::ElementPtr _sdf)
Create a msgs::Scene from a scene SDF element.
GAZEBO_VISIBLE msgs::Light LightFromSDF(sdf::ElementPtr _sdf)
Create a msgs::Light from a light SDF element.
GAZEBO_VISIBLE void AddSphereLink(msgs::Model &_model, const double _mass, const double _radius)
Add a simple sphere link to a Model message.
GAZEBO_VISIBLE msgs::Plugin PluginFromSDF(const sdf::ElementPtr _sdf)
Create a msgs::Plugin from a plugin SDF element.
GAZEBO_VISIBLE msgs::Any ConvertAny(const double _v)
Convert a double to a msgs::Any.
GAZEBO_VISIBLE sdf::ElementPtr JointToSDF(const msgs::Joint &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from msgs::Joint.
GAZEBO_VISIBLE sdf::ElementPtr InertialToSDF(const msgs::Inertial &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from a msgs::Inertial.
GAZEBO_VISIBLE sdf::ElementPtr VisualToSDF(const msgs::Visual &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from a msgs::Visual.
GAZEBO_VISIBLE sdf::ElementPtr CollisionToSDF(const msgs::Collision &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from a msgs::Collision.
GAZEBO_VISIBLE msgs::SensorNoise SensorNoiseFromSDF(sdf::ElementPtr _elem)
Create a msgs::SensorNoise from a sensor noise SDF element.
GAZEBO_VISIBLE msgs::ContactSensor ContactSensorFromSDF(sdf::ElementPtr _sdf)
Create a msgs::ContactSensor from a contact sensor SDF element.
GAZEBO_VISIBLE msgs::GUI GUIFromSDF(sdf::ElementPtr _sdf)
Create a msgs::GUI from a GUI SDF element.
GAZEBO_VISIBLE ignition::math::Vector3d ConvertIgn(const msgs::Vector3d &_v)
Convert a msgs::Vector3d to an ignition::math::Vector.
GAZEBO_VISIBLE sdf::ElementPtr LinkToSDF(const msgs::Link &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from a msgs::Link.
GAZEBO_VISIBLE msgs::IMUSensor IMUSensorFromSDF(sdf::ElementPtr _sdf)
Create a msgs::IMUSensor from an imu sensor SDF element.
GAZEBO_VISIBLE msgs::Fog FogFromSDF(sdf::ElementPtr _sdf)
Create a msgs::Fog from a fog SDF element.
GAZEBO_VISIBLE void AddCylinderLink(msgs::Model &_model, const double _mass, const double _radius, const double _length)
Add a simple cylinder link to a Model message.
GAZEBO_VISIBLE msgs::Surface SurfaceFromSDF(sdf::ElementPtr _sdf)
Create a msgs::Surface from a surface SDF element.
GAZEBO_VISIBLE sdf::ElementPtr GeometryToSDF(const msgs::Geometry &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from a msgs::Geometry If _sdf is supplied and the _msg has non-empty ...
GAZEBO_VISIBLE msgs::Joint::Type ConvertJointType(const std::string &_str)
Convert a string to a msgs::Joint::Type enum.
GAZEBO_VISIBLE msgs::Material::ShaderType ConvertShaderType(const std::string &_str)
Convert a string to a msgs::Material::ShaderType enum.
GAZEBO_VISIBLE sdf::ElementPtr MeshToSDF(const msgs::MeshGeom &_msg, sdf::ElementPtr _sdf=sdf::ElementPtr())
Create or update an SDF element from a msgs::Mesh.
GAZEBO_VISIBLE ignition::msgs::Color ConvertIgnMsg(const msgs::Color &_msg)
Convert gazebo::msgs::Color to ignition::msgs::Color.
Forward declarations for the common classes.
Definition Animation.hh:27
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition system.hh:59