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 | GTSMeshUtils |
Creates GTS utilities for meshes. More... | |
class | HeightmapData |
Encapsulates a generic heightmap data file. 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 | 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 | VisualPlugin |
A plugin loaded within the gzserver on startup. 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... | |
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... | |
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... | |
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... | |
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... | |
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 | SetWindowSize (unsigned int _n) |
Set window size. More... | |
void | Start (bool _fetchImmediately=false) |
Start the model database. 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(), PluginT< ModelPlugin >::Create(), GearboxJoint< ODEJoint >::Load(), SimbodySphereShape::SetRadius(), BulletSphereShape::SetRadius(), SimbodyBoxShape::SetSize(), SimbodyCylinderShape::SetSize(), BulletBoxShape::SetSize(), and BulletCylinderShape::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(), BulletBoxShape::SetSize(), and BulletCylinderShape::SetSize().
enum PluginType |
Constructor.
SemanticVersion | ( | ) |
Default constructor.
Use the Parse function to populate an instance with version information.
SemanticVersion | ( | const std::string & | _v | ) |
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.
References MovingWindowFilter< T >::dataPtr, and NULL.
~SemanticVersion | ( | ) |
Destructor.
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.
|
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. |
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 | ( | ) |
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. |
References NULL.
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 | ) |
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.
[in] | _uri | The URI of the model |
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. |
std::string GetURI | ( | ) |
Returns the the global model database URI.
bool GetWindowFilled | ( | ) | const |
Get whether the window has been filled.
References MovingWindowFilter< T >::dataPtr.
unsigned int GetWindowSize | ( | ) | const |
Get the window size.
References MovingWindowFilter< T >::dataPtr.
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). |
void gazebo::common::load | ( | ) |
Load the common library.
unsigned int Major | ( | ) | const |
Get the major number.
unsigned int Minor | ( | ) | const |
Get the minor number.
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 SetWindowSize | ( | unsigned int | _n | ) |
Set window size.
[in] | _n | new desired window size |
References MovingWindowFilter< T >::dataPtr.
void Start | ( | bool | _fetchImmediately = false | ) |
Start the model database.
[in] | _fetchImmediately | True to fetch the models without waiting. |
void Update | ( | T | _val | ) |
Update value of filter.
[in] | _val | new raw value |
References MovingWindowFilter< T >::dataPtr.
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 |