All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Files | Namespaces | Classes | Macros | Typedefs | Enumerations | Functions
Common

Files

file  CommonTypes.hh
 

Namespaces

namespace  gazebo::common
 Common namespace.
 

Classes

class  gazebo::common::Animation
 Manages an animation, which is a collection of keyframes and the ability to interpolate between the keyframes. More...
 
class  gazebo::common::BVHLoader
 Handles loading BVH animation files. More...
 
class  gazebo::common::ColladaLoader
 Class used to load Collada mesh files. More...
 
class  gazebo::common::Color
 Defines a color. More...
 
class  gazebo::common::Console
 Message, error, warning functionality. More...
 
class  gazebo::common::DiagnosticManager
 A diagnostic manager class. More...
 
class  gazebo::common::DiagnosticTimer
 A timer designed for diagnostics. More...
 
class  gazebo::common::Exception
 Class for generating exceptions. More...
 
class  gazebo::common::Image
 Encapsulates an image. More...
 
class  gazebo::common::KeyFrame
 A key frame in an animation. More...
 
class  gazebo::common::Material
 Encapsulates description of a material. More...
 
class  gazebo::common::Mesh
 A 3D mesh. More...
 
class  gazebo::common::MeshLoader
 Base class for loading meshes. More...
 
class  gazebo::common::MeshManager
 Maintains and manages all meshes. More...
 
class  gazebo::common::ModelDatabase
 Connects to model database, and has utility functions to find models. More...
 
class  gazebo::ModelPlugin
 A plugin with access to physics::Model. More...
 
class  gazebo::common::MouseEvent
 Generic description of a mouse event. More...
 
class  gazebo::common::NodeAnimation
 Node animation. More...
 
struct  gazebo::common::NodeAssignment
 Vertex to node weighted assignement for skeleton animation visualization. More...
 
class  gazebo::common::NodeTransform
 NodeTransform Skeleton.hh common/common.hh More...
 
class  gazebo::common::NumericAnimation
 A numeric animation. More...
 
class  gazebo::common::NumericKeyFrame
 A keyframe for a NumericAnimation. More...
 
class  gazebo::common::PID
 Generic PID controller class. More...
 
class  gazebo::PluginT< T >
 A class which all plugins must inherit from. More...
 
class  gazebo::common::PoseAnimation
 A pose animation. More...
 
class  gazebo::common::PoseKeyFrame
 A keyframe for a PoseAnimation. More...
 
class  gazebo::SensorPlugin
 A plugin with access to physics::Sensor. More...
 
class  SingletonT< T >
 Singleton template class. More...
 
class  gazebo::common::Skeleton
 A skeleton. More...
 
class  gazebo::common::SkeletonAnimation
 Skeleton animation. More...
 
class  gazebo::common::SkeletonNode
 A skeleton node. More...
 
class  gazebo::common::STLLoader
 Class used to load STL mesh files. More...
 
class  gazebo::common::SubMesh
 A child mesh. More...
 
class  gazebo::common::SystemPaths
 Functions to handle getting system paths, keeps track of: More...
 
class  gazebo::SystemPlugin
 A plugin loaded within the gzserver on startup. More...
 
class  gazebo::common::Time
 A Time class, can be used to hold wall- or sim-time. More...
 
class  gazebo::common::Timer
 A timer class, used to time things in real world walltime. More...
 
class  gazebo::common::Video
 Handle video encoding and decoding using libavcodec. More...
 
class  gazebo::VisualPlugin
 A plugin loaded within the gzserver on startup. More...
 
class  gazebo::WorldPlugin
 A plugin with access to physics::World. More...
 

Macros

#define DIAG_TIMER(name)   DiagnosticManager::Instance()->CreateTimer(name);
 Create an instance of common::DiagnosticManager.
 
#define gzclr_end   "\033[0m"
 end marker
 
#define gzclr_start(clr)   "\033[1;33m"
 start marker
 
#define gzdbg   (gazebo::common::Console::Instance()->ColorMsg("Dbg", 36))
 Output a debug message.
 
#define gzerr
 Output an error message.
 
#define gzmsg   (gazebo::common::Console::Instance()->ColorMsg("Msg", 32))
 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.
 
#define gzwarn
 Output a warning message.
 

Typedefs

typedef DiagnosticTimer * gazebo::common::DiagnosticTimerPtr
 

Enumerations

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

Functions

 gazebo::common::Console::NullStream::NullStream ()
 constructor
 
void gazebo::common::add_search_path_suffix (const std::string &_suffix)
 add path prefix to common::SystemPaths
 
std::ostream & gazebo::common::Console::ColorErr (const std::string &_lbl, const std::string &_file, unsigned int _line, int _color)
 Use this to output an error to the terminal.
 
std::ostream & gazebo::common::Console::ColorMsg (const std::string &_lbl, int _color)
 Use this to output a colored message to the terminal.
 
void gazebo::common::ModelDatabase::DownloadDependencies (const std::string &_path)
 Download all dependencies for a give model path.
 
std::string gazebo::common::find_file (const std::string &_file, bool _searchLocalPath=true)
 search for file in common::SystemPaths
 
std::string gazebo::common::find_file_path (const std::string &_file)
 search for a file in common::SystemPaths
 
std::string gazebo::common::ModelDatabase::GetManifest (const std::string &_uri)
 Return the manifest.xml file as a string.
 
std::string gazebo::common::ModelDatabase::GetModelFile (const std::string &_uri)
 Get a model's SDF file based on a URI.
 
std::string gazebo::common::ModelDatabase::GetModelName (const std::string &_uri)
 Get the name of a model based on a URI.
 
std::string gazebo::common::ModelDatabase::GetModelPath (const std::string &_uri)
 Get the local path to a model.
 
std::map< std::string,
std::string > 
gazebo::common::ModelDatabase::GetModels ()
 Returns the dictionary of all the model names.
 
void gazebo::common::ModelDatabase::GetModels (boost::function< void(const std::map< std::string, std::string > &)> _func)
 Get the dictionary of all model names via a callback.
 
std::string gazebo::common::ModelDatabase::GetURI ()
 Returns the the global model database URI.
 
bool gazebo::common::ModelDatabase::HasModel (const std::string &_modelName)
 Returns true if the model exists on the database.
 
static Console * gazebo::common::Console::Instance ()
 Return an instance to this class.
 
void gazebo::common::Console::Load ()
 Load the message parameters.
 
void gazebo::common::Console::SetQuiet (bool _q)
 Set quiet output.
 

Detailed Description

Macro Definition Documentation

#define DIAG_TIMER (   name)    DiagnosticManager::Instance()->CreateTimer(name);

Create an instance of common::DiagnosticManager.

#define gzclr_end   "\033[0m"

end marker

#define gzclr_start (   clr)    "\033[1;33m"

start marker

#define gzdbg   (gazebo::common::Console::Instance()->ColorMsg("Dbg", 36))

Output a debug message.

#define gzerr
#define gzmsg   (gazebo::common::Console::Instance()->ColorMsg("Msg", 32))

Output a message.

Referenced by sdf::ParamT< std::string >::Set().

#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.

Referenced by gazebo::transport::TopicManager::Advertise(), gazebo::PluginT< ModelPlugin >::Create(), gazebo::transport::CallbackHelperT< M >::GetMsgType(), and gazebo::transport::SubscribeOptions::Init().

#define gzwarn
Value:
__FILE__, __LINE__, 33))

Output a warning message.

Typedef Documentation

typedef DiagnosticTimer* gazebo::common::DiagnosticTimerPtr

Enumeration Type Documentation

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.

Function Documentation

gazebo::common::Console::NullStream::NullStream ( )
inline

constructor

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

add path prefix to common::SystemPaths

std::ostream& gazebo::common::Console::ColorErr ( const std::string &  _lbl,
const std::string &  _file,
unsigned int  _line,
int  _color 
)

Use this to output an error to the terminal.

Parameters
[in]_lblText label
[in]_fileFile containing the error
[in]_lineLine containing the error
[in]_colorColor to make the label
Returns
Reference to an output stream
std::ostream& gazebo::common::Console::ColorMsg ( const std::string &  _lbl,
int  _color 
)

Use this to output a colored message to the terminal.

Parameters
[in]_lblText label
[in]_colorColor to make the label
Returns
Reference to an output stream
void gazebo::common::ModelDatabase::DownloadDependencies ( const std::string &  _path)

Download all dependencies for a give model path.

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

Parameters
[in]_pathPath to a model.
std::string gazebo::common::find_file ( const std::string &  _file,
bool  _searchLocalPath = true 
)

search for file in common::SystemPaths

Parameters
[in]_fileName of the file to find.
[in]_searchLocalPathTrue 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

Parameters
[in]_filethe file name to look for
Returns
The path containing the file
std::string gazebo::common::ModelDatabase::GetManifest ( const std::string &  _uri)

Return the manifest.xml file as a string.

Returns
the manifest file from the model database.
std::string gazebo::common::ModelDatabase::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]_uriThe URI of the model
Returns
The full path and filename to the SDF file
std::string gazebo::common::ModelDatabase::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 models://gazebo_models

Parameters
[in]_urithe model uri
Returns
the model's name.
std::string gazebo::common::ModelDatabase::GetModelPath ( const std::string &  _uri)

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. param[in] _uri the model uri

Returns
path to a model directory
std::map<std::string, std::string> gazebo::common::ModelDatabase::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.
void gazebo::common::ModelDatabase::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

Parameters
[in]_funcCallback function that receives the list of models.
std::string gazebo::common::ModelDatabase::GetURI ( )

Returns the the global model database URI.

Returns
the URI.
bool gazebo::common::ModelDatabase::HasModel ( const std::string &  _modelName)

Returns true if the model exists on the database.

Parameters
[in]_modelNameURI of the model (eg: model://my_model_name).
Returns
True if the model was found.
static Console* gazebo::common::Console::Instance ( )
static

Return an instance to this class.

void gazebo::common::Console::Load ( )

Load the message parameters.

void gazebo::common::Console::SetQuiet ( bool  _q)

Set quiet output.

Parameters
[in]qTrue to prevent warning