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. 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. 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 |
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. 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. 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. 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. More... | |
Macros | |
#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 std::string &_v) | |
Constructor. More... | |
SemanticVersion (const SemanticVersion &_copy) | |
Copy 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... | |
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 void | Models (const ignition::fuel_tools::ServerConfig &_server, std::function< void(const std::map< std::string, std::string > &)> &_func) |
Get the dictionary of all model names via a callback. More... | |
virtual std::map< std::string, std::string > | Models (const ignition::fuel_tools::ServerConfig &_server) const |
Get the dictionary of all model names. 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... | |
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::string | replaceAll (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... | |
Classes and functions used by multiple modules.
#define gzdbg (gazebo::common::Console::dbg(__FILE__, __LINE__)) |
Output a debug message.
#define gzerr (gazebo::common::Console::err(__FILE__, __LINE__)) |
Output an error message.
Referenced by Connection::AsyncRead(), gazebo::util::Convert(), PluginT< ModelPlugin >::Create(), GearboxJoint< ODEJoint >::Load(), SimbodySphereShape::SetRadius(), BulletSphereShape::SetRadius(), SimbodyBoxShape::SetSize(), SimbodyCylinderShape::SetSize(), BulletCylinderShape::SetSize(), and BulletBoxShape::SetSize().
#define gzlog (gazebo::common::Console::log()) |
Output a message to a log file.
#define gzLogDirectory | ( | ) | (gazebo::common::Console::log.GetLogDirectory()) |
Get the full path of the directory where the log files are stored.
#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.
[in] | _prefix | Prefix added to the directory where the log file will be created. |
[in] | _str | Name of log file for gzlog messages. |
#define gzmsg (gazebo::common::Console::msg()) |
Output a message.
#define gzthrow | ( | msg | ) |
This macro logs an error to the throw stream and throws an exception that contains the file name and line number.
Referenced by TopicManager::Advertise(), CallbackHelperT< M >::GetMsgType(), and SubscribeOptions::Init().
#define gzwarn (gazebo::common::Console::warn(__FILE__, __LINE__)) |
Output a warning message.
Referenced by SimbodySphereShape::SetRadius(), BulletSphereShape::SetRadius(), SimbodyBoxShape::SetSize(), SimbodyCylinderShape::SetSize(), BulletCylinderShape::SetSize(), and BulletBoxShape::SetSize().
enum PluginType |
MovingWindowFilter | ( | ) |
Constructor.
SemanticVersion | ( | ) |
Default constructor.
Use the Parse function to populate an instance with version information.
|
explicit |
Constructor.
[in] | _v | the string version. ex: "0.3.2" |
SemanticVersion | ( | const SemanticVersion & | _copy | ) |
Copy constructor.
[in] | _copy | the other version |
SemanticVersion | ( | const unsigned int | _major, |
const unsigned int | _minor = 0 , |
||
const unsigned int | _patch = 0 , |
||
const std::string & | _prerelease = "" , |
||
const std::string & | _build = "" |
||
) |
Constructor.
[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 |
|
virtual |
Destructor.
~SemanticVersion | ( | ) |
Destructor.
std::string gazebo::common::absPath | ( | const std::string & | _path | ) |
Get the absolute path of a provided path.
[in] | _path | Relative or absolute path. |
void gazebo::common::add_search_path_suffix | ( | const std::string & | _suffix | ) |
add path sufix to common::SystemPaths
[in] | _suffix | The suffix to add. |
std::string Build | ( | ) | const |
Get the build metadata string.
Build meta data is not used when determining precedence.
bool gazebo::common::copyFile | ( | const std::string & | _existingFilename, |
const std::string & | _newFilename | ||
) |
Copy a file.
[in] | _existingFilename | Path to an existing file. |
[in] | _newFilename | Path of the new file. |
std::string gazebo::common::cwd | ( | ) |
Get the current working directory.
|
static |
Perform delaunay triangulation on input vertices.
[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. |
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.
[in] | _path | Path to a model. |
bool gazebo::common::exists | ( | const std::string & | _path | ) |
Returns true if _path is a file or directory.
[in] | _path | Path to check. |
std::string gazebo::common::find_file | ( | const std::string & | _file | ) |
search for file in common::SystemPaths
[in] | _file | Name of the file to find. |
std::string gazebo::common::find_file | ( | const std::string & | _file, |
bool | _searchLocalPath | ||
) |
search for file in common::SystemPaths
[in] | _file | Name of the file to find. |
[in] | _searchLocalPath | True to search in the current working directory. |
std::string gazebo::common::find_file_path | ( | const std::string & | _file | ) |
search for a file in common::SystemPaths
[in] | _file | the file name to look for. |
void Fini | ( | ) |
Finalize the model database.
T Get | ( | ) |
Get filtered result.
std::string get_sha1 | ( | const T & | _buffer | ) |
Compute the SHA1 hash of an array of bytes.
[in] | _buffer | Input sequence. The permitted data types for this function are std::string and any STL container. |
std::string GetDBConfig | ( | const std::string & | _uri | ) |
Return the database.config file as a string.
const char* gazebo::common::getEnv | ( | const char * | _name | ) |
Cross platform retrieval of an environment variable.
[in] | _name | Name of the environment variable to get. |
std::string GetModelConfig | ( | const std::string & | _uri | ) |
Return the model.config file as a string.
std::string GetModelFile | ( | const std::string & | _uri | ) |
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
[in] | _uri | the model uri |
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.
[in] | _uri | the model uri |
[in] | _forceDownload | True to skip searching local paths. |
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.
event::ConnectionPtr GetModels | ( | boost::function< void(const std::map< std::string, std::string > &)> | _func | ) |
Get the dictionary of all model names via a callback.
This is the non-blocking version of ModelDatabase::GetModels
[in] | _func | Callback function that receives the list of models. |
bool GetWindowFilled | ( | ) | const |
Get whether the window has been filled.
unsigned int GetWindowSize | ( | ) | const |
Get the window size.
bool HasModel | ( | const std::string & | _modelName | ) |
Returns true if the model exists on the database.
[in] | _modelName | URI of the model (eg: model://my_model_name). |
bool gazebo::common::isDirectory | ( | const std::string & | _path | ) |
Check if the given path is a directory.
[in] | _path | Path to a directory. |
bool gazebo::common::isFile | ( | const std::string & | _path | ) |
Check if the given path is a file.
[in] | _path | Path to a file. |
void gazebo::common::load | ( | ) |
Load the common library.
unsigned int Major | ( | ) | const |
Get the major number.
unsigned int Minor | ( | ) | const |
Get the minor number.
std::string ModelFile | ( | const std::string & | _uri | ) |
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.
[in] | _uri | the model uri |
[in] | _forceDownload | True to skip searching local paths. |
|
virtual |
Get the dictionary of all model names via a callback.
This is a non-blocking function. Your callback will be executed from a separate thread.
[in] | _server | The Ignition Fuel server. |
[in] | _func | Callback function that receives the list of models. The parameter of the callback is a map, where the key is the unique name (containing the full path in the server, owner and model name) and the value is the model name. E.g.: https://api.ignitionfuel.org/1.0/caguero/models/Beer -> Beer |
|
virtual |
Get the dictionary of all model names.
This is a blocking function.
[in] | _server | The Ignition Fuel server. |
bool gazebo::common::moveFile | ( | const std::string & | _existingFilename, |
const std::string & | _newFilename | ||
) |
Move a file.
[in] | _existingFilename | Full path to an existing file. |
[in] | _newFilename | Full path of the new file. |
bool operator!= | ( | const SemanticVersion & | _other | ) | const |
Inequality comparison operator.
[in] | _other | The other version to compare to |
bool operator< | ( | const SemanticVersion & | _other | ) | const |
Less than comparison operator.
[in] | _other | The other version to compare to |
bool operator<= | ( | const SemanticVersion & | _other | ) | const |
Less than or equal comparison operator.
[in] | _other | The other version to compare to |
SemanticVersion& operator= | ( | const SemanticVersion & | _other | ) |
Assignment operator.
[in] | _other | The version to assign from. |
bool operator== | ( | const SemanticVersion & | _other | ) | const |
Equality comparison operator.
[in] | _other | The other version to compare to |
bool operator> | ( | const SemanticVersion & | _other | ) | const |
Greater than comparison operator.
[in] | _other | The other version to compare to |
bool operator>= | ( | const SemanticVersion & | _other | ) | const |
Greater than or equal comparison operator.
[in] | _other | The other version to compare to |
bool Parse | ( | const std::string & | _versionStr | ) |
Parse a version string and set the major, minor, patch numbers, and prerelease and build strings.
[in] | _versionStr | The version string, such as "1.2.3-pr+123" True on success. |
unsigned int Patch | ( | ) | const |
Get the patch number.
std::string Prerelease | ( | ) | const |
Get the prerelease string.
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.
[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. |
std::string gazebo::common::replaceAll | ( | const std::string & | _orig, |
const std::string & | _key, | ||
const std::string & | _replacement | ||
) |
Replace all occurances of _key with _replacement.
[in] | _orig | Original string. |
[in] | _key | String to replace. |
[in] | _replacement | The string that replaces _key. |
std::vector<ignition::fuel_tools::ServerConfig> Servers | ( | ) | const |
Get all the Ignition Fuel servers.
void SetWindowSize | ( | unsigned int | _n | ) |
Set window size.
[in] | _n | new desired window size |
std::vector<std::string> gazebo::common::split | ( | const std::string & | _str, |
const std::string & | _delim | ||
) |
Splits a string into tokens.
[in] | _str | Input string. |
[in] | _delim | Token delimiter. |
void Start | ( | bool | _fetchImmediately = false | ) |
Start the model database.
[in] | _fetchImmediately | True to fetch the models without waiting. |
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), ...)
[in] | _pathAndName | Full absolute path and file name up to the file extension. |
[in] | _extension | File extension, such as "pdf". |
void Update | ( | T | _val | ) |
Update value of filter.
[in] | _val | new raw value |
std::string Version | ( | ) | const |
Returns the version as a string.
|
static |
String names for the pixel formats.
|
friend |
Stream insertion operator.
_out | output stream |
_v | Semantic version to output |