Classes | |
class | AirPressure |
AirPressure contains information about a general purpose fluid pressure sensor. More... | |
class | Altimeter |
Altimeter contains information about an altimeter sensor. More... | |
class | AssertionInternalError |
Class for generating Exceptions which come from sdf assertions. More... | |
class | Atmosphere |
The Atmosphere class contains information about an atmospheric model and related parameters such as temperature and pressure at sea level. More... | |
class | Box |
Box represents a box shape, and is usually accessed through a Geometry. More... | |
class | Camera |
Information about a monocular camera sensor. More... | |
class | Collision |
A collision element descibes the collison properties associated with a link. More... | |
class | Color |
Defines a color. More... | |
class | Console |
Message, error, warning, and logging functionality. More... | |
class | ConsolePrivate |
class | Converter |
Convert from one version of SDF to another. More... | |
class | Cylinder |
Cylinder represents a cylinder shape, and is usually accessed through a Geometry. More... | |
class | Element |
SDF Element class. More... | |
class | ElementPrivate |
class | Error |
class | Exception |
Class for generating exceptions. More... | |
class | ExceptionPrivate |
class | Geometry |
Geometry provides access to a shape, such as a Box. More... | |
class | Gui |
class | Imu |
Imu contains information about an imu sensor. More... | |
class | Inertia |
A class for inertial information about a link. More... | |
class | InternalError |
Class for generating Internal Gazebo Errors: those errors which should never happend and represent programming bugs. More... | |
class | Joint |
class | JointAxis |
Parameters related to the axis of rotation for rotational joints, and the axis of translation for prismatic joints. More... | |
class | Lidar |
Lidar contains information about a Lidar sensor. More... | |
class | Light |
Provides a description of a light source. More... | |
class | Link |
class | Magnetometer |
Magnetometer contains information about a magnetometer sensor. More... | |
class | Material |
This class contains visual material properties. More... | |
class | Mesh |
Mesh represents a mesh shape, and is usually accessed through a Geometry. More... | |
class | Model |
class | Noise |
The Noise class contains information about a noise model, such as a Gaussian distribution. More... | |
class | Param |
A parameter class. More... | |
class | ParamPrivate |
struct | ParamStreamer |
class | Pbr |
This class provides access to Physically-Based-Rendering (PBR) material workflows. More... | |
class | PbrWorkflow |
This class contains Physically-Based-Rendering (PBR) workflow properties. More... | |
class | Physics |
The physics element specifies the type and properties of a dynamics engine. More... | |
class | Plane |
Plane represents a plane shape, and is usually accessed through a Geometry. More... | |
class | Root |
Root class that acts as an entry point to the SDF document model. More... | |
class | Scene |
class | SDF |
Base SDF class. More... | |
class | SDFExtension |
class | Sphere |
Sphere represents a sphere shape, and is usually accessed through a Geometry. More... | |
class | Time |
A Time class, can be used to hold wall- or sim-time. More... | |
class | URDF2SDF |
URDF to SDF converter. More... | |
class | Visual |
class | World |
Typedefs | |
typedef std::shared_ptr< Console > | ConsolePtr |
typedef std::shared_ptr< Element > | ElementPtr |
typedef std::vector< ElementPtr > | ElementPtr_V |
typedef std::weak_ptr< Element > | ElementWeakPtr |
using | Errors = std::vector< Error > |
A vector of Error. More... | |
typedef std::vector< ParamPtr > | Param_V |
typedef std::shared_ptr< Param > | ParamPtr |
typedef std::shared_ptr< SDF > | SDFPtr |
Functions | |
SDFORMAT_VISIBLE void | addNestedModel (ElementPtr _sdf, ElementPtr _includeSDF) |
SDFORMAT_VISIBLE void | addURIPath (const std::string &_uri, const std::string &_path) |
Associate paths to a URI. More... | |
SDFORMAT_VISIBLE bool | convertFile (const std::string &_filename, const std::string &_version, SDFPtr _sdf) |
Convert an SDF file to a specific SDF version. More... | |
SDFORMAT_VISIBLE bool | convertString (const std::string &_sdfString, const std::string &_version, SDFPtr _sdf) |
Convert an SDF string to a specific SDF version. More... | |
void | copyChildren (ElementPtr _sdf, TiXmlElement *_xml, const bool _onlyUnknown) |
Copy child XML elements into the _sdf element. More... | |
template<typename T > | |
bool | equal (const T &_a, const T &_b, const T &_epsilon=1e-6f) |
check if two values are equal, within a tolerance More... | |
SDFORMAT_VISIBLE std::string | findFile (const std::string &_filename, bool _searchLocalPath=true, bool _useCallback=false) |
Find the absolute path of a file. More... | |
std::string | getBestSupportedModelVersion (TiXmlElement *_modelXML, std::string &_modelFileName) |
Get the best SDF version from models supported by this sdformat. More... | |
SDFORMAT_VISIBLE std::string | getModelFilePath (const std::string &_modelDirPath) |
Get the file path to the model file. More... | |
SDFORMAT_VISIBLE bool | init (SDFPtr _sdf) |
Init based on the installed sdf_format.xml file. More... | |
bool | initDoc (TiXmlDocument *_xmlDoc, SDFPtr _sdf) |
Initialize the SDF interface using a TinyXML document. More... | |
bool | initDoc (TiXmlDocument *_xmlDoc, ElementPtr _sdf) |
Initialize and SDF Element using a TinyXML document. More... | |
SDFORMAT_VISIBLE bool | initFile (const std::string &_filename, SDFPtr _sdf) |
Initialize the SDF interface using a file. More... | |
SDFORMAT_VISIBLE bool | initFile (const std::string &_filename, ElementPtr _sdf) |
Initialize an SDFElement interface using a file. More... | |
SDFORMAT_VISIBLE bool | initString (const std::string &_xmlString, SDFPtr _sdf) |
Initialize the SDF interface using a string. More... | |
bool | initXml (TiXmlElement *_xml, ElementPtr _sdf) |
For internal use only. Do not use this function. More... | |
std::string SDFORMAT_VISIBLE | lowercase (const std::string &_in) |
Transforms a string to its lowercase equivalent. More... | |
template<class T > | |
std::ostream & | operator<< (std::ostream &os, ParamStreamer< T > s) |
template<class... Ts> | |
std::ostream & | operator<< (std::ostream &os, ParamStreamer< std::variant< Ts... >> sv) |
template<class T > | |
ParamStreamer (T) -> ParamStreamer< T > | |
bool | readDoc (TiXmlDocument *_xmlDoc, SDFPtr _sdf, const std::string &_source, bool _convert, Errors &_errors) |
Populate the SDF values from a TinyXML document. More... | |
bool | readDoc (TiXmlDocument *_xmlDoc, ElementPtr _sdf, const std::string &_source, bool _convert, Errors &_errors) |
SDFORMAT_VISIBLE sdf::SDFPtr | readFile (const std::string &_filename) |
Populate the SDF values from a file. More... | |
SDFORMAT_VISIBLE sdf::SDFPtr | readFile (const std::string &_filename, Errors &_errors) |
Populate the SDF values from a file. More... | |
SDFORMAT_VISIBLE bool | readFile (const std::string &_filename, SDFPtr _sdf, Errors &_errors) |
Populate the SDF values from a file. More... | |
SDFORMAT_VISIBLE bool | readFile (const std::string &_filename, SDFPtr _sdf) |
Populate the SDF values from a file. More... | |
SDFORMAT_VISIBLE bool | readString (const std::string &_xmlString, SDFPtr _sdf, Errors &_errors) |
Populate the SDF values from a string. More... | |
SDFORMAT_VISIBLE bool | readString (const std::string &_xmlString, SDFPtr _sdf) |
Populate the SDF values from a string. More... | |
SDFORMAT_VISIBLE bool | readString (const std::string &_xmlString, ElementPtr _sdf, Errors &_errors) |
Populate the SDF values from a string. More... | |
SDFORMAT_VISIBLE bool | readString (const std::string &_xmlString, ElementPtr _sdf) |
Populate the SDF values from a string. More... | |
bool | readXml (TiXmlElement *_xml, ElementPtr _sdf, Errors &_errors) |
For internal use only. More... | |
SDFORMAT_VISIBLE void | setFindCallback (std::function< std::string(const std::string &)> _cb) |
Set the callback to use when SDF can't find a file. More... | |
SDFORMAT_VISIBLE std::vector< std::string > | split (const std::string &_str, const std::string &_splitter) |
Split a string using the delimiter in splitter. More... | |
SDFORMAT_VISIBLE std::string | trim (const char *_in) |
Trim leading and trailing whitespace from a string. More... | |
Variables | |
class SDFORMAT_VISIBLE | Element |
class SDFORMAT_VISIBLE | Param |
class SDFORMAT_VISIBLE | SDF |
typedef std::shared_ptr<Element> sdf::v8::ElementPtr |
typedef std::vector<ElementPtr> sdf::v8::ElementPtr_V |
typedef std::weak_ptr<Element> sdf::v8::ElementWeakPtr |
using sdf::v8::Errors = typedef std::vector<Error> |
A vector of Error.
typedef std::vector<ParamPtr> sdf::v8::Param_V |
typedef std::shared_ptr<Param> sdf::v8::ParamPtr |
typedef std::shared_ptr<SDF> sdf::v8::SDFPtr |
|
strong |
|
strong |
Set of error codes.
Usually one or more errors are returned in an Errors vector. The collection of Errors should be take as a whole, where an error toward the beginning of the vector can inform errors toward the end of the vector.
Enumerator | |
---|---|
NONE | |
FILE_READ | Indicates that reading an SDF file failed. |
DUPLICATE_NAME | A duplicate name was found for an element where unique names are required. |
ATTRIBUTE_MISSING | Indicates that a required SDF attribute is missing. |
ATTRIBUTE_INVALID | This error indicates that an SDF attribute is invalid. |
ATTRIBUTE_DEPRECATED | This error indicates that an SDF attribute is deprecated. |
ELEMENT_MISSING | Indicates that a required SDF element is missing. |
ELEMENT_INVALID | This error indicates that an SDF element is invalid. |
ELEMENT_DEPRECATED | This error indicates that an SDF element is deprecated. |
ELEMENT_INCORRECT_TYPE | Indicates that an incorrect SDF element type was encountered. This error is used when an element of certain type is expected, and an element of a different type was received. |
URI_INVALID | A URI is invalid. |
URI_LOOKUP | A error occured while trying to resolve a URI. |
DIRECTORY_NONEXISTANT | A filesystem directory does not exist. |
LINK_INERTIA_INVALID | A link has invalid inertia. |
STRING_READ | Indicates that reading an SDF string failed. |
|
strong |
|
strong |
The set of joint types.
INVALID indicates that joint type has not been set, or has not been set correctly.
|
strong |
The set of light types.
INVALID indicates that light type has not been set, or has not been set correctly.
|
strong |
|
strong |
|
strong |
|
strong |
The set of pixel formats.
This list should match ignition::common::Image::PixelFormatType.
|
strong |
SDFORMAT_VISIBLE void sdf::v8::addNestedModel | ( | ElementPtr | _sdf, |
ElementPtr | _includeSDF | ||
) |
SDFORMAT_VISIBLE bool sdf::v8::convertFile | ( | const std::string & | _filename, |
const std::string & | _version, | ||
SDFPtr | _sdf | ||
) |
SDFORMAT_VISIBLE bool sdf::v8::convertString | ( | const std::string & | _sdfString, |
const std::string & | _version, | ||
SDFPtr | _sdf | ||
) |
void sdf::v8::copyChildren | ( | ElementPtr | _sdf, |
TiXmlElement * | _xml, | ||
const bool | _onlyUnknown | ||
) |
|
inline |
check if two values are equal, within a tolerance
[in] | _a | the first value |
[in] | _b | the second value |
[in] | _epsilon | the tolerance |
Referenced by sdf::v8::Color::operator==().
std::string sdf::v8::getBestSupportedModelVersion | ( | TiXmlElement * | _modelXML, |
std::string & | _modelFileName | ||
) |
SDFORMAT_VISIBLE std::string sdf::v8::getModelFilePath | ( | const std::string & | _modelDirPath | ) |
Get the file path to the model file.
[in] | _modelDirPath | directory system path of the model |
SDFORMAT_VISIBLE bool sdf::v8::init | ( | SDFPtr | _sdf | ) |
Init based on the installed sdf_format.xml file.
bool sdf::v8::initDoc | ( | TiXmlDocument * | _xmlDoc, |
SDFPtr | _sdf | ||
) |
Initialize the SDF interface using a TinyXML document.
bool sdf::v8::initDoc | ( | TiXmlDocument * | _xmlDoc, |
ElementPtr | _sdf | ||
) |
SDFORMAT_VISIBLE bool sdf::v8::initFile | ( | const std::string & | _filename, |
SDFPtr | _sdf | ||
) |
Initialize the SDF interface using a file.
SDFORMAT_VISIBLE bool sdf::v8::initFile | ( | const std::string & | _filename, |
ElementPtr | _sdf | ||
) |
Initialize an SDFElement interface using a file.
SDFORMAT_VISIBLE bool sdf::v8::initString | ( | const std::string & | _xmlString, |
SDFPtr | _sdf | ||
) |
Initialize the SDF interface using a string.
bool sdf::v8::initXml | ( | TiXmlElement * | _xml, |
ElementPtr | _sdf | ||
) |
For internal use only. Do not use this function.
std::string SDFORMAT_VISIBLE sdf::v8::lowercase | ( | const std::string & | _in | ) |
Transforms a string to its lowercase equivalent.
[in] | _in | String to convert to lowercase |
std::ostream& sdf::v8::operator<< | ( | std::ostream & | os, |
ParamStreamer< T > | s | ||
) |
References sdf::v8::ParamStreamer< T >::val.
Referenced by sdf::v8::Console::ConsoleStream::ConsoleStream().
std::ostream& sdf::v8::operator<< | ( | std::ostream & | os, |
ParamStreamer< std::variant< Ts... >> | sv | ||
) |
References sdf::v8::ParamStreamer< T >::val.
sdf::v8::ParamStreamer | ( | T | ) | -> ParamStreamer< T > |
bool sdf::v8::readDoc | ( | TiXmlDocument * | _xmlDoc, |
SDFPtr | _sdf, | ||
const std::string & | _source, | ||
bool | _convert, | ||
Errors & | _errors | ||
) |
Populate the SDF values from a TinyXML document.
bool sdf::v8::readDoc | ( | TiXmlDocument * | _xmlDoc, |
ElementPtr | _sdf, | ||
const std::string & | _source, | ||
bool | _convert, | ||
Errors & | _errors | ||
) |
SDFORMAT_VISIBLE sdf::SDFPtr sdf::v8::readFile | ( | const std::string & | _filename | ) |
SDFORMAT_VISIBLE sdf::SDFPtr sdf::v8::readFile | ( | const std::string & | _filename, |
Errors & | _errors | ||
) |
SDFORMAT_VISIBLE bool sdf::v8::readFile | ( | const std::string & | _filename, |
SDFPtr | _sdf, | ||
Errors & | _errors | ||
) |
Populate the SDF values from a file.
This populates the given sdf pointer from a file. If the file is a URDF file it is converted to SDF first. All files are converted to the latest SDF version
[in] | _filename | Name of the SDF file |
[in] | _sdf | Pointer to an SDF object. |
[out] | _errors | Parsing errors will be appended to this variable. |
SDFORMAT_VISIBLE bool sdf::v8::readFile | ( | const std::string & | _filename, |
SDFPtr | _sdf | ||
) |
SDFORMAT_VISIBLE bool sdf::v8::readString | ( | const std::string & | _xmlString, |
SDFPtr | _sdf, | ||
Errors & | _errors | ||
) |
SDFORMAT_VISIBLE bool sdf::v8::readString | ( | const std::string & | _xmlString, |
SDFPtr | _sdf | ||
) |
SDFORMAT_VISIBLE bool sdf::v8::readString | ( | const std::string & | _xmlString, |
ElementPtr | _sdf, | ||
Errors & | _errors | ||
) |
SDFORMAT_VISIBLE bool sdf::v8::readString | ( | const std::string & | _xmlString, |
ElementPtr | _sdf | ||
) |
bool sdf::v8::readXml | ( | TiXmlElement * | _xml, |
ElementPtr | _sdf, | ||
Errors & | _errors | ||
) |
For internal use only.
Do not use this function.
[in] | _xml | Pointer to the XML document |
[in,out] | _sdf | SDF pointer to parse data into. |
[out] | _errors | Captures errors found during parsing. |
SDFORMAT_VISIBLE std::vector<std::string> sdf::v8::split | ( | const std::string & | _str, |
const std::string & | _splitter | ||
) |
Split a string using the delimiter in splitter.
[in] | str | The string to split. |
[in] | splitter | The delimiter to use. |
SDFORMAT_VISIBLE std::string sdf::v8::trim | ( | const char * | _in | ) |
Trim leading and trailing whitespace from a string.
[in] | _in | The string to trim. |
class SDFORMAT_VISIBLE sdf::v8::SDF |