mc_rtc Namespace Reference

Namespaces

 constants
 
 details
 
 gui
 
 internal
 
 io
 
 log
 
 schema
 
 utils
 

Classes

struct  Configuration
 Simplify access to values hold within a JSON file. More...
 
struct  ConfigurationArrayIterator
 
struct  ConfigurationFile
 Configuration object that keeps track of the file it comes from More...
 
struct  ConfigurationLoader
 
struct  ConfigurationLoader< mc_control::Contact >
 
struct  ConfigurationLoader< mc_rbdyn::CompoundJointConstraintDescription >
 
struct  ConfigurationLoader< mc_rbdyn::Contact >
 
struct  ConfigurationLoader< mc_rbdyn::lipm_stabilizer::DCMBiasEstimatorConfiguration >
 Read DCMBias estimation parameters. More...
 
struct  ConfigurationLoader< mc_rbdyn::lipm_stabilizer::ExternalWrenchConfiguration >
 Read parameters for the external wrenches. More...
 
struct  ConfigurationLoader< mc_rbdyn::lipm_stabilizer::FDMPCWeights >
 Read CoP distribution over horizon QP weights from configuration. More...
 
struct  ConfigurationLoader< mc_rbdyn::lipm_stabilizer::FDQPWeights >
 Read force distribution QP weights from configuration. More...
 
struct  ConfigurationLoader< mc_rbdyn::lipm_stabilizer::SafetyThresholds >
 Read-write stabilizer safety thresholds from configuration. More...
 
struct  ConfigurationLoader< mc_rbdyn::lipm_stabilizer::StabilizerConfiguration >
 
struct  ConfigurationLoader< mc_rbdyn::lipm_stabilizer::ZMPCCConfiguration >
 Read force distribution QP weights from configuration. More...
 
struct  ConfigurationLoader< mc_rbdyn::RobotModule >
 
struct  ConfigurationLoader< mc_rbdyn::RobotModulePtr >
 
struct  ConfigurationLoader< mc_rtc::gui::ArrowConfig >
 
struct  ConfigurationLoader< mc_rtc::gui::Color >
 
struct  ConfigurationLoader< mc_rtc::gui::ForceConfig >
 
struct  ConfigurationLoader< mc_rtc::gui::LineConfig >
 
struct  ConfigurationLoader< mc_rtc::gui::PointConfig >
 
struct  ConfigurationLoader< mc_rtc::gui::PolyhedronConfig >
 
struct  ConfigurationLoader< mc_tasks::force::ImpedanceGains >
 
struct  ConfigurationLoader< mc_tasks::lipm_stabilizer::ContactState >
 
struct  ConfigurationLoader< void >
 
struct  DataStore
 Generic data store. More...
 
struct  Default
 
struct  Default< std::string >
 
struct  Default< std::variant< T, Others... > >
 
struct  Default< sva::AdmittanceVecd >
 
struct  Default< sva::ForceVecd >
 
struct  Default< sva::ImpedanceVecd >
 
struct  Default< sva::MotionVecd >
 
struct  Default< sva::PTransformd >
 
struct  Default< T, std::enable_if_t< schema::details::is_schema_v< T > > >
 
struct  Default< T, std::enable_if_t< schema::details::is_std_vector_v< T > > >
 
struct  Default< T, std::enable_if_t< std::is_arithmetic_v< T > > >
 
struct  Default< T, typename std::enable_if_t< schema::details::is_std_map_v< T > > >
 
struct  enable_if_t<(N > 0)> >
 
struct  enable_if_t<(N > 1)> >
 
class  Loader
 General wrapper for ltdl functionnalities. More...
 
class  LoaderException
 Exception thrown by loader interface. More...
 
struct  Logger
 Logs controller data to disk. More...
 
class  LTDLHandle
 Wrapper around lt_dlhandle. More...
 
class  LTDLMutex
 Holds a global mutex for all LTDL operations. More...
 
struct  MessagePackBuilder
 
class  ObjectLoader
 ltdl wrapper for factory-like classes More...
 
struct  RobotPublisher
 This structure is able to publish a Robot's state to ROS. More...
 
struct  ROSBridge
 Allows to access ROS functionalities within mc_rtc without explicit ROS dependencies. More...
 
struct  shared
 
struct  SharedPtrVectorConstIterator
 
struct  SharedPtrVectorIterator
 
class  unique_ptr
 
struct  void_ptr_caster
 

Typedefs

using duration_ms = std::chrono::duration< double, std::milli >
 
using duration_us = std::chrono::duration< double, std::micro >
 
using clock = typename std::conditional< std::chrono::high_resolution_clock::is_steady, std::chrono::high_resolution_clock, std::chrono::steady_clock >::type
 
using LTDLHandlePtr = std::shared_ptr< LTDLHandle >
 
using void_ptr = std::unique_ptr< void, void(*)(void *)>
 
using NodeHandlePtr = std::shared_ptr< ros::NodeHandle >
 

Functions

template<typename T >
std::vector< T > fromVectorOrElement (const mc_rtc::Configuration &config, const std::string &key, const std::vector< T > &defaultVec)
 
template<typename T >
std::vector< T > fromVectorOrElement (const mc_rtc::Configuration &config, const std::string &key)
 
bool MC_RTC_UTILS_DLLAPI debug () noexcept
 
MC_RTC_UTILS_DLLAPI std::string temp_directory_path (const std::string &suffix="")
 
MC_RTC_UTILS_DLLAPI std::string user_config_directory_path (const std::string &suffix="")
 
template<typename T >
std::string type_name ()
 
rbd::parsers::Visual makeVisualSphere (double radius, const mc_rtc::gui::Color &color)
 
rbd::parsers::Visual makeVisualCylinder (double radius, double length, const mc_rtc::gui::Color &color)
 
rbd::parsers::Visual makeVisualBox (const Eigen::Vector3d &dim, const mc_rtc::gui::Color &color)
 
rbd::parsers::Visual makeVisualMesh (const std::string &path, Eigen::Vector3d scaleV)
 
rbd::parsers::Visual makeVisualMesh (const std::string &path, double scale)
 
rbd::parsers::Visual makeVisualSuperellispoid (const Eigen::Vector3d &size, double epsilon1, double epsilon2, const mc_rtc::gui::Color &color)
 
template<typename T , typename... Args>
void_ptr make_void_ptr (Args &&... args)
 
template<typename T >
void_ptr make_void_ptr (std::unique_ptr< T > ptr)
 

Variables

struct MC_RTC_UTILS_DLLAPI ConfigurationArrayIterator
 
struct MC_RTC_UTILS_DLLAPI Configuration
 
constexpr auto OUT_NONE = "\033[00m"
 
constexpr auto OUT_BLUE = "\033[01;34m"
 
constexpr auto OUT_GREEN = "\033[01;32m"
 
constexpr auto OUT_PURPLE = "\033[01;35m"
 
constexpr auto OUT_RED = "\033[01;31m"
 
constexpr auto getVisualSphere = details::getVisualGeometry<rbd::parsers::Geometry::Type::SPHERE>
 
constexpr auto getVisualCylinder = details::getVisualGeometry<rbd::parsers::Geometry::Type::CYLINDER>
 
constexpr auto getVisualBox = details::getVisualGeometry<rbd::parsers::Geometry::Type::BOX>
 
constexpr auto getVisualMesh = details::getVisualGeometry<rbd::parsers::Geometry::Type::MESH>
 
constexpr auto getVisualSuperellipsoid
 

Detailed Description

Interface used to load observers

This file holds all mc_rtc::Configuration based serialization operation for mc_rbdyn objects

Helper functions to emit deprecation messages when loading JSON/YAML from old versions

This header contains the base block of all elements in the GUI system. For the implementation details of specific elements look into their dedicated header

This file contains classes that are used to configure the visual styles of various elements in the GUI

This header defines a number of utility functions related to forming path in the environment

They are thin wrapper around boost::filesystem to be later replaced by std::filesystem after Ubuntu 18.04 support is fully dropped

This header provides a number of function to help with the creation of rbd::parsers::Visual elements

Helpers for unique_ptr<void, void (*)(void *)>

Typedef Documentation

◆ clock

using mc_rtc::clock = typedef typename std::conditional<std::chrono::high_resolution_clock::is_steady, std::chrono::high_resolution_clock, std::chrono::steady_clock>::type

mc_rtc::clock is a clock that is always steady and thus suitable for performance measurements

◆ duration_ms

using mc_rtc::duration_ms = typedef std::chrono::duration<double, std::milli>

◆ duration_us

using mc_rtc::duration_us = typedef std::chrono::duration<double, std::micro>

◆ LTDLHandlePtr

using mc_rtc::LTDLHandlePtr = typedef std::shared_ptr<LTDLHandle>

◆ NodeHandlePtr

using mc_rtc::NodeHandlePtr = typedef std::shared_ptr<ros::NodeHandle>

◆ void_ptr

using mc_rtc::void_ptr = typedef std::unique_ptr<void, void (*)(void *)>

Function Documentation

◆ debug()

bool MC_RTC_UTILS_DLLAPI mc_rtc::debug ( )
noexcept

Returns true if mc_rtc was compiled in debug mode

◆ fromVectorOrElement() [1/2]

template<typename T >
std::vector<T> mc_rtc::fromVectorOrElement ( const mc_rtc::Configuration config,
const std::string &  key 
)

Attempts to convert a read a vector or single element as a vector

Variant of fromVectorOrElement(const mc_rtc::Configuration & config, const std::string & key, const std::vector<T> & defaultVec)

Exceptions
mc_rtc::Configuration::ExceptionIf the key is not found or the configuration is neither convertible as std::vector<T> or T.

◆ fromVectorOrElement() [2/2]

template<typename T >
std::vector<T> mc_rtc::fromVectorOrElement ( const mc_rtc::Configuration config,
const std::string &  key,
const std::vector< T > &  defaultVec 
)

Attempts to convert a read a vector or single element as a vector, use default value if it fails.

Example:

configVector: ["String1", "String2"]
configString: "String"

The following are valid

auto conf = mc_rtc::Configuration{};
conf.add("configVector", {"String1", "String2"})
conf.add("configString", "String1");
auto v1 = fromVectorOrElement<std::string>(conf("configVector"));
auto v2 = fromVectorOrElement<std::string>(conf("configString"));
Template Parameters
TType of the element to convert toward
Parameters
configConfiguration object from which to convert. This should contain either a vector of elements convertible to T ([T, T, ...]) or a single T element.
keyName of the element to read
Returns
Vector containing all elements in the configuration vector or the single item. If it fails, return defaultVec.

◆ make_void_ptr() [1/2]

template<typename T , typename... Args>
void_ptr mc_rtc::make_void_ptr ( Args &&...  args)

Creates a new void_ptr holding an object of type T

◆ make_void_ptr() [2/2]

template<typename T >
void_ptr mc_rtc::make_void_ptr ( std::unique_ptr< T >  ptr)

Transfer ownership of a unique_ptr<T> to a void_ptr

◆ makeVisualBox()

rbd::parsers::Visual mc_rtc::makeVisualBox ( const Eigen::Vector3d &  dim,
const mc_rtc::gui::Color color 
)
inline

Returns a new Visual that holds a Box object

◆ makeVisualCylinder()

rbd::parsers::Visual mc_rtc::makeVisualCylinder ( double  radius,
double  length,
const mc_rtc::gui::Color color 
)
inline

Returns a new Visual that holds a Cylinder object

◆ makeVisualMesh() [1/2]

rbd::parsers::Visual mc_rtc::makeVisualMesh ( const std::string &  path,
double  scale 
)
inline

Returns a new Visual that holds a Mesh object

◆ makeVisualMesh() [2/2]

rbd::parsers::Visual mc_rtc::makeVisualMesh ( const std::string &  path,
Eigen::Vector3d  scaleV 
)
inline

Returns a new Visual that holds a Mesh object

◆ makeVisualSphere()

rbd::parsers::Visual mc_rtc::makeVisualSphere ( double  radius,
const mc_rtc::gui::Color color 
)
inline

Returns a new Visual that holds a Sphere object

◆ makeVisualSuperellispoid()

rbd::parsers::Visual mc_rtc::makeVisualSuperellispoid ( const Eigen::Vector3d &  size,
double  epsilon1,
double  epsilon2,
const mc_rtc::gui::Color color 
)
inline

Returns a new Visual that holds a Superellipsoid object

◆ temp_directory_path()

MC_RTC_UTILS_DLLAPI std::string mc_rtc::temp_directory_path ( const std::string &  suffix = "")

Returns the path to the OS temporary directory

Parameters
suffixAdded (with a path separator) to the returned path

◆ type_name()

template<typename T >
std::string mc_rtc::type_name ( )

Return a human-readable type name

Only use for displaying messages as the name is not guaranteed to be the same across compilers and invokation

◆ user_config_directory_path()

MC_RTC_UTILS_DLLAPI std::string mc_rtc::user_config_directory_path ( const std::string &  suffix = "")

Returns the path to the user's config directory

On Linux/macOS this returns ${HOME}/.config/mc_rtc folder

On Windows this returns the APPDATA%/mc_rtc folder

Parameters
suffixAdded (with a path separator) to the returned path

Variable Documentation

◆ Configuration

◆ ConfigurationArrayIterator

◆ getVisualBox

constexpr auto mc_rtc::getVisualBox = details::getVisualGeometry<rbd::parsers::Geometry::Type::BOX>
inlineconstexpr

Get the box data if the visual is a box, throws otherwise

◆ getVisualCylinder

constexpr auto mc_rtc::getVisualCylinder = details::getVisualGeometry<rbd::parsers::Geometry::Type::CYLINDER>
inlineconstexpr

Get the cylinder data if the visual is a cylinder, throws otherwise

◆ getVisualMesh

constexpr auto mc_rtc::getVisualMesh = details::getVisualGeometry<rbd::parsers::Geometry::Type::MESH>
inlineconstexpr

Get the mesh data if the visual is a mesh, throws otherwise

◆ getVisualSphere

constexpr auto mc_rtc::getVisualSphere = details::getVisualGeometry<rbd::parsers::Geometry::Type::SPHERE>
inlineconstexpr

Get the sphere data if the visual is a sphere, throws otherwise

◆ getVisualSuperellipsoid

constexpr auto mc_rtc::getVisualSuperellipsoid
inlineconstexpr
Initial value:
=
details::getVisualGeometry<rbd::parsers::Geometry::Type::SUPERELLIPSOID>

Get the superellipsoid data if the visual is a superellipsoid, throws otherwise

◆ OUT_BLUE

constexpr auto mc_rtc::OUT_BLUE = "\033[01;34m"
constexpr

◆ OUT_GREEN

constexpr auto mc_rtc::OUT_GREEN = "\033[01;32m"
constexpr

◆ OUT_NONE

constexpr auto mc_rtc::OUT_NONE = "\033[00m"
constexpr

◆ OUT_PURPLE

constexpr auto mc_rtc::OUT_PURPLE = "\033[01;35m"
constexpr

◆ OUT_RED

constexpr auto mc_rtc::OUT_RED = "\033[01;31m"
constexpr
mc_rtc::Configuration
Simplify access to values hold within a JSON file.
Definition: Configuration.h:165
mc_rtc::Configuration::add
void add(const std::string &key, bool value)
Add a bool element to the Configuration.