Ignition Msgs

API Reference

8.1.0
Utility.hh File Reference

Utility functions that support conversion between message type and ignition math types. More...

#include <string>
#include <utility>
#include <vector>
#include <ignition/math/AxisAlignedBox.hh>
#include <ignition/math/Color.hh>
#include <ignition/math/Inertial.hh>
#include <ignition/math/Pose3.hh>
#include <ignition/math/Plane.hh>
#include <ignition/math/SphericalCoordinates.hh>
#include <ignition/math/Vector3.hh>
#include "ignition/msgs/config.hh"
#include "ignition/msgs/Export.hh"
#include "ignition/msgs/MessageTypes.hh"

Go to the source code of this file.

Namespaces

 ignition
 
 ignition::msgs
 

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::SphericalCoordinates Convert (const msgs::SphericalCoordinates &_coord)
 Convert a msgs::SphericalCoordinates to an ignition::math::SphericalCoordinates. 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...
 
std::chrono::steady_clock::duration Convert (const msgs::Time &_time)
 Convert a msgs::Time to a std::chrono::steady_clock::duration. 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::SphericalCoordinates Convert (const math::SphericalCoordinates &_coord)
 Convert an math::SphericalCoordinates to a msgs::SphericalCoordinates. 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::Time Convert (const std::chrono::steady_clock::duration &_time_point)
 Convert a std::chrono::steady_clock::duration to a msgs::Time. More...
 
bool ConvertFuelMetadata (const std::string &_modelConfigStr, msgs::FuelMetadata &_meta)
 Convert the contents of a model.config file, in the form of an XML string, to a FuelMetadata message. More...
 
bool ConvertFuelMetadata (const msgs::FuelMetadata &_meta, std::string &_modelConfigStr)
 Convert a FuelMetadata message to a string containing XML data that matches the model.config format. 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::PixelFormatType ConvertPixelFormatType (const std::string &_str)
 Convert a string to a msgs::PixelFormatType enum. More...
 
std::string ConvertPixelFormatType (const msgs::PixelFormatType &_t)
 Convert a PixelFormatType to a string. This can be used for debugging purposes. 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::SphericalCoordinates *_sc, const math::SphericalCoordinates &_m)
 Set a msgs::SphericalCoordinates from a math::SphericalCoordinates. 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...
 
std::string ToString (const msgs::Discovery::Type &_t)
 Convert a Discovery::Type to a string. This can be used for debugging purposes. More...
 

Detailed Description

Utility functions that support conversion between message type and ignition math types.