mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
Loading...
Searching...
No Matches
mrs_lib Namespace Reference

All mrs_lib functions, classes, variables and definitions are contained in this namespace. More...

Classes

class  AtomicScopeFlag
 Convenience class for automatically setting and unsetting an atomic boolean based on the object's scope. Useful e.g. for indicating whether a thread is running or not. More...
 
class  AttitudeConverter
 The main convertor class. Instantiate with any type in constructor and get the value in any other type by assigning the instance to your variable, as: tf2::Quaternion tf2_quaternion = AttitudeConverter(roll, pitch, yaw); All the default Euler angles are in the extrinsic RPY notation. More...
 
class  BatchVisualizer
 library for drawing large amounts of geometric objects in RVIZ at the same time More...
 
class  DKF
 Implementation of the Degenerate measurement Linear Kalman filter. More...
 
class  DynparamMgr
 Convenience class for managing dynamic ROS parameters. More...
 
class  EulerAttitude
 A small class for storing the Euler angles. More...
 
class  IirFilter
 
class  KalmanFilter
 This abstract class defines common interfaces and types for a generic Kalman filter. More...
 
class  LKF
 Implementation of the Linear Kalman filter [2]. More...
 
class  LKF_MRS_odom
 
class  Lockable
 Convenience class for safe and expressive management of mutexed variables. More...
 
class  MedianFilter
 Implementation of a median filter with a fixed-length buffer. More...
 
class  MRSTimer
 Common wrapper representing the functionality of the rclcpp::Timer. More...
 
class  NCLKF
 This class implements the norm-constrained linear Kalman filter [4]. More...
 
class  NCLKF_partial
 This class implements the partially norm-constrained linear Kalman filter [4]. More...
 
class  NCUKF
 
class  NotchFilter
 
class  ParamLoader
 Convenience class for loading parameters from rosparam server. More...
 
class  ParamProvider
 Helper class for ParamLoader and DynparamMgr. More...
 
class  Profiler
 
class  PublisherHandler
 user wrapper of the publisher handler implementation More...
 
class  PublisherHandler_impl
 implementation of the publisher handler More...
 
struct  PublisherHandlerOptions
 
class  Repredictor
 Implementation of the Repredictor for fusing measurements with variable delays. More...
 
class  ROSTimer
 rclcpp::Timer wrapper. The interface is the same as with rclcpp::Timer, except for the initialization method. More...
 
class  Routine
 
class  ScopeTimer
 Simple timer which will time a duration of a scope and checkpoints inside the scope in ros time and std::chrono time. More...
 
class  ScopeTimerLogger
 Simple file logger of scope timer and its checkpoints. More...
 
class  ServiceClientHandler
 user wrapper of the service client handler implementation More...
 
class  ServiceServerHandler
 user wrapper of the service client handler implementation More...
 
class  SubscriberHandler
 The main class for ROS topic subscription, message timeout handling etc. More...
 
struct  SubscriberHandlerOptions
 A helper class to simplify setup of SubscriberHandler construction. This class is passed to the SubscriberHandler constructor and specifies its common options. More...
 
class  ThreadTimer
 Custom thread-based Timers with the same interface as mrs_lib::ROSTimer. More...
 
class  TimeoutManager
 
struct  TimerHandlerOptions
 
class  TransformBroadcaster
 Wrapper for the tf2_ros::TransformBroadcaster. With each sendTransform() command, the message is checked against the last message with the same frame IDs. If the transform was already published in this ros::Time step, then the transform is skipped. Prevents endless stream of warnings from spamming the console output. More...
 
class  Transformer
 A convenience wrapper class for ROS's native TF2 API to simplify transforming of various messages. More...
 
class  UKF
 Implementation of the Unscented Kalman filter [3]. More...
 
class  Unlocker
 Convenience class for RAII-style access to a varible within a Lockable object. More...
 
class  varstepLKF
 
class  Vector3Converter
 Converter of Vector3 representations. Instantiate it with any type of vector3 in constructor and convert it by assigning it to any other type of vector3 variable. More...
 
class  VisualObject
 

Concepts

concept  numeric
 Convenience concept of a numeric value (i.e. either integral or floating point, and not bool).
 

Typedefs

template<typename SubscriberHandler >
using message_type = typename SubscriberHandler::message_type
 Helper alias for convenient extraction of handled message type from a SubscribeHandlerPtr.
 
using lkf_t = LKF< n_states, n_inputs, n_measurements >
 
using rep_t = Repredictor< lkf_t >
 
using dumbrep_t = Repredictor< lkf_t, true >
 
using ukf_t = UKF< n_states, n_inputs, n_measurements >
 

Enumerations

enum  RPY_convention_t { RPY_INTRINSIC = 1 , RPY_EXTRINSIC = 2 }
 
enum  MarkerType { POINT = 0 , LINE = 1 , TRIANGLE = 2 }
 

Functions

template<typename T >
std::ostream & operator<< (std::ostream &os, const Eigen::MatrixX< T > &var)
 Helper overload for printing of Eigen matrices.
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const std::vector< T > &var)
 Helper overload for printing of std::vectors.
 
template<typename Key , typename Value >
std::ostream & operator<< (std::ostream &os, const std::map< Key, Value > &var)
 Helper overload for printing of std::maps.
 
template<typename T >
rclcpp::ParameterType to_param_type ()
 Convenince function to get the corresponding rclcpp::ParamType from a C++ type.
 
double probit (const double quantile)
 Inverse cumulative distribution function of the standard normal probability distribution.
 
std::tuple< double, double, double > getXYZ (const geometry_msgs::msg::Point &data)
 get XYZ from geometry_msgs::msg::Point
 
std::tuple< double, double, double > getXYZ (const geometry_msgs::msg::Point::SharedPtr &data)
 get XYZ from geometry_msgs::msg::Point
 
std::tuple< double, double, double > getXYZ (const geometry_msgs::msg::Point::ConstSharedPtr &data)
 get XYZ from geometry_msgs::msg::Point
 
std::tuple< double, double, double > getXYZ (const geometry_msgs::msg::Vector3 &data)
 get XYZ from geometry_msgs::msg::Vector3
 
std::tuple< double, double, double > getXYZ (const geometry_msgs::msg::Vector3::SharedPtr &data)
 get XYZ from geometry_msgs::msg::Vector3::SharedPtr
 
std::tuple< double, double, double > getXYZ (const geometry_msgs::msg::Vector3::ConstSharedPtr &data)
 get XYZ from geometry_msgs::msg::Vector3::ConstSharedPtr
 
std::tuple< double, double, double > getPosition (const geometry_msgs::msg::Pose &data)
 get position from geometry_msgs::msg::Pose
 
std::tuple< double, double, double > getPosition (const geometry_msgs::msg::Pose::SharedPtr &data)
 get position from geometry_msgs::msg::Pose::SharedPtr
 
std::tuple< double, double, double > getPosition (const geometry_msgs::msg::Pose::ConstSharedPtr &data)
 get position from geometry_msgs::msg::Pose::ConstSharedPtr
 
double getHeading (const geometry_msgs::msg::Pose &data)
 get heading from geometry_msgs::msg::Pose
 
double getHeading (const geometry_msgs::msg::Pose::SharedPtr &data)
 get heading from geometry_msgs::msg::Pose::SharedPtr
 
double getHeading (const geometry_msgs::msg::Pose::ConstSharedPtr &data)
 get heading from geometry_msgs::msg::Pose::ConstSharedPtr
 
double getYaw (const geometry_msgs::msg::Pose &data)
 get yaw from geometry_msgs::msg::Pose
 
double getYaw (const geometry_msgs::msg::Pose::SharedPtr &data)
 get yaw from geometry_msgs::msg::Pose::SharedPtr
 
double getYaw (const geometry_msgs::msg::Pose::ConstSharedPtr &data)
 get yaw from geometry_msgs::msg::Pose::ConstSharedPtr
 
std::tuple< double, double, double > getPosition (const geometry_msgs::msg::PoseWithCovariance &data)
 get position from geometry_msgs::msg::PoseWithCovariance
 
std::tuple< double, double, double > getPosition (const geometry_msgs::msg::PoseWithCovariance::SharedPtr &data)
 get position from geometry_msgs::msg::PoseWithCovariance::SharedPtr
 
std::tuple< double, double, double > getPosition (const geometry_msgs::msg::PoseWithCovariance::ConstSharedPtr &data)
 get position from geometry_msgs::msg::PoseWithCovariance::ConstSharedPtr
 
double getHeading (const geometry_msgs::msg::PoseWithCovariance &data)
 get heading from geometry_msgs::msg::PoseWithCovariance
 
double getHeading (const geometry_msgs::msg::PoseWithCovariance::SharedPtr &data)
 get heading from geometry_msgs::msg::PoseWithCovariance::SharedPtr
 
double getHeading (const geometry_msgs::msg::PoseWithCovariance::ConstSharedPtr &data)
 get heading from geometry_msgs::msg::PoseWithCovariance::ConstSharedPtr
 
double getYaw (const geometry_msgs::msg::PoseWithCovariance &data)
 get yaw from geometry_msgs::msg::PoseWithCovariance
 
double getYaw (const geometry_msgs::msg::PoseWithCovariance::SharedPtr &data)
 get yaw from geometry_msgs::msg::PoseWithCovariance::SharedPtr
 
double getYaw (const geometry_msgs::msg::PoseWithCovariance::ConstSharedPtr &data)
 get yaw from geometry_msgs::msg::PoseWithCovariance::ConstSharedPtr
 
std::tuple< double, double, double > getVelocity (const geometry_msgs::msg::Twist &data)
 get velocity from geometry_msgs::msg::Twist
 
std::tuple< double, double, double > getVelocity (const geometry_msgs::msg::Twist::SharedPtr &data)
 get position from geometry_msgs::msg::Twist::SharedPtr
 
std::tuple< double, double, double > getVelocity (const geometry_msgs::msg::Twist::ConstSharedPtr &data)
 get position from geometry_msgs::msg::Twist::ConstSharedPtr
 
std::tuple< double, double, double > getVelocity (const geometry_msgs::msg::TwistWithCovariance &data)
 get velocity from geometry_msgs::msg::TwistWithCovariance
 
std::tuple< double, double, double > getVelocity (const geometry_msgs::msg::TwistWithCovariance::SharedPtr &data)
 get position from geometry_msgs::msg::TwistWithCovariance::SharedPtr
 
std::tuple< double, double, double > getVelocity (const geometry_msgs::msg::TwistWithCovariance::ConstSharedPtr &data)
 get position from geometry_msgs::msg::TwistWithCovariance::ConstSharedPtr
 
std::tuple< double, double, double > getPosition (const nav_msgs::msg::Odometry &data)
 get position from nav_msgs::msg::Odometry
 
std::tuple< double, double, double > getPosition (const nav_msgs::msg::Odometry::SharedPtr &data)
 get position from nav_msgs::msg::Odometry::SharedPtr
 
std::tuple< double, double, double > getPosition (const nav_msgs::msg::Odometry::ConstSharedPtr &data)
 get position from nav_msgs::msg::Odometry::ConstSharedPtr
 
std::tuple< double, double, double > getVelocity (const nav_msgs::msg::Odometry &data)
 get position from nav_msgs::msg::Odometry
 
std::tuple< double, double, double > getVelocity (const nav_msgs::msg::Odometry::SharedPtr &data)
 get velocity from nav_msgs::msg::Odometry::SharedPtr
 
std::tuple< double, double, double > getVelocity (const nav_msgs::msg::Odometry::ConstSharedPtr &data)
 get velocity from nav_msgs::msg::Odometry::ConstSharedPtr
 
double getHeading (const nav_msgs::msg::Odometry &data)
 get heading from nav_msgs::msg::Odometry
 
double getHeading (const nav_msgs::msg::Odometry::SharedPtr &data)
 get heading from nav_msgs::msg::Odometry::SharedPtr
 
double getHeading (const nav_msgs::msg::Odometry::ConstSharedPtr &data)
 get heading from nav_msgs::msg::Odometry::ConstSharedPtr
 
double getYaw (const nav_msgs::msg::Odometry &data)
 get yaw from nav_msgs::msg::Odometry
 
double getYaw (const nav_msgs::msg::Odometry::SharedPtr &data)
 get yaw from nav_msgs::msg::Odometry::SharedPtr
 
double getYaw (const nav_msgs::msg::Odometry::ConstSharedPtr &data)
 get yaw from nav_msgs::msg::Odometry::ConstSharedPtr
 
geometry_msgs::msg::Pose getPose (const nav_msgs::msg::Odometry &data)
 returns the Pose part of the nav_msgs::msg::Odometry message
 
geometry_msgs::msg::Pose getPose (const nav_msgs::msg::Odometry::SharedPtr &data)
 returns the Pose part of the nav_msgs::msg::Odometry::SharedPtr message
 
geometry_msgs::msg::Pose getPose (const nav_msgs::msg::Odometry::ConstSharedPtr &data)
 returns the Pose part of the nav_msgs::msg::Odometry::ConstSharedPtr message
 
std::tuple< double, double, double > getPosition (const mrs_msgs::msg::TrackerCommand &data)
 get position data from mrs_msgs::msg::TrackerCommand
 
std::tuple< double, double, double > getPosition (const mrs_msgs::msg::TrackerCommand::SharedPtr &data)
 get position data from mrs_msgs::msg::TrackerCommandSharedPtr
 
std::tuple< double, double, double > getPosition (const mrs_msgs::msg::TrackerCommand::ConstSharedPtr &data)
 get position data from mrs_msgs::msg::TrackerCommand::SharedPtr
 
std::tuple< double, double, double > getVelocity (const mrs_msgs::msg::TrackerCommand &data)
 get velocity data from mrs_msgs::msg::TrackerCommand
 
std::tuple< double, double, double > getVelocity (const mrs_msgs::msg::TrackerCommand::SharedPtr &data)
 get velocity data from mrs_msgs::msg::TrackerCommand::SharedPtr
 
std::tuple< double, double, double > getVelocity (const mrs_msgs::msg::TrackerCommand::ConstSharedPtr &data)
 get velocity data from mrs_msgs::msg::TrackerCommand::ConstSharedPtr
 
double getHeading (const mrs_msgs::msg::TrackerCommand &data)
 get heading from mrs_msgs::msg::TrackerCommand
 
double getHeading (const mrs_msgs::msg::TrackerCommand::SharedPtr &data)
 get heading from mrs_msgs::msg::TrackerCommand::SharedPtr
 
double getHeading (const mrs_msgs::msg::TrackerCommand::ConstSharedPtr &data)
 get heading from mrs_msgs::msg::TrackerCommand::ConstSharedPtr
 
std::tuple< double, double, double > getPosition (const mrs_msgs::msg::Reference &data)
 get position from mrs_msgs::msg::Reference
 
std::tuple< double, double, double > getPosition (const mrs_msgs::msg::Reference::SharedPtr &data)
 get position from mrs_msgs::msg::Reference::SharedPtr
 
std::tuple< double, double, double > getPosition (const mrs_msgs::msg::Reference::ConstSharedPtr &data)
 get position from mrs_msgs::msg::Reference::ConstSharedPtr
 
double getHeading (const mrs_msgs::msg::Reference &data)
 get heading from mrs_msgs::msg::Reference
 
double getHeading (const mrs_msgs::msg::Reference::SharedPtr &data)
 get heading from mrs_msgs::msg::ReferenceSharedPtr
 
double getHeading (const mrs_msgs::msg::Reference::ConstSharedPtr &data)
 get heading from mrs_msgs::msg::ReferenceConstSharedPtr
 
std::tuple< double, double, double > getPosition (const mrs_msgs::msg::ReferenceStamped &data)
 get position from mrs_msgs::msg::ReferenceStamped
 
std::tuple< double, double, double > getPosition (const mrs_msgs::msg::ReferenceStamped::SharedPtr &data)
 get position from mrs_msgs::msg::ReferenceStamped::SharedPtr
 
std::tuple< double, double, double > getPosition (const mrs_msgs::msg::ReferenceStamped::ConstSharedPtr &data)
 get position from mrs_msgs::msg::ReferenceStamped::ConstSharedPtr
 
double getHeading (const mrs_msgs::msg::ReferenceStamped &data)
 get heading from mrs_msgs::msg::ReferenceStamped
 
double getHeading (const mrs_msgs::msg::ReferenceStamped::SharedPtr &data)
 get heading from mrs_msgs::msg::ReferenceStamped::SharedPtr
 
double getHeading (const mrs_msgs::msg::ReferenceStamped::ConstSharedPtr &data)
 get heading from mrs_msgs::msg::ReferenceStamped::ConstSharedPtr
 
template<class... GetArgs, class... SetArgs>
std::tuple< GetArgs... > get_set_mutexed (std::mutex &mut, std::tuple< GetArgs &... > get, std::tuple< SetArgs... > from_set, std::tuple< SetArgs &... > to_set)
 thread-safe getter and setter for values of variables (args)
 
template<class... Args>
std::tuple< Args... > get_mutexed (std::mutex &mut, Args &... args)
 thread-safe getter for values of variables (args)
 
template<class T >
get_mutexed (std::mutex &mut, T &arg)
 thread-safe getter a value from a variable
 
template<class T >
void set_mutexed_impl (const T what, T &where)
 base case of the variadic template for set_mutexed()
 
template<class T , class... Args>
void set_mutexed_impl (const T what, T &where, Args &... args)
 general case of the variadic template for set_mutexed()
 
template<class T >
auto set_mutexed (std::mutex &mut, const T what, T &where)
 thread-safe setter for a variable
 
template<class... Args>
auto set_mutexed (std::mutex &mut, Args &... args)
 thread-safe setter for multiple variables
 
template<class... Args>
auto set_mutexed (std::mutex &mut, const std::tuple< Args... > from, std::tuple< Args &... > to)
 thread-safe setter for multiple variables
 
template<>
rclcpp::Duration ParamLoader::loadParam2< rclcpp::Duration > (const std::string &name, const rclcpp::Duration &default_value)
 An overload for loading rclcpp::Duration.
 
template<>
rclcpp::Duration ParamLoader::loadParam2< rclcpp::Duration > (const std::string &name)
 An overload for loading rclcpp::Duration.
 
std::ostream & operator<< (std::ostream &os, rclcpp::ParameterType &var)
 Helper overload for printing of rclcpp::ParameterType.
 
template<typename Class , class... Types>
void construct_object (Class &object, Types... args)
 Helper function for object construstion e.g. in case of member objects. This function is useful to avoid specifying object template parameters twice - once in definition of the variable and second time during object construction. This function can deduce the template parameters from the type of the already defined object, because it returns the newly constructed object as a reference argument and not as a return type.
 
template<typename Iterator >
std::string containerToString (const Iterator begin, const Iterator end, const std::string &delimiter=", ")
 Convenience function for converting container ranges to strings (e.g. for printing).
 
template<typename Iterator >
std::string containerToString (const Iterator begin, const Iterator end, const char *delimiter)
 Convenience function for converting container ranges to strings (e.g. for printing).
 
template<typename Container >
std::string containerToString (const Container &cont, const std::string &delimiter=", ")
 Convenience function for converting containers to strings (e.g. for printing).
 
template<typename Container >
std::string containerToString (const Container &cont, const char *delimiter=", ")
 Convenience function for converting containers to strings (e.g. for printing).
 
template<typename T >
T::iterator remove_const (const typename T::const_iterator &it, T &cont)
 Convenience class for removing const-ness from a container iterator.
 
template<typename T >
int signum (T val)
 
geometry_msgs::msg::Point eigenToMsg (const Eigen::Vector3d &v)
 
std_msgs::msg::ColorRGBA generateColor (const double r, const double g, const double b, const double a)
 
Eigen::Vector3d msgToEigen (const geometry_msgs::msg::Point &p)
 
std::vector< Eigen::Vector3d > buildEllipse (const mrs_lib::geometry::Ellipse &ellipse, const int num_points)
 
template bool ParamLoader::loadParam< std::string > (const std::string &name, std::string &out_value, const std::string &default_value)
 
template bool ParamLoader::loadParamReusable< std::string > (const std::string &name, std::string &out_value, const std::string &default_value)
 
template<>
rclcpp::Duration ParamLoader::loadParam2< rclcpp::Duration > (const std::string &name, const rclcpp::Duration &default_value)
 An overload for loading rclcpp::Duration.
 
template<>
rclcpp::Duration ParamLoader::loadParam2< rclcpp::Duration > (const std::string &name)
 An overload for loading rclcpp::Duration.
 
template bool ParamProvider::getParam< std::string > (const std::string &name, std::string &out_value) const
 
template bool ParamProvider::getParam< std::vector< bool > > (const std::string &name, std::vector< bool > &out_value) const
 
template bool ParamProvider::getParam< std::vector< uint8_t > > (const std::string &name, std::vector< uint8_t > &out_value) const
 
template bool ParamProvider::getParam< std::vector< int64_t > > (const std::string &name, std::vector< int64_t > &out_value) const
 
template bool ParamProvider::getParam< std::vector< double > > (const std::string &name, std::vector< double > &out_value) const
 
template bool ParamProvider::getParam< std::vector< std::string > > (const std::string &name, std::vector< std::string > &out_value) const
 

Variables

const double RADIANS_PER_DEGREE = M_PI / 180.0
 
const double DEGREES_PER_RADIAN = 180.0 / M_PI
 
const double WGS84_A = 6378137.0
 
const double WGS84_B = 6356752.31424518
 
const double WGS84_F = 0.0033528107
 
const double WGS84_E = 0.0818191908
 
const double WGS84_EP = 0.0820944379
 
const double UTM_K0 = 0.9996
 
const double UTM_FE = 500000.0
 
const double UTM_FN_N = 0.0
 
const double UTM_FN_S = 10000000.0
 
const double UTM_E2 = (WGS84_E * WGS84_E)
 
const double UTM_E4 = (UTM_E2 * UTM_E2)
 
const double UTM_E6 = (UTM_E4 * UTM_E2)
 
const double UTM_EP2 = (UTM_E2 / (1 - UTM_E2))
 
const int n_states = 4
 
const int n_inputs = 2
 
const int n_measurements = 2
 
const int n_states_norm_constrained = 2
 

Detailed Description

All mrs_lib functions, classes, variables and definitions are contained in this namespace.

Function Documentation

◆ construct_object()

template<typename Class , class... Types>
void mrs_lib::construct_object ( Class &  object,
Types...  args 
)

Helper function for object construstion e.g. in case of member objects. This function is useful to avoid specifying object template parameters twice - once in definition of the variable and second time during object construction. This function can deduce the template parameters from the type of the already defined object, because it returns the newly constructed object as a reference argument and not as a return type.

Parameters
objectThe object to be constructed.
argsThese arguments are passed to the object constructor.
Examples
subscriber_handler/example.cpp.

◆ containerToString() [1/4]

template<typename Container >
std::string mrs_lib::containerToString ( const Container &  cont,
const char *  delimiter = ", " 
)

Convenience function for converting containers to strings (e.g. for printing).

Parameters
contthe container that will be converted to std::string.
delimiterwill be used to separate the elements in the output.
Returns
elements of the container from begin to end (excluding), converted to string and separated by delimiter.

◆ containerToString() [2/4]

template<typename Container >
std::string mrs_lib::containerToString ( const Container &  cont,
const std::string &  delimiter = ", " 
)

Convenience function for converting containers to strings (e.g. for printing).

Parameters
contthe container that will be converted to std::string.
delimiterwill be used to separate the elements in the output.
Returns
elements of the container from begin to end (excluding), converted to string and separated by delimiter.

◆ containerToString() [3/4]

template<typename Iterator >
std::string mrs_lib::containerToString ( const Iterator  begin,
const Iterator  end,
const char *  delimiter 
)

Convenience function for converting container ranges to strings (e.g. for printing).

Parameters
beginfirst element of the container that will be converted to std::string.
endone-after-the-last element of the container that will be converted to std::string.
delimiterwill be used to separate the elements in the output.
Returns
elements of the container from begin to end (excluding), converted to string and separated by delimiter.

◆ containerToString() [4/4]

template<typename Iterator >
std::string mrs_lib::containerToString ( const Iterator  begin,
const Iterator  end,
const std::string &  delimiter = ", " 
)

Convenience function for converting container ranges to strings (e.g. for printing).

Parameters
beginfirst element of the container that will be converted to std::string.
endone-after-the-last element of the container that will be converted to std::string.
delimiterwill be used to separate the elements in the output.
Returns
elements of the container from begin to end (excluding), converted to string and separated by delimiter.

◆ get_mutexed() [1/2]

template<class... Args>
std::tuple< Args... > mrs_lib::get_mutexed ( std::mutex &  mut,
Args &...  args 
)

thread-safe getter for values of variables (args)

Template Parameters
Argstypes of the variables
Parameters
mutmutex which protects the variables
argsvariables to obtain the values from
Returns
std::tuple of the values

◆ get_mutexed() [2/2]

template<class T >
T mrs_lib::get_mutexed ( std::mutex &  mut,
T &  arg 
)

thread-safe getter a value from a variable

Template Parameters
Ttype of the variable
Parameters
mutmutex which protects the variable
argvariable to obtain the value from
Returns
value of the variable

◆ get_set_mutexed()

template<class... GetArgs, class... SetArgs>
std::tuple< GetArgs... > mrs_lib::get_set_mutexed ( std::mutex &  mut,
std::tuple< GetArgs &... >  get,
std::tuple< SetArgs... >  from_set,
std::tuple< SetArgs &... >  to_set 
)

thread-safe getter and setter for values of variables (args)

Template Parameters
GetArgstypes of the variables to get
SetArgstypes of the variables to set
Parameters
mutmutex which protects the variables
gettuple of variable references to obtain the values from
to_settuple of variable references to set the new values from from_set
from_settuple of the new values to be set to to_set
Returns
tuple of the values from get

◆ getHeading() [1/18]

double mrs_lib::getHeading ( const geometry_msgs::msg::Pose &  data)

get heading from geometry_msgs::msg::Pose

Parameters
datapose
Returns
heading

◆ getHeading() [2/18]

double mrs_lib::getHeading ( const geometry_msgs::msg::Pose::ConstSharedPtr &  data)

get heading from geometry_msgs::msg::Pose::ConstSharedPtr

Parameters
datapose (ConstSharedPtr)
Returns
heading

◆ getHeading() [3/18]

double mrs_lib::getHeading ( const geometry_msgs::msg::Pose::SharedPtr &  data)

get heading from geometry_msgs::msg::Pose::SharedPtr

Parameters
datapose (SharedPtr)
Returns
heading

◆ getHeading() [4/18]

double mrs_lib::getHeading ( const geometry_msgs::msg::PoseWithCovariance &  data)

get heading from geometry_msgs::msg::PoseWithCovariance

Parameters
datapose with covariance
Returns
heading

◆ getHeading() [5/18]

double mrs_lib::getHeading ( const geometry_msgs::msg::PoseWithCovariance::ConstSharedPtr &  data)

get heading from geometry_msgs::msg::PoseWithCovariance::ConstSharedPtr

Parameters
datapose with covariance (ConstSharedPtr)
Returns
heading

◆ getHeading() [6/18]

double mrs_lib::getHeading ( const geometry_msgs::msg::PoseWithCovariance::SharedPtr &  data)

get heading from geometry_msgs::msg::PoseWithCovariance::SharedPtr

Parameters
datapose with covariance (SharedPtr)
Returns
heading

◆ getHeading() [7/18]

double mrs_lib::getHeading ( const mrs_msgs::msg::Reference &  data)

get heading from mrs_msgs::msg::Reference

Parameters
datareference
Returns
heading

◆ getHeading() [8/18]

double mrs_lib::getHeading ( const mrs_msgs::msg::Reference::ConstSharedPtr &  data)

get heading from mrs_msgs::msg::ReferenceConstSharedPtr

Parameters
datareference (ConstSharedPtr)
Returns
heading

◆ getHeading() [9/18]

double mrs_lib::getHeading ( const mrs_msgs::msg::Reference::SharedPtr &  data)

get heading from mrs_msgs::msg::ReferenceSharedPtr

Parameters
datareference (SharedPtr)
Returns
heading

◆ getHeading() [10/18]

double mrs_lib::getHeading ( const mrs_msgs::msg::ReferenceStamped &  data)

get heading from mrs_msgs::msg::ReferenceStamped

Parameters
datareferencestamped
Returns
heading

◆ getHeading() [11/18]

double mrs_lib::getHeading ( const mrs_msgs::msg::ReferenceStamped::ConstSharedPtr &  data)

get heading from mrs_msgs::msg::ReferenceStamped::ConstSharedPtr

Parameters
datareferencestamped (ConstSharedPtr)
Returns
heading

◆ getHeading() [12/18]

double mrs_lib::getHeading ( const mrs_msgs::msg::ReferenceStamped::SharedPtr &  data)

get heading from mrs_msgs::msg::ReferenceStamped::SharedPtr

Parameters
datareferencestamped (SharedPtr)
Returns
heading

◆ getHeading() [13/18]

double mrs_lib::getHeading ( const mrs_msgs::msg::TrackerCommand &  data)

get heading from mrs_msgs::msg::TrackerCommand

Parameters
dataposition command
Returns
heading

◆ getHeading() [14/18]

double mrs_lib::getHeading ( const mrs_msgs::msg::TrackerCommand::ConstSharedPtr &  data)

get heading from mrs_msgs::msg::TrackerCommand::ConstSharedPtr

Parameters
dataposition command (ConstSharedPtr)
Returns
heading

◆ getHeading() [15/18]

double mrs_lib::getHeading ( const mrs_msgs::msg::TrackerCommand::SharedPtr &  data)

get heading from mrs_msgs::msg::TrackerCommand::SharedPtr

Parameters
dataposition command (SharedPtr)
Returns
heading

◆ getHeading() [16/18]

double mrs_lib::getHeading ( const nav_msgs::msg::Odometry &  data)

get heading from nav_msgs::msg::Odometry

Parameters
dataodometry
Returns
heading

◆ getHeading() [17/18]

double mrs_lib::getHeading ( const nav_msgs::msg::Odometry::ConstSharedPtr &  data)

get heading from nav_msgs::msg::Odometry::ConstSharedPtr

Parameters
dataodometry (ConstSharedPtr)
Returns
heading

◆ getHeading() [18/18]

double mrs_lib::getHeading ( const nav_msgs::msg::Odometry::SharedPtr &  data)

get heading from nav_msgs::msg::Odometry::SharedPtr

Parameters
dataodometry (SharedPtr)
Returns
heading

◆ getPose() [1/3]

geometry_msgs::msg::Pose mrs_lib::getPose ( const nav_msgs::msg::Odometry &  data)

returns the Pose part of the nav_msgs::msg::Odometry message

Parameters
dataodometry
Returns
pose

◆ getPose() [2/3]

geometry_msgs::msg::Pose mrs_lib::getPose ( const nav_msgs::msg::Odometry::ConstSharedPtr &  data)

returns the Pose part of the nav_msgs::msg::Odometry::ConstSharedPtr message

Parameters
dataodometry (ConstSharedPtr)
Returns
pose

◆ getPose() [3/3]

geometry_msgs::msg::Pose mrs_lib::getPose ( const nav_msgs::msg::Odometry::SharedPtr &  data)

returns the Pose part of the nav_msgs::msg::Odometry::SharedPtr message

Parameters
dataodometry (SharedPtr)
Returns
pose

◆ getPosition() [1/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const geometry_msgs::msg::Pose &  data)

get position from geometry_msgs::msg::Pose

Parameters
datapose
Returns
x, y, z

◆ getPosition() [2/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const geometry_msgs::msg::Pose::ConstSharedPtr &  data)

get position from geometry_msgs::msg::Pose::ConstSharedPtr

Parameters
datapose (ConstSharedPtr)
Returns
x, y, z

◆ getPosition() [3/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const geometry_msgs::msg::Pose::SharedPtr &  data)

get position from geometry_msgs::msg::Pose::SharedPtr

Parameters
datapose (SharedPtr)
Returns
x, y, z

◆ getPosition() [4/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const geometry_msgs::msg::PoseWithCovariance &  data)

get position from geometry_msgs::msg::PoseWithCovariance

Parameters
datapose with covariance
Returns
x, y, z

◆ getPosition() [5/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const geometry_msgs::msg::PoseWithCovariance::ConstSharedPtr &  data)

get position from geometry_msgs::msg::PoseWithCovariance::ConstSharedPtr

Parameters
datapose with covariance (ConstSharedPtr)
Returns
x, y, z

◆ getPosition() [6/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const geometry_msgs::msg::PoseWithCovariance::SharedPtr &  data)

get position from geometry_msgs::msg::PoseWithCovariance::SharedPtr

Parameters
datapose with covariance (SharedPtr)
Returns
x, y, z

◆ getPosition() [7/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const mrs_msgs::msg::Reference &  data)

get position from mrs_msgs::msg::Reference

Parameters
datareference
Returns
x, y, z

◆ getPosition() [8/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const mrs_msgs::msg::Reference::ConstSharedPtr &  data)

get position from mrs_msgs::msg::Reference::ConstSharedPtr

Parameters
datareference (ConstSharedPtr)
Returns
x, y, z

◆ getPosition() [9/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const mrs_msgs::msg::Reference::SharedPtr &  data)

get position from mrs_msgs::msg::Reference::SharedPtr

Parameters
datareference (SharedPtr)
Returns
x, y, z

◆ getPosition() [10/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const mrs_msgs::msg::ReferenceStamped &  data)

get position from mrs_msgs::msg::ReferenceStamped

Parameters
datareference stamped
Returns
x, y, z

◆ getPosition() [11/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const mrs_msgs::msg::ReferenceStamped::ConstSharedPtr &  data)

get position from mrs_msgs::msg::ReferenceStamped::ConstSharedPtr

Parameters
datareference stamped (ConstSharedPtr)
Returns
x, y, z

◆ getPosition() [12/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const mrs_msgs::msg::ReferenceStamped::SharedPtr &  data)

get position from mrs_msgs::msg::ReferenceStamped::SharedPtr

Parameters
datareference stamped (SharedPtr)
Returns
x, y, z

◆ getPosition() [13/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const mrs_msgs::msg::TrackerCommand &  data)

get position data from mrs_msgs::msg::TrackerCommand

Parameters
dataposition command
Returns
x, y, z

◆ getPosition() [14/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const mrs_msgs::msg::TrackerCommand::ConstSharedPtr &  data)

get position data from mrs_msgs::msg::TrackerCommand::SharedPtr

Parameters
dataposition command (ConstSharedPtr)
Returns
x, y, z

◆ getPosition() [15/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const mrs_msgs::msg::TrackerCommand::SharedPtr &  data)

get position data from mrs_msgs::msg::TrackerCommandSharedPtr

Parameters
dataposition command (SharedPtr)
Returns
x, y, z

◆ getPosition() [16/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const nav_msgs::msg::Odometry &  data)

get position from nav_msgs::msg::Odometry

Parameters
dataodometry
Returns
x, y, z

◆ getPosition() [17/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const nav_msgs::msg::Odometry::ConstSharedPtr &  data)

get position from nav_msgs::msg::Odometry::ConstSharedPtr

Parameters
dataodometry (SharedPtr)
Returns
x, y, z

◆ getPosition() [18/18]

std::tuple< double, double, double > mrs_lib::getPosition ( const nav_msgs::msg::Odometry::SharedPtr &  data)

get position from nav_msgs::msg::Odometry::SharedPtr

Parameters
dataodometry (SharedPtr)
Returns
x, y, z

◆ getVelocity() [1/12]

std::tuple< double, double, double > mrs_lib::getVelocity ( const geometry_msgs::msg::Twist &  data)

get velocity from geometry_msgs::msg::Twist

Parameters
datatwist
Returns
x, y, z

◆ getVelocity() [2/12]

std::tuple< double, double, double > mrs_lib::getVelocity ( const geometry_msgs::msg::Twist::ConstSharedPtr &  data)

get position from geometry_msgs::msg::Twist::ConstSharedPtr

Parameters
datatwist (ConstSharedPtr)
Returns
x, y, z

◆ getVelocity() [3/12]

std::tuple< double, double, double > mrs_lib::getVelocity ( const geometry_msgs::msg::Twist::SharedPtr &  data)

get position from geometry_msgs::msg::Twist::SharedPtr

Parameters
datatwist (SharedPtr)
Returns
x, y, z

◆ getVelocity() [4/12]

std::tuple< double, double, double > mrs_lib::getVelocity ( const geometry_msgs::msg::TwistWithCovariance &  data)

get velocity from geometry_msgs::msg::TwistWithCovariance

Parameters
datatwistwithcovariance
Returns
x, y, z

◆ getVelocity() [5/12]

std::tuple< double, double, double > mrs_lib::getVelocity ( const geometry_msgs::msg::TwistWithCovariance::ConstSharedPtr &  data)

get position from geometry_msgs::msg::TwistWithCovariance::ConstSharedPtr

Parameters
datatwistwithcovariance (ConstSharedPtr)
Returns
x, y, z

◆ getVelocity() [6/12]

std::tuple< double, double, double > mrs_lib::getVelocity ( const geometry_msgs::msg::TwistWithCovariance::SharedPtr &  data)

get position from geometry_msgs::msg::TwistWithCovariance::SharedPtr

Parameters
datatwistwithcovariance (SharedPtr)
Returns
x, y, z

◆ getVelocity() [7/12]

std::tuple< double, double, double > mrs_lib::getVelocity ( const mrs_msgs::msg::TrackerCommand &  data)

get velocity data from mrs_msgs::msg::TrackerCommand

Parameters
dataposition command
Returns
x, y, z

◆ getVelocity() [8/12]

std::tuple< double, double, double > mrs_lib::getVelocity ( const mrs_msgs::msg::TrackerCommand::ConstSharedPtr &  data)

get velocity data from mrs_msgs::msg::TrackerCommand::ConstSharedPtr

Parameters
dataposition command (ConstSharedPtr)
Returns
x, y, z

◆ getVelocity() [9/12]

std::tuple< double, double, double > mrs_lib::getVelocity ( const mrs_msgs::msg::TrackerCommand::SharedPtr &  data)

get velocity data from mrs_msgs::msg::TrackerCommand::SharedPtr

Parameters
dataposition command (SharedPtr)
Returns
x, y, z

◆ getVelocity() [10/12]

std::tuple< double, double, double > mrs_lib::getVelocity ( const nav_msgs::msg::Odometry &  data)

get position from nav_msgs::msg::Odometry

Parameters
dataodometry
Returns
x, y, z

◆ getVelocity() [11/12]

std::tuple< double, double, double > mrs_lib::getVelocity ( const nav_msgs::msg::Odometry::ConstSharedPtr &  data)

get velocity from nav_msgs::msg::Odometry::ConstSharedPtr

Parameters
dataodometry (ConstSharedPtr)
Returns
x, y, z

◆ getVelocity() [12/12]

std::tuple< double, double, double > mrs_lib::getVelocity ( const nav_msgs::msg::Odometry::SharedPtr &  data)

get velocity from nav_msgs::msg::Odometry::SharedPtr

Parameters
dataodometry (SharedPtr)
Returns
x, y, z

◆ getXYZ() [1/6]

std::tuple< double, double, double > mrs_lib::getXYZ ( const geometry_msgs::msg::Point &  data)

get XYZ from geometry_msgs::msg::Point

Parameters
datapoint
Returns
x, y, z

◆ getXYZ() [2/6]

std::tuple< double, double, double > mrs_lib::getXYZ ( const geometry_msgs::msg::Point::ConstSharedPtr &  data)

get XYZ from geometry_msgs::msg::Point

Parameters
datapoint (ConstSharedPtr)
Returns
x, y, z

◆ getXYZ() [3/6]

std::tuple< double, double, double > mrs_lib::getXYZ ( const geometry_msgs::msg::Point::SharedPtr &  data)

get XYZ from geometry_msgs::msg::Point

Parameters
datapoint (SharedPtr)
Returns
x, y, z

◆ getXYZ() [4/6]

std::tuple< double, double, double > mrs_lib::getXYZ ( const geometry_msgs::msg::Vector3 &  data)

get XYZ from geometry_msgs::msg::Vector3

Parameters
datavector3
Returns
x, y, z

◆ getXYZ() [5/6]

std::tuple< double, double, double > mrs_lib::getXYZ ( const geometry_msgs::msg::Vector3::ConstSharedPtr &  data)

get XYZ from geometry_msgs::msg::Vector3::ConstSharedPtr

Parameters
datavector3 (ConstSharedPtr)
Returns
x, y, z

◆ getXYZ() [6/6]

std::tuple< double, double, double > mrs_lib::getXYZ ( const geometry_msgs::msg::Vector3::SharedPtr &  data)

get XYZ from geometry_msgs::msg::Vector3::SharedPtr

Parameters
datavector3 (SharedPtr)
Returns
x, y, z

◆ getYaw() [1/9]

double mrs_lib::getYaw ( const geometry_msgs::msg::Pose &  data)

get yaw from geometry_msgs::msg::Pose

Parameters
datapose
Returns
yaw

◆ getYaw() [2/9]

double mrs_lib::getYaw ( const geometry_msgs::msg::Pose::ConstSharedPtr &  data)

get yaw from geometry_msgs::msg::Pose::ConstSharedPtr

Parameters
datapose (ConstSharedPtr)
Returns
yaw

◆ getYaw() [3/9]

double mrs_lib::getYaw ( const geometry_msgs::msg::Pose::SharedPtr &  data)

get yaw from geometry_msgs::msg::Pose::SharedPtr

Parameters
datapose (SharedPtr)
Returns
yaw

◆ getYaw() [4/9]

double mrs_lib::getYaw ( const geometry_msgs::msg::PoseWithCovariance &  data)

get yaw from geometry_msgs::msg::PoseWithCovariance

Parameters
datapose with covariance
Returns
yaw

◆ getYaw() [5/9]

double mrs_lib::getYaw ( const geometry_msgs::msg::PoseWithCovariance::ConstSharedPtr &  data)

get yaw from geometry_msgs::msg::PoseWithCovariance::ConstSharedPtr

Parameters
datapose with covariance (ConstSharedPtr)
Returns
yaw

◆ getYaw() [6/9]

double mrs_lib::getYaw ( const geometry_msgs::msg::PoseWithCovariance::SharedPtr &  data)

get yaw from geometry_msgs::msg::PoseWithCovariance::SharedPtr

Parameters
datapose with covariance (SharedPtr)
Returns
yaw

◆ getYaw() [7/9]

double mrs_lib::getYaw ( const nav_msgs::msg::Odometry &  data)

get yaw from nav_msgs::msg::Odometry

Parameters
dataodometry
Returns
yaw

◆ getYaw() [8/9]

double mrs_lib::getYaw ( const nav_msgs::msg::Odometry::ConstSharedPtr &  data)

get yaw from nav_msgs::msg::Odometry::ConstSharedPtr

Parameters
dataodometry (ConstSharedPtr)
Returns
yaw

◆ getYaw() [9/9]

double mrs_lib::getYaw ( const nav_msgs::msg::Odometry::SharedPtr &  data)

get yaw from nav_msgs::msg::Odometry::SharedPtr

Parameters
dataodometry (SharedPtr)
Returns
yaw

◆ operator<<() [1/4]

template<typename T >
std::ostream & mrs_lib::operator<< ( std::ostream &  os,
const Eigen::MatrixX< T > &  var 
)

Helper overload for printing of Eigen matrices.

Parameters
osThe output stream to send the printed matrix to.
varThe matrix to be printed.
Returns
A reference to the output stream.

◆ operator<<() [2/4]

template<typename Key , typename Value >
std::ostream & mrs_lib::operator<< ( std::ostream &  os,
const std::map< Key, Value > &  var 
)

Helper overload for printing of std::maps.

Parameters
osThe output stream to send the printed map to.
varThe map to be printed.
Returns
A reference to the output stream.

◆ operator<<() [3/4]

template<typename T >
std::ostream & mrs_lib::operator<< ( std::ostream &  os,
const std::vector< T > &  var 
)

Helper overload for printing of std::vectors.

Parameters
osThe output stream to send the printed vector to.
varThe vector to be printed.
Returns
A reference to the output stream.

◆ operator<<() [4/4]

std::ostream & mrs_lib::operator<< ( std::ostream &  os,
rclcpp::ParameterType &  var 
)

Helper overload for printing of rclcpp::ParameterType.

Parameters
osThe output stream to send the printed map to.
varThe parameter type to be printed.
Returns
A reference to the output stream.

◆ ParamLoader::loadParam2< rclcpp::Duration >() [1/4]

template<>
rclcpp::Duration mrs_lib::ParamLoader::loadParam2< rclcpp::Duration > ( const std::string &  name)

An overload for loading rclcpp::Duration.

The duration will be loaded as a double, representing a number of seconds, and then converted to rclcpp::Duration.

Parameters
nameName of the parameter in the rosparam server.
Returns
The loaded parameter value.

◆ ParamLoader::loadParam2< rclcpp::Duration >() [2/4]

template<>
rclcpp::Duration mrs_lib::ParamLoader::loadParam2< rclcpp::Duration > ( const std::string &  name)

An overload for loading rclcpp::Duration.

The duration will be loaded as a double, representing a number of seconds, and then converted to rclcpp::Duration.

Parameters
nameName of the parameter in the rosparam server.
Returns
The loaded parameter value.

◆ ParamLoader::loadParam2< rclcpp::Duration >() [3/4]

template<>
rclcpp::Duration mrs_lib::ParamLoader::loadParam2< rclcpp::Duration > ( const std::string &  name,
const rclcpp::Duration &  default_value 
)

An overload for loading rclcpp::Duration.

The duration will be loaded as a double, representing a number of seconds, and then converted to rclcpp::Duration.

Parameters
nameName of the parameter in the rosparam server.
default_valueThis value will be used if the parameter name is not found in the rosparam server.
Returns
The loaded parameter value.

◆ ParamLoader::loadParam2< rclcpp::Duration >() [4/4]

template<>
rclcpp::Duration mrs_lib::ParamLoader::loadParam2< rclcpp::Duration > ( const std::string &  name,
const rclcpp::Duration &  default_value 
)

An overload for loading rclcpp::Duration.

The duration will be loaded as a double, representing a number of seconds, and then converted to rclcpp::Duration.

Parameters
nameName of the parameter in the rosparam server.
default_valueThis value will be used if the parameter name is not found in the rosparam server.
Returns
The loaded parameter value.

◆ probit()

double mrs_lib::probit ( const double  quantile)

Inverse cumulative distribution function of the standard normal probability distribution.

Implements the quantile function of a standard normal probability distribution (aka the probit function, see https://en.wikipedia.org/wiki/Probit). The implementation uses the Beasley-Springer-Moro approximation (see page 68 of Glasserman, Paul, "Monte Carlo Methods in Financial Engineering. Stochastic Modelling and Applied Probability", 2003, doi:10.1007/978-0-387-21617-1, available at https://sci-hub.se/10.1007/978-0-387-21617-1).

Parameters
quantilethe probability that a realization of a random variable with a standard normal dostribution is equal or less than the returned value (see https://en.wikipedia.org/wiki/Quantile).
Returns
such a value that the probability that a realization of a random variable with a standard normal dostribution is equal or less is quantile.

◆ remove_const()

template<typename T >
T::iterator mrs_lib::remove_const ( const typename T::const_iterator &  it,
T &  cont 
)

Convenience class for removing const-ness from a container iterator.

Parameters
itthe iterator from which const-ness should be removed.
contthe corresponding container of the iterator.
Returns
a non-const iterator, pointing to the same element as it.

◆ set_mutexed() [1/3]

template<class... Args>
auto mrs_lib::set_mutexed ( std::mutex &  mut,
Args &...  args 
)

thread-safe setter for multiple variables

example: set_mutexed(my_mutex_, a, a_, b, b_, c, c_); where a, b, c are the values to be set a_, b_, c_ are the variables to be updated

Template Parameters
Argstypes of the variables
Parameters
mutmutex to be locked
args
Returns
alternating list of values that were just set

◆ set_mutexed() [2/3]

template<class... Args>
auto mrs_lib::set_mutexed ( std::mutex &  mut,
const std::tuple< Args... >  from,
std::tuple< Args &... >  to 
)

thread-safe setter for multiple variables

example: set_mutexed(mu_mutex, std::tuple(a, b, c), std::forward_as_tuple(a_, b_, c_)); where a, b, c are the values to be set a_, b_, c_ are the updated variables

Template Parameters
Argstypes of the variables
Parameters
mutmutex to be locked
fromstd::tuple of the values
tostd::tuple of reference to the variablaes
Returns

◆ set_mutexed() [3/3]

template<class T >
auto mrs_lib::set_mutexed ( std::mutex &  mut,
const T  what,
T &  where 
)

thread-safe setter for a variable

Template Parameters
Ttype of the variable
Parameters
mutmutex to be locked
whatvalue to set
wherereference to be set
Returns

◆ set_mutexed_impl() [1/2]

template<class T >
void mrs_lib::set_mutexed_impl ( const T  what,
T &  where 
)

base case of the variadic template for set_mutexed()

Template Parameters
Tvariable type
Parameters
whatvalue to set
wherereference to be set

◆ set_mutexed_impl() [2/2]

template<class T , class... Args>
void mrs_lib::set_mutexed_impl ( const T  what,
T &  where,
Args &...  args 
)

general case of the variadic template for set_mutexed()

Template Parameters
Ttype of the next variable to set
Argstypes of the rest of the variables
Parameters
whatvalue to set
wherereference to be set
argsthe remaining arguments

◆ to_param_type()

template<typename T >
rclcpp::ParameterType mrs_lib::to_param_type ( )

Convenince function to get the corresponding rclcpp::ParamType from a C++ type.

Returns
the rclcpp::ParamType enum value corresponding to the C++ type specified by the template.