##

Common

Classes and functions used by multiple modules. More...

## Files

file | CommonTypes.hh

## Namespaces

| gazebo::common
| Common namespace.

## Classes

class | Animation
| Manages an animation, which is a collection of keyframes and the ability to interpolate between the keyframes. More...
class | AssertionInternalError
| Class for generating Exceptions which come from gazebo assertions. They include information about the assertion expression violated, function where problem appeared and assertion debug message. More...
class | AudioDecoder
| An audio decoder based on FFMPEG. More...
class | Battery
| A battery abstraction. More...
class | BVHLoader
| Handles loading BVH animation files. More...
class | ColladaExporter
| Class used to export Collada mesh files. More...
class | ColladaLoader
| Class used to load Collada mesh files. More...
class | Color
| Defines a color. More...
class | Console
| Container for loggers, and global logging options (such as verbose vs. quiet output). More...
class | DEM
| Encapsulates a DEM (Digital Elevation Model) file. More...
class | Dem
class | Exception
| Class for generating exceptions. More...
class | FileLogger
| A logger that outputs messages to a file. More...
class | FuelModelDatabase
| Connects to an Igniiton Fuel model database, and has utility functions to find models. More...
class | GTSMeshUtils
| Creates GTS utilities for meshes. More...
class | HeightmapData
| Encapsulates a generic heightmap data file. More...
class | HeightmapDataLoader
| Helper class for loading heightmap data. More...
class | Image
| Encapsulates an image. More...
class | ImageHeightmap
| Encapsulates an image that will be interpreted as a heightmap. More...
class | InternalError
| Class for generating Internal Gazebo Errors: those errors which should never happend and represent programming bugs. More...
class | KeyEvent
| Generic description of a keyboard event. More...
class | KeyFrame
| A key frame in an animation. More...
class | Logger
| Terminal logger. More...
class | Material
| Encapsulates description of a material. More...
class | Mesh
| A 3D mesh. More...
class | MeshCSG
| Creates CSG meshes. More...
class | MeshExporter
| Base class for exporting meshes. More...
class | MeshLoader
| Base class for loading meshes. More...
class | MeshManager
| Maintains and manages all meshes. More...
class | ModelDatabase
| Connects to model database, and has utility functions to find models. More...
class | ModelPlugin
| A plugin with access to physics::Model. More...
class | MouseEvent
| Generic description of a mouse event. More...
class | MovingWindowFilter< T >
| Base class for MovingWindowFilter. More...
class | NodeAnimation
| Node animation. More...
class | NodeAssignment
| Vertex to node weighted assignement for skeleton animation visualization. More...
class | NodeTransform
| \clas NodeTransform Skeleton.hh common/common.hh More...
class | NumericAnimation
| A numeric animation. More...
class | NumericKeyFrame
| A keyframe for a NumericAnimation. More...
class | OBJLoader
| Class used to load obj mesh files. More...
class | PID
| Generic PID controller class. Generic proportiolnal-integral-derivative controller class that keeps track of PID-error states and control inputs given the state of a system and a user specified target state. More...
class | PluginT< T >
| A class which all plugins must inherit from. More...
class | PoseAnimation
| A pose animation. More...
class | PoseKeyFrame
| A keyframe for a PoseAnimation. More...
class | SemanticVersion
| Version comparison class based on Semantic Versioning 2.0.0 http://semver.org/ Compares versions and converts versions from string. More...
class | SensorPlugin
| A plugin with access to physics::Sensor. See reference. More...
class | SingletonT< T >
| Singleton template class. More...
class | Skeleton
| A skeleton. More...
class | SkeletonAnimation
| Skeleton animation. More...
class | SkeletonNode
| A skeleton node. More...
class | SphericalCoordinates
| Convert spherical coordinates for planetary surfaces. More...
class | STLLoader
| Class used to load STL mesh files. More...
class | SubMesh
| A child mesh. More...
class | SystemPaths
| Functions to handle getting system paths, keeps track of: More...
class | SystemPlugin
| A plugin loaded within the gzserver on startup. More...
class | Time
| A Time class, can be used to hold wall- or sim-time. stored as sec and nano-sec. More...
class | Timer
| A timer class, used to time things in real world walltime. More...
class | Video
| Handle video encoding and decoding using libavcodec. More...
class | VideoEncoder
| The VideoEncoder class supports encoding a series of images to a video format, and then writing the video to disk. More...
class | VisualPlugin
| A plugin with access to rendering::Visual. More...
class | WorldPlugin
| A plugin with access to physics::World. See reference. More...

## Macros

#define | GZ_SINGLETON_DECLARE(visibility, n1, n2, singletonType)
| Helper to declare typed SingletonT. More...
#define | gzdbg (gazebo::common::Console::dbg(__FILE__, __LINE__))
| Output a debug message. More...
#define | gzerr (gazebo::common::Console::err(__FILE__, __LINE__))
| Output an error message. More...
#define | gzlog (gazebo::common::Console::log())
| Output a message to a log file. More...
#define | gzLogDirectory() (gazebo::common::Console::log.GetLogDirectory())
| Get the full path of the directory where the log files are stored. More...
#define | gzLogInit(_prefix, _str) (gazebo::common::Console::log.Init(_prefix, _str))
| Initialize log file with filename given by _str. More...
#define | gzmsg (gazebo::common::Console::msg())
| Output a message. More...
#define | gzthrow(msg)
| This macro logs an error to the throw stream and throws an exception that contains the file name and line number. More...
#define | gzwarn (gazebo::common::Console::warn(__FILE__, __LINE__))
| Output a warning message. More...

## Enumerations

enum | PluginType { WORLD_PLUGIN, MODEL_PLUGIN, SENSOR_PLUGIN, SYSTEM_PLUGIN, VISUAL_PLUGIN, GUI_PLUGIN }
| Used to specify the type of plugin. More...

## Functions

| MovingWindowFilter ()
| Constructor. More...
| SemanticVersion ()
| Default constructor. More...
| SemanticVersion (const SemanticVersion &_copy)
| Copy constructor. More...
| SemanticVersion (const std::string &_v)
| Constructor. More...
| SemanticVersion (const unsigned int _major, const unsigned int _minor=0, const unsigned int _patch=0, const std::string &_prerelease="", const std::string &_build="")
| Constructor. More...
virtual | ~MovingWindowFilter ()
| Destructor. More...
| ~SemanticVersion ()
| Destructor. More...
std::string | absPath (const std::string &_path)
| Get the absolute path of a provided path. More...
void | add_search_path_suffix (const std::string &_suffix)
| add path sufix to common::SystemPaths More...
std::string | Build () const
| Get the build metadata string. More...
std::string | CachedFilePath (const std::string &_uri)
| Get the full local path to a cached file based on its URI. More...
bool | copyDir (const boost::filesystem::path &_source, const boost::filesystem::path &_destination)
| Copy a directory, overwrite the destination directory if exists. More...
bool | copyFile (const std::string &_existingFilename, const std::string &_newFilename)
| Copy a file. More...
std::string | cwd ()
| Get the current working directory. More...
static bool | DelaunayTriangulation (const std::vector< ignition::math::Vector2d > &_vertices, const std::vector< ignition::math::Vector2i > &_edges, SubMesh *_submesh)
| Perform delaunay triangulation on input vertices. More...
void | DownloadDependencies (const std::string &_path)
| Download all dependencies for a give model path. More...
bool | exists (const std::string &_path)
| Returns true if _path is a file or directory. More...
std::string | find_file (const std::string &_file)
| search for file in common::SystemPaths More...
std::string | find_file (const std::string &_file, bool _searchLocalPath)
| search for file in common::SystemPaths More...
std::string | find_file_path (const std::string &_file)
| search for a file in common::SystemPaths More...
void | Fini ()
| Finalize the model database. More...
T | Get ()
| Get filtered result. More...
template<typename T >
std::string | get_sha1 (const T &_buffer)
| Compute the SHA1 hash of an array of bytes. More...
std::string | GetDBConfig (const std::string &_uri)
| Return the database.config file as a string. More...
const char * | getEnv (const char *_name)
| Cross platform retrieval of an environment variable. More...
std::string | GetModelConfig (const std::string &_uri)
| Return the model.config file as a string. More...
std::string | GetModelFile (const std::string &_uri)
| Get a model's SDF file based on a URI. More...
std::string | GetModelName (const std::string &_uri)
| Get the name of a model based on a URI. More...
std::string | GetModelPath (const std::string &_uri, bool _forceDownload=false)
| Get the local path to a model. More...
std::map< std::string, std::string > | GetModels ()
| Returns the dictionary of all the model names. More...
event::ConnectionPtr | GetModels (boost::function< void(const std::map< std::string, std::string > &)> _func)
| Get the dictionary of all model names via a callback. More...
std::string | GetURI ()
| Returns the the global model database URI. More...
bool | GetWindowFilled () const
| Get whether the window has been filled. More...
unsigned int | GetWindowSize () const
| Get the window size. More...
bool | HasModel (const std::string &_modelName)
| Returns true if the model exists on the database. More...
bool | isDirectory (const std::string &_path)
| Check if the given path is a directory. More...
bool | isFile (const std::string &_path)
| Check if the given path is a file. More...
void | load ()
| Load the common library. More...
unsigned int | Major () const
| Get the major number. More...
unsigned int | Minor () const
| Get the minor number. More...
std::string | ModelFile (const std::string &_uri)
| Get a model's SDF file based on a URI. More...
std::string | ModelPath (const std::string &_uri, const bool _forceDownload=false)
| Get the local path to a model. More...
virtual std::vector< ignition::fuel_tools::ModelIdentifier > | Models (const ignition::fuel_tools::ServerConfig &_server) const
| Get the list of all models. More...
virtual void | Models (const ignition::fuel_tools::ServerConfig &_server, std::function< void(const std::vector< ignition::fuel_tools::ModelIdentifier > &)> &_func)
| Get the list of all models via a callback. More...
bool | moveFile (const std::string &_existingFilename, const std::string &_newFilename)
| Move a file. More...
bool | operator!= (const SemanticVersion &_other) const
| Inequality comparison operator. More...
bool | operator< (const SemanticVersion &_other) const
| Less than comparison operator. More...
bool | operator<= (const SemanticVersion &_other) const
| Less than or equal comparison operator. More...
SemanticVersion & | operator= (const SemanticVersion &_other)
| Assignment operator. More...
bool | operator== (const SemanticVersion &_other) const
| Equality comparison operator. More...
bool | operator> (const SemanticVersion &_other) const
| Greater than comparison operator. More...
bool | operator>= (const SemanticVersion &_other) const
| Greater than or equal comparison operator. More...
bool | Parse (const std::string &_versionStr)
| Parse a version string and set the major, minor, patch numbers, and prerelease and build strings. More...
unsigned int | Patch () const
| Get the patch number. More...
std::string | Prerelease () const
| Get the prerelease string. More...
std::string | replaceAll (const std::string &_orig, const std::string &_key, const std::string &_replacement)
| Replace all occurances of _key with _replacement. More...
void | replaceAll (std::string &_result, const std::string &_orig, const std::string &_key, const std::string &_replacement)
| Replace all occurances of _key with _replacement. More...
std::vector< ignition::fuel_tools::ServerConfig > | Servers () const
| Get all the Ignition Fuel servers. More...
void | SetWindowSize (unsigned int _n)
| Set window size. More...
std::vector< std::string > | split (const std::string &_str, const std::string &_delim)
| Splits a string into tokens. More...
void | Start (bool _fetchImmediately=false)
| Start the model database. More...
std::string | unique_file_path (const std::string &_pathAndName, const std::string &_extension)
| Generates a path for a file which doesn't collide with existing files, by appending numbers to it (i.e. More...
void | Update (T _val)
| Update value of filter. More...
std::string | Version () const
| Returns the version as a string. More...

## Variables

static std::string | PixelFormatNames []
| String names for the pixel formats. More...

## Friends

std::ostream & | operator<< (std::ostream &_out, const SemanticVersion &_v)
| Stream insertion operator. More...

## Detailed Description

Classes and functions used by multiple modules.

## Macro Definition Documentation

## GZ_SINGLETON_DECLARE

#define GZ_SINGLETON_DECLARE | ( |  | visibility,
|  |  | n1,
|  |  | n2,
|  |  | singletonType
| ) |  |

Value:
namespace n1 \
{ \
namespace n2 \
{ \
class singletonType; \
} \
} \
template class visibility ::SingletonT<n1::n2::singletonType>;

Helper to declare typed SingletonT.

## gzdbg

#define gzdbg (gazebo::common::Console::dbg(__FILE__, __LINE__))

Output a debug message.

## gzerr

#define gzerr (gazebo::common::Console::err(__FILE__, __LINE__))

Output an error message.

## gzlog

#define gzlog (gazebo::common::Console::log())

Output a message to a log file.

## gzLogDirectory

#define gzLogDirectory | ( |  | ) | (gazebo::common::Console::log.GetLogDirectory())

Get the full path of the directory where the log files are stored.

Returns
  Full path of the directory

## gzLogInit

#define gzLogInit | ( |  | _prefix,
|  |  | _str
| ) |  | (gazebo::common::Console::log.Init(_prefix, _str))

Initialize log file with filename given by _str.

If called twice, it will close currently in use and open a new log file.

Parameters

  [in] | _prefix | Prefix added to the directory where the log file will be created.
  [in] | _str | Name of log file for gzlog messages.

## gzmsg

#define gzmsg (gazebo::common::Console::msg())

Output a message.

## gzthrow

#define gzthrow | ( |  | msg | ) |

Value:
{std::ostringstream throwStream;\
throwStream << msg << std::endl << std::flush;\
throw gazebo::common::Exception(__FILE__, __LINE__, throwStream.str()); }

This macro logs an error to the throw stream and throws an exception that contains the file name and line number.

## gzwarn

#define gzwarn (gazebo::common::Console::warn(__FILE__, __LINE__))

Output a warning message.

## Enumeration Type Documentation

## PluginType

enum PluginType

Used to specify the type of plugin.

Enumerator
WORLD_PLUGIN | A World plugin.
MODEL_PLUGIN | A Model plugin.
SENSOR_PLUGIN | A Sensor plugin.
SYSTEM_PLUGIN | A System plugin.
VISUAL_PLUGIN | A Visual plugin.
GUI_PLUGIN | A GUI plugin.

## Function Documentation

## MovingWindowFilter()

MovingWindowFilter | ( |  | ) |

Constructor.

## SemanticVersion() [1/4]

SemanticVersion | ( |  | ) |

Default constructor.

Use the Parse function to populate an instance with version information.

## SemanticVersion() [2/4]

SemanticVersion | ( | const SemanticVersion & | _copy | ) |

Copy constructor.

Parameters

  [in] | _copy | the other version

## SemanticVersion() [3/4]

SemanticVersion | ( | const std::string & | _v | ) |

explicit

Constructor.

Parameters

  [in] | _v | the string version. ex: "0.3.2"

## SemanticVersion() [4/4]

SemanticVersion | ( | const unsigned int | _major,
|  | const unsigned int | _minor = `0`,
|  | const unsigned int | _patch = `0`,
|  | const std::string & | _prerelease = `""`,
|  | const std::string & | _build = `""`
| ) |  |

Constructor.

Parameters

  [in] | _major | The major number
  [in] | _minor | The minor number
  [in] | _patch | The patch number
  [in] | _prerelease | The prerelease string
  [in] | _build | The build metadata string

## ~MovingWindowFilter()

~MovingWindowFilter | ( |  | ) |

virtual

Destructor.

## ~SemanticVersion()

~SemanticVersion | ( |  | ) |

Destructor.

## absPath()

std::string gazebo::common::absPath | ( | const std::string & | _path | ) |

Get the absolute path of a provided path.

Parameters

  [in] | _path | Relative or absolute path.

Returns
  Absolute path

## add_search_path_suffix()

void gazebo::common::add_search_path_suffix | ( | const std::string & | _suffix | ) |

add path sufix to common::SystemPaths

Parameters

  [in] | _suffix | The suffix to add.

## Build()

std::string Build | ( |  | ) | const

Get the build metadata string.

Build meta data is not used when determining precedence.

Returns
  Build metadata string, empty if a build metadata string was not specified.

## CachedFilePath()

std::string CachedFilePath | ( | const std::string & | _uri | ) |

Get the full local path to a cached file based on its URI.

Parameters

  [in] | _uri | The file's URI

Returns
  Local path to the file

## copyDir()

bool gazebo::common::copyDir | ( | const boost::filesystem::path & | _source,
|  | const boost::filesystem::path & | _destination
| ) |  |

Copy a directory, overwrite the destination directory if exists.

Parameters

  [in] | _source | Path to an existing directory to copy from.
  [in] | _destination | Path to the destination directory.

Returns
  True on success.

## copyFile()

bool gazebo::common::copyFile | ( | const std::string & | _existingFilename,
|  | const std::string & | _newFilename
| ) |  |

Copy a file.

Parameters

  [in] | _existingFilename | Path to an existing file.
  [in] | _newFilename | Path of the new file.

Returns
  True on success.

## cwd()

std::string gazebo::common::cwd | ( |  | ) |

Get the current working directory.

Returns
  Name of the current directory

## DelaunayTriangulation()

static bool DelaunayTriangulation | ( | const std::vector< ignition::math::Vector2d > & | _vertices,
|  | const std::vector< ignition::math::Vector2i > & | _edges,
|  | SubMesh * | _submesh
| ) |  |

static

Perform delaunay triangulation on input vertices.

Parameters

  [in] | _vertices | A list of all vertices
  [in] | _edges | A list of edges. Each edge is made of 2 vertex indices from _vertices
  [out] | _submesh | A submesh that will be populated with the resulting triangles.

Returns
  True on success.

## DownloadDependencies()

void DownloadDependencies | ( | const std::string & | _path | ) |

Download all dependencies for a give model path.

Look's in the model's manifest file (_path/model.config) for all models listed in the <depend> block, and downloads the models if necessary.

Parameters

  [in] | _path | Path to a model.

## exists()

bool gazebo::common::exists | ( | const std::string & | _path | ) |

Returns true if _path is a file or directory.

Parameters

  [in] | _path | Path to check.

Returns
  True if _path is a file or directory

## find_file() [1/2]

std::string gazebo::common::find_file | ( | const std::string & | _file | ) |

search for file in common::SystemPaths

Parameters

  [in] | _file | Name of the file to find.

Returns
  The path containing the file.

## find_file() [2/2]

std::string gazebo::common::find_file | ( | const std::string & | _file,
|  | bool | _searchLocalPath
| ) |  |

search for file in common::SystemPaths

Parameters

  [in] | _file | Name of the file to find.
  [in] | _searchLocalPath | True to search in the current working directory.

Returns
  The path containing the file.

## find_file_path()

std::string gazebo::common::find_file_path | ( | const std::string & | _file | ) |

search for a file in common::SystemPaths

Parameters

  [in] | _file | the file name to look for.

Returns
  The path containing the file.

## Fini()

void Fini | ( |  | ) |

Finalize the model database.

## Get()

T Get | ( |  | ) |

Get filtered result.

Returns
  latest filtered value

## get_sha1()

std::string get_sha1 | ( | const T & | _buffer | ) |

Compute the SHA1 hash of an array of bytes.

Parameters

  [in] | _buffer | Input sequence. The permitted data types for this function are std::string and any STL container.

Returns
  The string representation (40 character) of the SHA1 hash.

## GetDBConfig()

std::string GetDBConfig | ( | const std::string & | _uri | ) |

Return the database.config file as a string.

Returns
  The database config file from the model database.

## getEnv()

const char* gazebo::common::getEnv | ( | const char * | _name | ) |

Cross platform retrieval of an environment variable.

Parameters

  [in] | _name | Name of the environment variable to get.

Returns
  Environment variable contents, or nullptr on error.

## GetModelConfig()

std::string GetModelConfig | ( | const std::string & | _uri | ) |

Return the model.config file as a string.

Returns
  The model config file from the model database.

## GetModelFile()

std::string GetModelFile | ( | const std::string & | _uri | ) |

Get a model's SDF file based on a URI.

Get a model file based on a URI. If the model is on a remote server, then the model fetched and installed locally.

Parameters

  [in] | _uri | The URI of the model

Returns
  The full path and filename to the SDF file

## GetModelName()

std::string GetModelName | ( | const std::string & | _uri | ) |

Get the name of a model based on a URI.

The URI must be fully qualified: http://gazebosim.org/gazebo_models/ground_plane or model://gazebo_models

Parameters

  [in] | _uri | the model uri

Returns
  the model's name.

## GetModelPath()

std::string GetModelPath | ( | const std::string & | _uri,
|  | bool | _forceDownload = `false`
| ) |  |

Get the local path to a model.

Get the path to a model based on a URI. If the model is on a remote server, then the model fetched and installed locally.

Parameters

  [in] | _uri | the model uri
  [in] | _forceDownload | True to skip searching local paths.

Returns
  path to a model directory

## GetModels() [1/2]

std::map<std::string, std::string> GetModels | ( |  | ) |

Returns the dictionary of all the model names.

This is a blocking call. Which means it will wait for the ModelDatabase to download the model list.

Returns
  a map of model names, indexed by their full URI.

## GetModels() [2/2]

event::ConnectionPtr GetModels | ( | boost::function< void(const std::map< std::string, std::string > & |  | ) |

Get the dictionary of all model names via a callback.

This is the non-blocking version of ModelDatabase::GetModels

Parameters

  [in] | _func | Callback function that receives the list of models.

Returns
  A boost shared pointer. This pointer must remain valid in order to receive the callback.

## GetURI()

std::string GetURI | ( |  | ) |

Returns the the global model database URI.

Returns
  the URI.

## GetWindowFilled()

bool GetWindowFilled | ( |  | ) | const

Get whether the window has been filled.

Returns
  True if the window has been filled.

## GetWindowSize()

unsigned int GetWindowSize | ( |  | ) | const

Get the window size.

Returns
  The size of the moving window.

## HasModel()

bool HasModel | ( | const std::string & | _modelName | ) |

Returns true if the model exists on the database.

Parameters

  [in] | _modelName | URI of the model (eg: model://my_model_name).

Returns
  True if the model was found.

## isDirectory()

bool gazebo::common::isDirectory | ( | const std::string & | _path | ) |

Check if the given path is a directory.

Parameters

  [in] | _path | Path to a directory.

Returns
  True if _path is a directory.

## isFile()

bool gazebo::common::isFile | ( | const std::string & | _path | ) |

Check if the given path is a file.

Parameters

  [in] | _path | Path to a file.

Returns
  True if _path is a file.

## load()

void gazebo::common::load | ( |  | ) |

Load the common library.

## Major()

unsigned int Major | ( |  | ) | const

Get the major number.

Returns
  The major number

## Minor()

unsigned int Minor | ( |  | ) | const

Get the minor number.

Returns
  The minor number

## ModelFile()

std::string ModelFile | ( | const std::string & | _uri | ) |

Get a model's SDF file based on a URI.

Get a model file based on a URI. If the model is on a remote server, then the model is fetched and installed locally.

Parameters

  [in] | _uri | The URI of the model.

Returns
  The full path and filename to the SDF file.

## ModelPath()

std::string ModelPath | ( | const std::string & | _uri,
|  | const bool | _forceDownload = `false`
| ) |  |

Get the local path to a model.

Get the path to a model based on a URI. If the model is on a remote server, then the model fetched and installed locally.

Parameters

  [in] | _uri | the model uri
  [in] | _forceDownload | True to skip searching local cache.

Returns
  Local path to a model directory

## Models() [1/2]

virtual std::vector<ignition::fuel_tools::ModelIdentifier> Models | ( | const ignition::fuel_tools::ServerConfig & | _server | ) | const

virtual

Get the list of all models.

This is a blocking function.

Parameters

  [in] | _server | The Ignition Fuel server.

Returns
  The list of models. The returned vector contains elements which uniquely identify models.

## Models() [2/2]

virtual void Models | ( | const ignition::fuel_tools::ServerConfig & | _server,
|  | std::function< void(const std::vector< ignition::fuel_tools::ModelIdentifier > & |
| ) |  | &

virtual

Get the list of all models via a callback.

This is a non-blocking function. Your callback will be executed from a separate thread.

Parameters

  [in] | _server | The Ignition Fuel server.
  [in] | _func | Callback function that receives the list of models. The parameter of the callback is a vector, where each element is the unique identifier of a model.

## moveFile()

bool gazebo::common::moveFile | ( | const std::string & | _existingFilename,
|  | const std::string & | _newFilename
| ) |  |

Move a file.

Parameters

  [in] | _existingFilename | Full path to an existing file.
  [in] | _newFilename | Full path of the new file.

Returns
  True on success.

## operator!=()

bool operator!= | ( | const SemanticVersion & | _other | ) | const

Inequality comparison operator.

Parameters

  [in] | _other | The other version to compare to

Returns
  True if _other version is different

## operator<()

bool operator< | ( | const SemanticVersion & | _other | ) | const

Less than comparison operator.

Parameters

  [in] | _other | The other version to compare to

Returns
  True if _other version is newer

## operator<=()

bool operator<= | ( | const SemanticVersion & | _other | ) | const

Less than or equal comparison operator.

Parameters

  [in] | _other | The other version to compare to

Returns
  True if _other version is older or equal

## operator=()

SemanticVersion& operator= | ( | const SemanticVersion & | _other | ) |

Assignment operator.

Parameters

  [in] | _other | The version to assign from.

Returns
  The reference to this instance

## operator==()

bool operator== | ( | const SemanticVersion & | _other | ) | const

Equality comparison operator.

Parameters

  [in] | _other | The other version to compare to

Returns
  True if _other version is the same

## operator>()

bool operator> | ( | const SemanticVersion & | _other | ) | const

Greater than comparison operator.

Parameters

  [in] | _other | The other version to compare to

Returns
  True if _other version is older

## operator>=()

bool operator>= | ( | const SemanticVersion & | _other | ) | const

Greater than or equal comparison operator.

Parameters

  [in] | _other | The other version to compare to

Returns
  True if _other version is newer or the same

## Parse()

bool Parse | ( | const std::string & | _versionStr | ) |

Parse a version string and set the major, minor, patch numbers, and prerelease and build strings.

Parameters

  [in] | _versionStr | The version string, such as "1.2.3-pr+123" \retur True on success.

## Patch()

unsigned int Patch | ( |  | ) | const

Get the patch number.

Returns
  The patch number

## Prerelease()

std::string Prerelease | ( |  | ) | const

Get the prerelease string.

Returns
  Prelrease string, empty if a prerelease string was not specified.

## replaceAll() [1/2]

std::string gazebo::common::replaceAll | ( | const std::string & | _orig,
|  | const std::string & | _key,
|  | const std::string & | _replacement
| ) |  |

Replace all occurances of _key with _replacement.

Parameters

  [in] | _orig | Original string.
  [in] | _key | String to replace.
  [in] | _replacement | The string that replaces _key.

Returns
  The new string that has had _key replaced with _replacement.

See also
  void common::replaceAll(std::string &_result, const std::string &_orig, const std::string &_key, const std::string &_replacement)

## replaceAll() [2/2]

void gazebo::common::replaceAll | ( | std::string & | _result,
|  | const std::string & | _orig,
|  | const std::string & | _key,
|  | const std::string & | _replacement
| ) |  |

Replace all occurances of _key with _replacement.

Parameters

  [out] | _result | The new string that has had _key replaced with _replacement.
  [in] | _orig | Original string.
  [in] | _key | String to replace.
  [in] | _replacement | The string that replaces _key.

See also
  std::string replaceAll(const std::string &_orig, const std::string &_key, const std::string &_replacement)

## Servers()

std::vector<ignition::fuel_tools::ServerConfig> Servers | ( |  | ) | const

Get all the Ignition Fuel servers.

Returns
  A collection of Ignition Fuel servers.

## SetWindowSize()

void SetWindowSize | ( | unsigned int | _n | ) |

Set window size.

Parameters

  [in] | _n | new desired window size

## split()

std::vector<std::string> gazebo::common::split | ( | const std::string & | _str,
|  | const std::string & | _delim
| ) |  |

Splits a string into tokens.

Parameters

  [in] | _str | Input string.
  [in] | _delim | Token delimiter.

Returns
  Vector of tokens.

## Start()

void Start | ( | bool | _fetchImmediately = `false` | ) |

Start the model database.

Parameters

  [in] | _fetchImmediately | True to fetch the models without waiting.

## unique_file_path()

std::string gazebo::common::unique_file_path | ( | const std::string & | _pathAndName,
|  | const std::string & | _extension
| ) |  |

Generates a path for a file which doesn't collide with existing files, by appending numbers to it (i.e.

(0), (1), ...)

Parameters

  [in] | _pathAndName | Full absolute path and file name up to the file extension.
  [in] | _extension | File extension, such as "pdf".

Returns
  Full path with name and extension, which doesn't collide with existing files

## Update()

void Update | ( | T | _val | ) |

Update value of filter.

Parameters

  [in] | _val | new raw value

## Version()

std::string Version | ( |  | ) | const

Returns the version as a string.

Returns
  The semantic version string

## Variable Documentation

## PixelFormatNames

std::string PixelFormatNames[]

static

Initial value:
=
{
"UNKNOWN_PIXEL_FORMAT",
"L_INT8",
"L_INT16",
"RGB_INT8",
"RGBA_INT8",
"BGRA_INT8",
"RGB_INT16",
"RGB_INT32",
"BGR_INT8",
"BGR_INT16",
"BGR_INT32",
"R_FLOAT16",
"RGB_FLOAT16",
"R_FLOAT32",
"RGB_FLOAT32",
"BAYER_RGGB8",
"BAYER_RGGR8",
"BAYER_GBRG8",
"BAYER_GRBG8"
}

String names for the pixel formats.

See also
  Image::PixelFormat.

## Friends

## operator<<

std::ostream& operator<< | ( | std::ostream & | _out,
|  | const SemanticVersion & | _v
| ) |  |

friend

Stream insertion operator.

Parameters

  _out | output stream
  _v | Semantic version to output

Returns
  the stream

gazebo::common::Exception
Class for generating exceptions.
Definition: Exception.hh:45
SingletonT
Singleton template class.
Definition: SingletonT.hh:33