Public Member Functions | Public Attributes | Protected Attributes | List of all members
dynamicgraph::sot::RobotUtil Struct Reference

#include <robot-utils.hh>

Public Member Functions

bool base_sot_to_urdf (ConstRefVector q_sot, RefVector q_urdf)
 
bool base_urdf_to_sot (ConstRefVector q_urdf, RefVector q_sot)
 
bool config_sot_to_urdf (ConstRefVector q_sot, RefVector q_urdf)
 
bool config_urdf_to_sot (ConstRefVector q_urdf, RefVector q_sot)
 
JointLimits cp_get_joint_limits_from_id (Index id)
 
void create_id_to_name_map ()
 
const Indexget_id_from_name (const std::string &name)
 
const JointLimitsget_joint_limits_from_id (Index id)
 
const std::string & get_name_from_id (Index id)
 Get the joint name from its index. More...
 
boost::property_tree::ptree & get_property_tree ()
 
bool joints_sot_to_urdf (ConstRefVector q_sot, RefVector q_urdf)
 
bool joints_urdf_to_sot (ConstRefVector q_urdf, RefVector q_sot)
 
 RobotUtil ()
 
void set_joint_limits_for_id (const Index &idx, const double &lq, const double &uq)
 Set the limits (lq,uq) for joint idx. More...
 
void set_name_to_id (const std::string &jointName, const Index &jointId)
 Set relation between the name and the SoT id. More...
 
void set_urdf_to_sot (const dynamicgraph::Vector &urdf_to_sot)
 
void set_urdf_to_sot (const std::vector< Index > &urdf_to_sot)
 Set the map between urdf index and sot index. More...
 
bool velocity_sot_to_urdf (ConstRefVector q_urdf, ConstRefVector v_sot, RefVector v_urdf)
 
bool velocity_urdf_to_sot (ConstRefVector q_urdf, ConstRefVector v_urdf, RefVector v_sot)
 
Logger related methods
void sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const std::string &lineId="")
 Send messages msg with level t. Add string file and line to message. More...
 
void setLoggerVerbosityLevel (LoggerVerbosity lv)
 Specify the verbosity level of the logger. More...
 
LoggerVerbosity getLoggerVerbosityLevel ()
 Get the logger's verbosity level. More...
 
void display (std::ostream &os) const
 
Handling general parameters

{

template<typename Type >
void set_parameter (const std::string &parameter_name, const Type &parameter_value)
 Set a parameter of type string. If parameter_name already exists the value is overwritten. If not it is inserted. More...
 
template<typename Type >
Type get_parameter (const std::string &parameter_name)
 Get a parameter of type string. If parameter_name already exists the value is overwritten. If not it is inserted. More...
 

Public Attributes

dynamicgraph::Vector m_dgv_urdf_to_sot
 
FootUtil m_foot_util
 Foot information. More...
 
ForceUtil m_force_util
 Forces data. More...
 
HandUtil m_hand_util
 Hand information. More...
 
std::map< Index, std::string > m_id_to_name
 The map between id and name. More...
 
std::string m_imu_joint_name
 The name of the joint IMU is attached to. More...
 
std::map< Index, JointLimitsm_limits_map
 The joint limits map. More...
 
std::map< std::string, Indexm_name_to_id
 Map from the name to the id. More...
 
std::size_t m_nbJoints
 Nb of Dofs for the robot. More...
 
std::string m_urdf_filename
 URDF file path. More...
 
std::vector< Indexm_urdf_to_sot
 Map from the urdf index to the SoT index. More...
 

Protected Attributes

Logger logger_
 
std::map< std::string, std::string > parameters_strings_
 Map of the parameters: map of strings. More...
 
boost::property_tree::ptree property_tree_
 Property tree. More...
 

Detailed Description

Definition at line 134 of file robot-utils.hh.

Constructor & Destructor Documentation

◆ RobotUtil()

dynamicgraph::sot::RobotUtil::RobotUtil ( )

Definition at line 230 of file robot-utils.cpp.

Member Function Documentation

◆ base_sot_to_urdf()

bool dynamicgraph::sot::RobotUtil::base_sot_to_urdf ( ConstRefVector  q_sot,
RefVector  q_urdf 
)

Definition at line 370 of file robot-utils.cpp.

◆ base_urdf_to_sot()

bool dynamicgraph::sot::RobotUtil::base_urdf_to_sot ( ConstRefVector  q_urdf,
RefVector  q_sot 
)

Definition at line 357 of file robot-utils.cpp.

◆ config_sot_to_urdf()

bool dynamicgraph::sot::RobotUtil::config_sot_to_urdf ( ConstRefVector  q_sot,
RefVector  q_urdf 
)

Definition at line 403 of file robot-utils.cpp.

◆ config_urdf_to_sot()

bool dynamicgraph::sot::RobotUtil::config_urdf_to_sot ( ConstRefVector  q_urdf,
RefVector  q_sot 
)

Definition at line 393 of file robot-utils.cpp.

◆ cp_get_joint_limits_from_id()

JointLimits dynamicgraph::sot::RobotUtil::cp_get_joint_limits_from_id ( Index  id)

Definition at line 242 of file robot-utils.cpp.

◆ create_id_to_name_map()

void dynamicgraph::sot::RobotUtil::create_id_to_name_map ( )

This method creates the map between id and name. It is called each time a new link between id and name is inserted (i.e. when set_name_to_id is called).

Definition at line 253 of file robot-utils.cpp.

◆ display()

void dynamicgraph::sot::RobotUtil::display ( std::ostream &  os) const

Definition at line 410 of file robot-utils.cpp.

◆ get_id_from_name()

const Index & dynamicgraph::sot::RobotUtil::get_id_from_name ( const std::string &  name)

Given a joint name it finds the associated joint id. If the specified joint name is not found it returns -1;

Parameters
nameName of the joint to find.
Returns
The id of the specified joint, -1 if not found.

Definition at line 259 of file robot-utils.cpp.

◆ get_joint_limits_from_id()

const JointLimits & dynamicgraph::sot::RobotUtil::get_joint_limits_from_id ( Index  id)

Given a joint id it finds the associated joint limits. If the specified joint is not found it returns JointLimits(0,0).

Parameters
idId of the joint to find.
Returns
The limits of the specified joint, JointLimits(0,0) if not found.

Definition at line 237 of file robot-utils.cpp.

◆ get_name_from_id()

const std::string & dynamicgraph::sot::RobotUtil::get_name_from_id ( Index  id)

Get the joint name from its index.

Given a joint id it finds the associated joint name. If the specified joint is not found it returns "Joint name not found";

Parameters
idId of the joint to find.
Returns
The name of the specified joint, "Joint name not found" if not found.

Definition at line 265 of file robot-utils.cpp.

◆ get_parameter()

template<typename Type >
Type dynamicgraph::sot::RobotUtil::get_parameter ( const std::string &  parameter_name)
inline

Get a parameter of type string. If parameter_name already exists the value is overwritten. If not it is inserted.

Parameters
parameter_nameName of the parameter Return false if the parameter is not found.

Definition at line 269 of file robot-utils.hh.

◆ get_property_tree()

boost::property_tree::ptree& dynamicgraph::sot::RobotUtil::get_property_tree ( )

Access to property tree directly

◆ getLoggerVerbosityLevel()

LoggerVerbosity dynamicgraph::sot::RobotUtil::getLoggerVerbosityLevel ( )
inline

Get the logger's verbosity level.

Definition at line 236 of file robot-utils.hh.

◆ joints_sot_to_urdf()

bool dynamicgraph::sot::RobotUtil::joints_sot_to_urdf ( ConstRefVector  q_sot,
RefVector  q_urdf 
)

Definition at line 304 of file robot-utils.cpp.

◆ joints_urdf_to_sot()

bool dynamicgraph::sot::RobotUtil::joints_urdf_to_sot ( ConstRefVector  q_urdf,
RefVector  q_sot 
)

Definition at line 291 of file robot-utils.cpp.

◆ sendMsg()

void dynamicgraph::sot::RobotUtil::sendMsg ( const std::string &  msg,
MsgType  t = MSG_TYPE_INFO,
const std::string &  lineId = "" 
)

Send messages msg with level t. Add string file and line to message.

Definition at line 440 of file robot-utils.cpp.

◆ set_joint_limits_for_id()

void dynamicgraph::sot::RobotUtil::set_joint_limits_for_id ( const Index idx,
const double lq,
const double uq 
)

Set the limits (lq,uq) for joint idx.

Definition at line 232 of file robot-utils.cpp.

◆ set_name_to_id()

void dynamicgraph::sot::RobotUtil::set_name_to_id ( const std::string &  jointName,
const Index jointId 
)

Set relation between the name and the SoT id.

Definition at line 247 of file robot-utils.cpp.

◆ set_parameter()

template<typename Type >
void dynamicgraph::sot::RobotUtil::set_parameter ( const std::string &  parameter_name,
const Type parameter_value 
)
inline

Set a parameter of type string. If parameter_name already exists the value is overwritten. If not it is inserted.

Definition at line 246 of file robot-utils.hh.

◆ set_urdf_to_sot() [1/2]

void dynamicgraph::sot::RobotUtil::set_urdf_to_sot ( const dynamicgraph::Vector urdf_to_sot)

Definition at line 282 of file robot-utils.cpp.

◆ set_urdf_to_sot() [2/2]

void dynamicgraph::sot::RobotUtil::set_urdf_to_sot ( const std::vector< Index > &  urdf_to_sot)

Set the map between urdf index and sot index.

Definition at line 271 of file robot-utils.cpp.

◆ setLoggerVerbosityLevel()

void dynamicgraph::sot::RobotUtil::setLoggerVerbosityLevel ( LoggerVerbosity  lv)
inline

Specify the verbosity level of the logger.

Definition at line 233 of file robot-utils.hh.

◆ velocity_sot_to_urdf()

bool dynamicgraph::sot::RobotUtil::velocity_sot_to_urdf ( ConstRefVector  q_urdf,
ConstRefVector  v_sot,
RefVector  v_urdf 
)

Definition at line 337 of file robot-utils.cpp.

◆ velocity_urdf_to_sot()

bool dynamicgraph::sot::RobotUtil::velocity_urdf_to_sot ( ConstRefVector  q_urdf,
ConstRefVector  v_urdf,
RefVector  v_sot 
)

Definition at line 318 of file robot-utils.cpp.

Member Data Documentation

◆ logger_

Logger dynamicgraph::sot::RobotUtil::logger_
protected

Definition at line 290 of file robot-utils.hh.

◆ m_dgv_urdf_to_sot

dynamicgraph::Vector dynamicgraph::sot::RobotUtil::m_dgv_urdf_to_sot

Definition at line 173 of file robot-utils.hh.

◆ m_foot_util

FootUtil dynamicgraph::sot::RobotUtil::m_foot_util

Foot information.

Definition at line 142 of file robot-utils.hh.

◆ m_force_util

ForceUtil dynamicgraph::sot::RobotUtil::m_force_util

Forces data.

Definition at line 139 of file robot-utils.hh.

◆ m_hand_util

HandUtil dynamicgraph::sot::RobotUtil::m_hand_util

Hand information.

Definition at line 145 of file robot-utils.hh.

◆ m_id_to_name

std::map<Index, std::string> dynamicgraph::sot::RobotUtil::m_id_to_name

The map between id and name.

Definition at line 157 of file robot-utils.hh.

◆ m_imu_joint_name

std::string dynamicgraph::sot::RobotUtil::m_imu_joint_name

The name of the joint IMU is attached to.

Definition at line 163 of file robot-utils.hh.

◆ m_limits_map

std::map<Index, JointLimits> dynamicgraph::sot::RobotUtil::m_limits_map

The joint limits map.

Definition at line 160 of file robot-utils.hh.

◆ m_name_to_id

std::map<std::string, Index> dynamicgraph::sot::RobotUtil::m_name_to_id

Map from the name to the id.

Definition at line 154 of file robot-utils.hh.

◆ m_nbJoints

std::size_t dynamicgraph::sot::RobotUtil::m_nbJoints

Nb of Dofs for the robot.

Definition at line 151 of file robot-utils.hh.

◆ m_urdf_filename

std::string dynamicgraph::sot::RobotUtil::m_urdf_filename

URDF file path.

Definition at line 171 of file robot-utils.hh.

◆ m_urdf_to_sot

std::vector<Index> dynamicgraph::sot::RobotUtil::m_urdf_to_sot

Map from the urdf index to the SoT index.

Definition at line 148 of file robot-utils.hh.

◆ parameters_strings_

std::map<std::string, std::string> dynamicgraph::sot::RobotUtil::parameters_strings_
protected

Map of the parameters: map of strings.

Definition at line 293 of file robot-utils.hh.

◆ property_tree_

boost::property_tree::ptree dynamicgraph::sot::RobotUtil::property_tree_
protected

Property tree.

Definition at line 296 of file robot-utils.hh.


The documentation for this struct was generated from the following files:


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:32