gz/msgs/Utility.hh File Reference
Utility functions that support conversion between message type and Gazebo Math types. More...
#include <string>
#include <utility>
#include <vector>
#include <gz/math/AxisAlignedBox.hh>
#include <gz/math/Color.hh>
#include <gz/math/Inertial.hh>
#include <gz/math/Pose3.hh>
#include <gz/math/Plane.hh>
#include <gz/math/SphericalCoordinates.hh>
#include <gz/math/Vector3.hh>
#include "gz/msgs/config.hh"
#include "gz/msgs/Export.hh"
#include "gz/msgs/MessageTypes.hh"
Go to the source code of this file.
Namespaces | |
gz | |
gz::msgs | |
Functions | |
msgs::Boolean | Convert (const bool &_b) |
Convert a bool to a msgs::Boolean. 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::PlaneGeom | Convert (const gz::math::Planed &_p) |
Convert a gz::math::Planed to a msgs::PlaneGeom. More... | |
msgs::Pose | Convert (const gz::math::Pose3d &_p) |
Convert a gz::math::Pose3d to a msgs::Pose. More... | |
msgs::Quaternion | Convert (const gz::math::Quaterniond &_q) |
Convert a gz::math::Quaterniond to a msgs::Quaternion. More... | |
msgs::Vector2d | Convert (const gz::math::Vector2d &_v) |
Convert a gz::math::Vector2d to a msgs::Vector2d. More... | |
msgs::Vector3d | Convert (const gz::math::Vector3d &_v) |
Convert a gz::math::Vector3d to a msgs::Vector3d. More... | |
msgs::Int32 | Convert (const int32_t &_i) |
Convert an int32_t to a msgs::Int32. More... | |
msgs::Int64 | Convert (const int64_t &_i) |
Convert an int64_t to a msgs::Int64. More... | |
msgs::AxisAlignedBox | Convert (const math::AxisAlignedBox &_b) |
Convert gz::math::AxisAlignedBox to msgs::AxisAlignedBox. 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... | |
math::AxisAlignedBox | Convert (const msgs::AxisAlignedBox &_b) |
Convert a msgs::AxisAlignedBox to an gz::math::AxisAlignedBox. More... | |
bool | Convert (const msgs::Boolean &_m) |
Convert a msgs::Boolean to a bool. More... | |
math::Color | Convert (const msgs::Color &_c) |
Convert a msgs::Color to a math::Color. 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... | |
math::Inertiald | Convert (const msgs::Inertial &_i) |
Convert a msgs::Inertial to a gz::math::Inertiald. More... | |
int32_t | Convert (const msgs::Int32 &_m) |
Convert a msgs::Int32 to an int32_t. More... | |
int64_t | Convert (const msgs::Int64 &_m) |
Convert a msgs::Int64 to an int64_t. More... | |
gz::math::Planed | Convert (const msgs::PlaneGeom &_p) |
Convert a msgs::PlaneGeom to a gz::math::Planed. More... | |
gz::math::Pose3d | Convert (const msgs::Pose &_p) |
Convert a msgs::Pose to a gz::math::Pose3d. More... | |
gz::math::Quaterniond | Convert (const msgs::Quaternion &_q) |
Convert a msgs::Quaternion to a gz::math::Quaterniond. More... | |
math::SphericalCoordinates | Convert (const msgs::SphericalCoordinates &_coord) |
Convert a msgs::SphericalCoordinates to an gz::math::SphericalCoordinates. More... | |
math::SphericalCoordinates::CoordinateType | Convert (const msgs::SphericalCoordinatesType &_sc) |
Convert a msgs::SphericalCoordinatesType to an gz::math::SphericalCoordinates::CoordinateTpye. More... | |
std::string | Convert (const msgs::StringMsg &_m) |
Convert a msgs::StringMsg to an std::string. More... | |
std::chrono::steady_clock::duration | Convert (const msgs::Time &_time) |
Convert a msgs::Time to a std::chrono::steady_clock::duration. More... | |
uint32_t | Convert (const msgs::UInt32 &_m) |
Convert a msgs::UInt32 to a uint32_t. More... | |
uint64_t | Convert (const msgs::UInt64 &_m) |
Convert a msgs::UInt64 to a uint64_t. More... | |
gz::math::Vector2d | Convert (const msgs::Vector2d &_v) |
Convert a msgs::Vector2d to a gz::math::Vector2d. More... | |
gz::math::Vector3d | Convert (const msgs::Vector3d &_v) |
Convert a msgs::Vector3d to a gz::math::Vector. More... | |
msgs::Time | Convert (const std::chrono::steady_clock::duration &_time_point) |
Convert a std::chrono::steady_clock::duration to a msgs::Time. More... | |
msgs::StringMsg | Convert (const std::string &_s) |
Convert an std::string to a msgs::StringMsg. More... | |
msgs::UInt32 | Convert (const uint32_t &_u) |
Convert a uint32_t to a msgs::UInt32. More... | |
msgs::UInt64 | Convert (const uint64_t &_u) |
Convert a uint64_t to a msgs::UInt64. More... | |
msgs::SphericalCoordinatesType | ConvertCoord (const math::SphericalCoordinates::CoordinateType &_coord) |
Convert a gz::math::SphericalCoordinates::CoordinateType to a msgs::SphericalCoordinatesType. 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... | |
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... | |
std::string | ConvertGeometryType (const msgs::Geometry::Type _type) |
Convert a msgs::Geometry::Type to a string. More... | |
msgs::Geometry::Type | ConvertGeometryType (const std::string &_str) |
Convert a string to a msgs::Geometry::Type enum. More... | |
std::string | ConvertJointType (const msgs::Joint::Type &_type) |
Convert a msgs::Joint::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 | ConvertPixelFormatType (const msgs::PixelFormatType &_t) |
Convert a PixelFormatType to a string. This can be used for debugging purposes. More... | |
msgs::PixelFormatType | ConvertPixelFormatType (const std::string &_str) |
Convert a string to a msgs::PixelFormatType enum. More... | |
std::string | ConvertShaderType (const msgs::Material::ShaderType &_type) |
Convert a msgs::ShaderType to a string. More... | |
msgs::Material::ShaderType | ConvertShaderType (const std::string &_str) |
Convert a string to a msgs::Material::ShaderType enum. 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::AxisAlignedBox *_b, const math::AxisAlignedBox &_v) |
Set a msgs::AxisAlignedBox from a math::AxisAlignedBox. More... | |
void | Set (msgs::Boolean *_p, const bool &_v) |
Set a msgs::Boolean from a bool. More... | |
void | Set (msgs::Color *_c, const math::Color &_v) |
Set a msgs::Color from a math::Color. 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::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::Int32 *_p, const int32_t &_v) |
Set a msgs::Int32 from an int32_t. More... | |
void | Set (msgs::Int64 *_p, const int64_t &_v) |
Set a msgs::Int64 from an int64_t. More... | |
void | Set (msgs::PlaneGeom *_p, const gz::math::Planed &_v) |
Set a msgs::Plane from a gz::math::Planed. More... | |
void | Set (msgs::Pose *_p, const gz::math::Pose3d &_v) |
Set a msgs::Pose from a gz::math::Pose3d. More... | |
void | Set (msgs::Quaternion *_q, const gz::math::Quaterniond &_v) |
Set a msgs::Quaternion from a gz::math::Quaterniond. More... | |
void | Set (msgs::SphericalCoordinates *_sc, const math::SphericalCoordinates &_m) |
Set a msgs::SphericalCoordinates from a math::SphericalCoordinates. More... | |
void | Set (msgs::StringMsg *_p, const std::string &_v) |
Set a msgs::StringMsg from an std::string. More... | |
void | Set (msgs::UInt32 *_p, const uint32_t &_v) |
Set a msgs::UInt32 from a uint32_t. More... | |
void | Set (msgs::UInt64 *_p, const uint64_t &_v) |
Set a msgs::UInt64 from an uint64_t. More... | |
void | Set (msgs::Vector2d *_pt, const gz::math::Vector2d &_v) |
Set a msgs::Vector2d from a gz::math::Vector2d. More... | |
void | Set (msgs::Vector3d *_pt, const gz::math::Vector3d &_v) |
Set a msgs::Vector3d from a gz::math::Vector3d. 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 Gazebo Math types.