Ignition Msgs

API Reference

4.7.0
ignition::msgs Namespace Reference

Classes

class  DirIter
 A class for iterating over all items in a directory. More...
 
class  Factory
 A factory that generates protobuf message based on a string type. This class will also try to load all Protobuf descriptors specified in the IGN_DESCRIPTOR_PATH environment variable on program start. More...
 

Typedefs

typedef std::unique_ptr< google::protobuf::Message >(* FactoryFn) ()
 Prototype for message factory generation. More...
 

Enumerations

enum  FilesystemWarningOp { FSWO_LOG_WARNINGS = 0, FSWO_SUPPRESS_WARNINGS }
 Options for how to handle errors that occur in functions that manipulate the filesystem. More...
 

Functions

ignition::math::Vector3d Convert (const msgs::Vector3d &_v)
 Convert a msgs::Vector3d to an ignition::math::Vector. More...
 
ignition::math::Vector2d Convert (const msgs::Vector2d &_v)
 Convert a msgs::Vector2d to an ignition::math::Vector2d. More...
 
ignition::math::Quaterniond Convert (const msgs::Quaternion &_q)
 Convert a msgs::Quaternion to an ignition::math::Quaterniond. More...
 
ignition::math::Pose3d Convert (const msgs::Pose &_p)
 Convert a msgs::Pose to an ignition::math::Pose3d. More...
 
math::Color Convert (const msgs::Color &_c)
 Convert a msgs::Color to a math::Color. More...
 
ignition::math::Planed Convert (const msgs::PlaneGeom &_p)
 Convert a msgs::PlaneGeom to an ignition::math::Planed. More...
 
math::Inertiald Convert (const msgs::Inertial &_i)
 Convert a msgs::Inertial to an ignition::math::Inertiald. More...
 
math::AxisAlignedBox Convert (const msgs::AxisAlignedBox &_b)
 Convert a msgs::AxisAlignedBox to an ignition::math::AxisAlignedBox. More...
 
msgs::AxisAlignedBox Convert (const math::AxisAlignedBox &_b)
 Convert ignition::math::AxisAlignedBox to msgs::AxisAlignedBox. More...
 
std::string Convert (const msgs::StringMsg &_m)
 Convert a msgs::StringMsg to an std::string. More...
 
bool Convert (const msgs::Boolean &_m)
 Convert a msgs::Boolean to a bool. More...
 
int32_t Convert (const msgs::Int32 &_m)
 Convert a msgs::Int32 to an int32_t. More...
 
uint32_t Convert (const msgs::UInt32 &_m)
 Convert a msgs::UInt32 to a uint32_t. More...
 
int64_t Convert (const msgs::Int64 &_m)
 Convert a msgs::Int64 to an int64_t. More...
 
uint64_t Convert (const msgs::UInt64 &_m)
 Convert a msgs::UInt64 to a uint64_t. More...
 
double Convert (const msgs::Double &_m)
 Convert a msgs::Double to a double. More...
 
float Convert (const msgs::Float &_m)
 Convert a msgs::Float to a float. More...
 
msgs::Vector3d Convert (const ignition::math::Vector3d &_v)
 Convert a ignition::math::Vector3d to a msgs::Vector3d. More...
 
msgs::Vector2d Convert (const ignition::math::Vector2d &_v)
 Convert a ignition::math::Vector2d to a msgs::Vector2d. More...
 
msgs::Quaternion Convert (const ignition::math::Quaterniond &_q)
 Convert a ignition::math::Quaterniond to a msgs::Quaternion. More...
 
msgs::Pose Convert (const ignition::math::Pose3d &_p)
 Convert a ignition::math::Pose3d to a msgs::Pose. More...
 
msgs::Color Convert (const math::Color &_c)
 Convert a math::Color to a msgs::Color. More...
 
msgs::Inertial Convert (const math::Inertiald &_i)
 Convert an math::Inertiald to a msgs::Inertial. More...
 
msgs::Inertial Convert (const math::MassMatrix3d &_m)
 Convert an math::MassMatrix3d to a msgs::Inertial. More...
 
msgs::PlaneGeom Convert (const ignition::math::Planed &_p)
 Convert a ignition::math::Planed to a msgs::PlaneGeom. More...
 
msgs::StringMsg Convert (const std::string &_s)
 Convert an std::string to a msgs::StringMsg. More...
 
msgs::Boolean Convert (const bool &_b)
 Convert a bool to a msgs::Boolean. More...
 
msgs::Int32 Convert (const int32_t &_i)
 Convert an int32_t to a msgs::Int32. More...
 
msgs::UInt32 Convert (const uint32_t &_u)
 Convert a uint32_t to a msgs::UInt32. More...
 
msgs::Int64 Convert (const int64_t &_i)
 Convert an int64_t to a msgs::Int64. More...
 
msgs::UInt64 Convert (const uint64_t &_u)
 Convert a uint64_t to a msgs::UInt64. More...
 
msgs::Double Convert (const double &_d)
 Convert a double to a msgs::Double. More...
 
msgs::Float Convert (const float &_f)
 Convert a float to a msgs::Float. More...
 
msgs::Geometry::Type ConvertGeometryType (const std::string &_str)
 Convert a string to a msgs::Geometry::Type enum. More...
 
std::string ConvertGeometryType (const msgs::Geometry::Type _type)
 Convert a msgs::Geometry::Type to a string. More...
 
msgs::Joint::Type ConvertJointType (const std::string &_str)
 Convert a string to a msgs::Joint::Type enum. More...
 
std::string ConvertJointType (const msgs::Joint::Type &_type)
 Convert a msgs::Joint::Type to a string. More...
 
msgs::Material::ShaderType ConvertShaderType (const std::string &_str)
 Convert a string to a msgs::Material::ShaderType enum. More...
 
std::string ConvertShaderType (const msgs::Material::ShaderType &_type)
 Convert a msgs::ShaderType to a string. More...
 
void InitPointCloudPacked (msgs::PointCloudPacked &_msg, const std::string &_frameId, bool _memoryAligned, const std::vector< std::pair< std::string, msgs::PointCloudPacked::Field::DataType >> &_fields)
 This function will set the header and field members of a PointCloudPacked message. This will clear existing values in the PointCloudPacked field and header. More...
 
void Set (msgs::Vector3d *_pt, const ignition::math::Vector3d &_v)
 Set a msgs::Vector3d from an ignition::math::Vector3d. More...
 
void Set (msgs::Vector2d *_pt, const ignition::math::Vector2d &_v)
 Set a msgs::Vector2d from an ignition::math::Vector2d. More...
 
void Set (msgs::Quaternion *_q, const ignition::math::Quaterniond &_v)
 Set a msgs::Quaternion from an ignition::math::Quaterniond. More...
 
void Set (msgs::Pose *_p, const ignition::math::Pose3d &_v)
 Set a msgs::Pose from an ignition::math::Pose3d. More...
 
void Set (msgs::Color *_c, const math::Color &_v)
 Set a msgs::Color from a math::Color. More...
 
void Set (msgs::Inertial *_i, const math::Inertiald &_m)
 Set a msgs::Inertial from an math::Inertiald. More...
 
void Set (msgs::Inertial *_i, const math::MassMatrix3d &_m)
 Set a msgs::Inertial from an math::MassMatrix3d. More...
 
void Set (msgs::PlaneGeom *_p, const ignition::math::Planed &_v)
 Set a msgs::Plane from an ignition::math::Planed. More...
 
void Set (msgs::StringMsg *_p, const std::string &_v)
 Set a msgs::StringMsg from an std::string. More...
 
void Set (msgs::Boolean *_p, const bool &_v)
 Set a msgs::Boolean from a bool. More...
 
void Set (msgs::Int32 *_p, const int32_t &_v)
 Set a msgs::Int32 from an int32_t. More...
 
void Set (msgs::UInt32 *_p, const uint32_t &_v)
 Set a msgs::UInt32 from a uint32_t. More...
 
void Set (msgs::Int64 *_p, const int64_t &_v)
 Set a msgs::Int64 from an int64_t. More...
 
void Set (msgs::UInt64 *_p, const uint64_t &_v)
 Set a msgs::UInt64 from an uint64_t. More...
 
void Set (msgs::Double *_p, const double &_v)
 Set a msgs::Double from a double. More...
 
void Set (msgs::Float *_p, const float &_v)
 Set a msgs::Float from a float. More...
 
void Set (msgs::AxisAlignedBox *_b, const math::AxisAlignedBox &_v)
 Set a msgs::AxisAlignedBox from a math::AxisAlignedBox. More...
 

Typedef Documentation

◆ FactoryFn

FactoryFn

Prototype for message factory generation.

Enumeration Type Documentation

◆ FilesystemWarningOp

Options for how to handle errors that occur in functions that manipulate the filesystem.

Enumerator
FSWO_LOG_WARNINGS 

Errors that occur during filesystem manipulation should be logged as warnings using ignwarn. (Recommended)

FSWO_SUPPRESS_WARNINGS 

Errors that occur during filesystem manipulation should not be logged. The user will be responsible for checking the system's error flags.

Function Documentation

◆ Convert() [1/33]

ignition::math::Vector3d ignition::msgs::Convert ( const msgs::Vector3d _v)

Convert a msgs::Vector3d to an ignition::math::Vector.

Parameters
[in]_vThe vector to convert
Returns
An ignition::math::Vector3d object

◆ Convert() [2/33]

ignition::math::Vector2d ignition::msgs::Convert ( const msgs::Vector2d _v)

Convert a msgs::Vector2d to an ignition::math::Vector2d.

Parameters
[in]_vThe vector2 to convert
Returns
An ignition::math::Vector2d object

◆ Convert() [3/33]

ignition::math::Quaterniond ignition::msgs::Convert ( const msgs::Quaternion &  _q)

Convert a msgs::Quaternion to an ignition::math::Quaterniond.

Parameters
[in]_qThe quaternion to convert
Returns
An ignition::math::Quaterniond object

◆ Convert() [4/33]

ignition::math::Pose3d ignition::msgs::Convert ( const msgs::Pose &  _p)

Convert a msgs::Pose to an ignition::math::Pose3d.

Parameters
[in]_pThe pose to convert
Returns
An ignition::math::Pose3d object

◆ Convert() [5/33]

math::Color ignition::msgs::Convert ( const msgs::Color &  _c)

Convert a msgs::Color to a math::Color.

Parameters
[in]_cThe color to convert
Returns
A math::Color object

◆ Convert() [6/33]

ignition::math::Planed ignition::msgs::Convert ( const msgs::PlaneGeom &  _p)

Convert a msgs::PlaneGeom to an ignition::math::Planed.

Parameters
[in]_pThe plane to convert
Returns
An ignition::math::Planed object

◆ Convert() [7/33]

math::Inertiald ignition::msgs::Convert ( const msgs::Inertial &  _i)

Convert a msgs::Inertial to an ignition::math::Inertiald.

Parameters
[in]_iThe inertial to convert
Returns
An ignition::math::Inertiald object

◆ Convert() [8/33]

math::AxisAlignedBox ignition::msgs::Convert ( const msgs::AxisAlignedBox &  _b)

Convert a msgs::AxisAlignedBox to an ignition::math::AxisAlignedBox.

Parameters
[in]_bThe axis aligned box to convert
Returns
An ignition::math::AxisAlignedBox object

◆ Convert() [9/33]

msgs::AxisAlignedBox ignition::msgs::Convert ( const math::AxisAlignedBox _b)

Convert ignition::math::AxisAlignedBox to msgs::AxisAlignedBox.

Parameters
[in]_bThe axis aligned box to convert
Returns
An ignition::math::AxisAlignedBox object

◆ Convert() [10/33]

std::string ignition::msgs::Convert ( const msgs::StringMsg &  _m)

Convert a msgs::StringMsg to an std::string.

Parameters
[in]_mThe message to convert
Returns
An std::string object

◆ Convert() [11/33]

bool ignition::msgs::Convert ( const msgs::Boolean &  _m)

Convert a msgs::Boolean to a bool.

Parameters
[in]_mThe message to convert
Returns
An bool object

◆ Convert() [12/33]

int32_t ignition::msgs::Convert ( const msgs::Int32 &  _m)

Convert a msgs::Int32 to an int32_t.

Parameters
[in]_mThe message to convert
Returns
An int32_t object

◆ Convert() [13/33]

uint32_t ignition::msgs::Convert ( const msgs::UInt32 &  _m)

Convert a msgs::UInt32 to a uint32_t.

Parameters
[in]_mThe message to convert
Returns
An uint32_t object

◆ Convert() [14/33]

int64_t ignition::msgs::Convert ( const msgs::Int64 &  _m)

Convert a msgs::Int64 to an int64_t.

Parameters
[in]_mThe message to convert
Returns
An int64_t object

◆ Convert() [15/33]

uint64_t ignition::msgs::Convert ( const msgs::UInt64 &  _m)

Convert a msgs::UInt64 to a uint64_t.

Parameters
[in]_mThe message to convert
Returns
An uint64_t object

◆ Convert() [16/33]

double ignition::msgs::Convert ( const msgs::Double &  _m)

Convert a msgs::Double to a double.

Parameters
[in]_mThe message to convert
Returns
An double object

◆ Convert() [17/33]

float ignition::msgs::Convert ( const msgs::Float &  _m)

Convert a msgs::Float to a float.

Parameters
[in]_mThe message to convert
Returns
An float object

◆ Convert() [18/33]

msgs::Vector3d ignition::msgs::Convert ( const ignition::math::Vector3d _v)

Convert a ignition::math::Vector3d to a msgs::Vector3d.

Parameters
[in]_vThe vector to convert
Returns
A msgs::Vector3d object

◆ Convert() [19/33]

msgs::Vector2d ignition::msgs::Convert ( const ignition::math::Vector2d _v)

Convert a ignition::math::Vector2d to a msgs::Vector2d.

Parameters
[in]_vThe vector to convert
Returns
A msgs::Vector2d object

◆ Convert() [20/33]

msgs::Quaternion ignition::msgs::Convert ( const ignition::math::Quaterniond _q)

Convert a ignition::math::Quaterniond to a msgs::Quaternion.

Parameters
[in]_qThe quaternion to convert
Returns
A msgs::Quaternion object

◆ Convert() [21/33]

msgs::Pose ignition::msgs::Convert ( const ignition::math::Pose3d _p)

Convert a ignition::math::Pose3d to a msgs::Pose.

Parameters
[in]_pThe pose to convert
Returns
A msgs::Pose object

◆ Convert() [22/33]

msgs::Color ignition::msgs::Convert ( const math::Color _c)

Convert a math::Color to a msgs::Color.

Parameters
[in]_cThe color to convert
Returns
A msgs::Color object

◆ Convert() [23/33]

msgs::Inertial ignition::msgs::Convert ( const math::Inertiald _i)

Convert an math::Inertiald to a msgs::Inertial.

Parameters
[in]_iThe Inertiald to convert
Returns
A msgs::Inertial object

◆ Convert() [24/33]

msgs::Inertial ignition::msgs::Convert ( const math::MassMatrix3d _m)

Convert an math::MassMatrix3d to a msgs::Inertial.

Parameters
[in]_mThe MassMatrix3d to convert
Returns
A msgs::Inertial object

◆ Convert() [25/33]

msgs::PlaneGeom ignition::msgs::Convert ( const ignition::math::Planed _p)

Convert a ignition::math::Planed to a msgs::PlaneGeom.

Parameters
[in]_pThe plane to convert
Returns
A msgs::PlaneGeom object

◆ Convert() [26/33]

msgs::StringMsg ignition::msgs::Convert ( const std::string _s)

Convert an std::string to a msgs::StringMsg.

Parameters
[in]_sThe string to convert
Returns
A msgs::StringMsg object

◆ Convert() [27/33]

msgs::Boolean ignition::msgs::Convert ( const bool &  _b)

Convert a bool to a msgs::Boolean.

Parameters
[in]_bThe bool to convert
Returns
A msgs::Boolean object

◆ Convert() [28/33]

msgs::Int32 ignition::msgs::Convert ( const int32_t &  _i)

Convert an int32_t to a msgs::Int32.

Parameters
[in]_iThe int32_t to convert
Returns
A msgs::Int32 object

◆ Convert() [29/33]

msgs::UInt32 ignition::msgs::Convert ( const uint32_t &  _u)

Convert a uint32_t to a msgs::UInt32.

Parameters
[in]_uThe uint32_t to convert
Returns
A msgs::UInt32 object

◆ Convert() [30/33]

msgs::Int64 ignition::msgs::Convert ( const int64_t &  _i)

Convert an int64_t to a msgs::Int64.

Parameters
[in]_iThe int64_t to convert
Returns
A msgs::Int64 object

◆ Convert() [31/33]

msgs::UInt64 ignition::msgs::Convert ( const uint64_t &  _u)

Convert a uint64_t to a msgs::UInt64.

Parameters
[in]_uThe uint64_t to convert
Returns
A msgs::UInt64 object

◆ Convert() [32/33]

msgs::Double ignition::msgs::Convert ( const double &  _d)

Convert a double to a msgs::Double.

Parameters
[in]_dThe double to convert
Returns
A msgs::Double object

◆ Convert() [33/33]

msgs::Float ignition::msgs::Convert ( const float &  _f)

Convert a float to a msgs::Float.

Parameters
[in]_fThe float to convert
Returns
A msgs::Float object

◆ ConvertGeometryType() [1/2]

msgs::Geometry::Type ignition::msgs::ConvertGeometryType ( const std::string _str)

Convert a string to a msgs::Geometry::Type enum.

Parameters
[in]_strGeometry type string.
Returns
A msgs::Geometry::Type enum.

◆ ConvertGeometryType() [2/2]

std::string ignition::msgs::ConvertGeometryType ( const msgs::Geometry::Type  _type)

Convert a msgs::Geometry::Type to a string.

Parameters
[in]_typeA msgs::Geometry::Type enum.
Returns
Geometry type string.

◆ ConvertJointType() [1/2]

msgs::Joint::Type ignition::msgs::ConvertJointType ( const std::string _str)

Convert a string to a msgs::Joint::Type enum.

Parameters
[in]_strJoint type string.
Returns
A msgs::Joint::Type enum. Defaults to REVOLUTE if _str is unrecognized.

◆ ConvertJointType() [2/2]

std::string ignition::msgs::ConvertJointType ( const msgs::Joint::Type &  _type)

Convert a msgs::Joint::Type to a string.

Parameters
[in]_typeA msgs::Joint::Type enum.
Returns
Joint type string. Returns "unknown" if _type is unrecognized.

◆ ConvertShaderType() [1/2]

msgs::Material::ShaderType ignition::msgs::ConvertShaderType ( const std::string _str)

Convert a string to a msgs::Material::ShaderType enum.

Parameters
[in]_strShader type string.
Returns
A msgs::Material::ShaderType enum. Defaults to VERTEX if _str is unrecognized.

◆ ConvertShaderType() [2/2]

std::string ignition::msgs::ConvertShaderType ( const msgs::Material::ShaderType &  _type)

Convert a msgs::ShaderType to a string.

Parameters
[in]_typeA msgs::ShaderType enum.
Returns
Shader type string. Returns "unknown" if _type is unrecognized.

◆ InitPointCloudPacked()

void ignition::msgs::InitPointCloudPacked ( msgs::PointCloudPacked &  _msg,
const std::string _frameId,
bool  _memoryAligned,
const std::vector< std::pair< std::string, msgs::PointCloudPacked::Field::DataType >> &  _fields 
)

This function will set the header and field members of a PointCloudPacked message. This will clear existing values in the PointCloudPacked field and header.

Parameters
[out]_msgThe message to initialize.
[in]_frameIdName of the "frame_id". This will be stored as key = "frame_id", value = _frameId in the message header.
[in]_memoryAlignedIf true, then each pair in the _fields vector will be aligned at word (sizeof(size_t)) boundaries. Additionally, the point_step of the _msg will be set to the nearest word boundary.
[in]_fieldsThe fields to add to the message. The following strings are reserved, and will generate a set of fields automatically.
  • "xyz" : This will add the "x", "y", and "z" fields.

◆ Set() [1/17]

void ignition::msgs::Set ( msgs::Vector3d _pt,
const ignition::math::Vector3d _v 
)

Set a msgs::Vector3d from an ignition::math::Vector3d.

Parameters
[out]_ptA msgs::Vector3d pointer
[in]_vAn ignition::math::Vector3d reference

◆ Set() [2/17]

void ignition::msgs::Set ( msgs::Vector2d _pt,
const ignition::math::Vector2d _v 
)

Set a msgs::Vector2d from an ignition::math::Vector2d.

Parameters
[out]_ptA msgs::Vector2d pointer
[in]_vAn ignition::math::Vector2d reference

◆ Set() [3/17]

void ignition::msgs::Set ( msgs::Quaternion *  _q,
const ignition::math::Quaterniond _v 
)

Set a msgs::Quaternion from an ignition::math::Quaterniond.

Parameters
[out]_qA msgs::Quaternion pointer
[in]_vAn ignition::math::Quaterniond reference

◆ Set() [4/17]

void ignition::msgs::Set ( msgs::Pose *  _p,
const ignition::math::Pose3d _v 
)

Set a msgs::Pose from an ignition::math::Pose3d.

Parameters
[out]_pA msgs::Pose pointer
[in]_vAn ignition::math::Pose3d reference

◆ Set() [5/17]

void ignition::msgs::Set ( msgs::Color *  _c,
const math::Color _v 
)

Set a msgs::Color from a math::Color.

Parameters
[out]_cA msgs::Color pointer
[in]_vA math::Color reference

◆ Set() [6/17]

void ignition::msgs::Set ( msgs::Inertial *  _i,
const math::Inertiald _m 
)

Set a msgs::Inertial from an math::Inertiald.

Parameters
[out]_iA msgs::Inertial pointer
[in]_mAn math::Inertiald reference

◆ Set() [7/17]

void ignition::msgs::Set ( msgs::Inertial *  _i,
const math::MassMatrix3d _m 
)

Set a msgs::Inertial from an math::MassMatrix3d.

Parameters
[out]_iA msgs::Inertial pointer
[in]_mAn math::MassMatrix3d reference

◆ Set() [8/17]

void ignition::msgs::Set ( msgs::PlaneGeom *  _p,
const ignition::math::Planed _v 
)

Set a msgs::Plane from an ignition::math::Planed.

Parameters
[out]_pA msgs::Plane pointer
[in]_vAn ignition::math::Planed reference

◆ Set() [9/17]

void ignition::msgs::Set ( msgs::StringMsg *  _p,
const std::string _v 
)

Set a msgs::StringMsg from an std::string.

Parameters
[out]_pA msgs::StringMsg pointer
[in]_vAn std::string reference

◆ Set() [10/17]

void ignition::msgs::Set ( msgs::Boolean *  _p,
const bool &  _v 
)

Set a msgs::Boolean from a bool.

Parameters
[out]_pA msgs::Boolean pointer
[in]_vAn bool reference

◆ Set() [11/17]

void ignition::msgs::Set ( msgs::Int32 *  _p,
const int32_t &  _v 
)

Set a msgs::Int32 from an int32_t.

Parameters
[out]_pA msgs::Int32 pointer
[in]_vAn int32_t reference

◆ Set() [12/17]

void ignition::msgs::Set ( msgs::UInt32 *  _p,
const uint32_t &  _v 
)

Set a msgs::UInt32 from a uint32_t.

Parameters
[out]_pA msgs::UInt32 pointer
[in]_vAn uint32_t reference

◆ Set() [13/17]

void ignition::msgs::Set ( msgs::Int64 *  _p,
const int64_t &  _v 
)

Set a msgs::Int64 from an int64_t.

Parameters
[out]_pA msgs::Int64 pointer
[in]_vAn int64_t reference

◆ Set() [14/17]

void ignition::msgs::Set ( msgs::UInt64 *  _p,
const uint64_t &  _v 
)

Set a msgs::UInt64 from an uint64_t.

Parameters
[out]_pA msgs::UInt64 pointer
[in]_vAn uint64_t reference

◆ Set() [15/17]

void ignition::msgs::Set ( msgs::Double *  _p,
const double &  _v 
)

Set a msgs::Double from a double.

Parameters
[out]_pA msgs::Double pointer
[in]_vAn double reference

◆ Set() [16/17]

void ignition::msgs::Set ( msgs::Float *  _p,
const float &  _v 
)

Set a msgs::Float from a float.

Parameters
[out]_pA msgs::Float pointer
[in]_vAn float reference

◆ Set() [17/17]

void ignition::msgs::Set ( msgs::AxisAlignedBox *  _b,
const math::AxisAlignedBox _v 
)

Set a msgs::AxisAlignedBox from a math::AxisAlignedBox.

Parameters
[out]_bA msgs::AxisAlignedBox pointer
[in]_vAn math::AxisAlignedBox reference