|
sot-core
4.11.8
Hierarchical task solver plug-in for dynamic-graph.
|
#include <sot/core/robot-utils.hh>
Public Member Functions | |
| RobotUtil () | |
| void | create_id_to_name_map () |
| const Index & | get_id_from_name (const std::string &name) |
| const std::string & | get_name_from_id (Index id) |
| Get the joint name from its index. 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 std::vector< Index > &urdf_to_sot) |
| Set the map between urdf index and sot index. More... | |
| void | set_urdf_to_sot (const dynamicgraph::Vector &urdf_to_sot) |
| void | set_joint_limits_for_id (const Index &idx, const double &lq, const double &uq) |
| Set the limits (lq,uq) for joint idx. More... | |
| bool | joints_urdf_to_sot (ConstRefVector q_urdf, RefVector q_sot) |
| bool | joints_sot_to_urdf (ConstRefVector q_sot, RefVector q_urdf) |
| bool | velocity_urdf_to_sot (ConstRefVector q_urdf, ConstRefVector v_urdf, RefVector v_sot) |
| bool | velocity_sot_to_urdf (ConstRefVector q_urdf, ConstRefVector v_sot, RefVector v_urdf) |
| bool | config_urdf_to_sot (ConstRefVector q_urdf, RefVector q_sot) |
| bool | config_sot_to_urdf (ConstRefVector q_sot, RefVector q_urdf) |
| bool | base_urdf_to_sot (ConstRefVector q_urdf, RefVector q_sot) |
| bool | base_sot_to_urdf (ConstRefVector q_sot, RefVector q_urdf) |
| const JointLimits & | get_joint_limits_from_id (Index id) |
| JointLimits | cp_get_joint_limits_from_id (Index id) |
| boost::property_tree::ptree & | get_property_tree () |
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 ¶meter_name, const Type ¶meter_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 ¶meter_name) |
| Get a parameter of type string. If parameter_name already exists the value is overwritten. If not it is inserted. More... | |
Public Attributes | |
| ForceUtil | m_force_util |
| Forces data. More... | |
| FootUtil | m_foot_util |
| Foot information. More... | |
| HandUtil | m_hand_util |
| Hand information. More... | |
| std::vector< Index > | m_urdf_to_sot |
| Map from the urdf index to the SoT index. More... | |
| std::size_t | m_nbJoints |
| Nb of Dofs for the robot. More... | |
| std::map< std::string, Index > | m_name_to_id |
| Map from the name to the id. More... | |
| std::map< Index, std::string > | m_id_to_name |
| The map between id and name. More... | |
| std::map< Index, JointLimits > | m_limits_map |
| The joint limits map. More... | |
| std::string | m_imu_joint_name |
| The name of the joint IMU is attached to. More... | |
| std::string | m_urdf_filename |
| URDF file path. More... | |
| dynamicgraph::Vector | m_dgv_urdf_to_sot |
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... | |
| dynamicgraph::sot::RobotUtil::RobotUtil | ( | ) |
| bool dynamicgraph::sot::RobotUtil::base_sot_to_urdf | ( | ConstRefVector | q_sot, |
| RefVector | q_urdf | ||
| ) |
| bool dynamicgraph::sot::RobotUtil::base_urdf_to_sot | ( | ConstRefVector | q_urdf, |
| RefVector | q_sot | ||
| ) |
| bool dynamicgraph::sot::RobotUtil::config_sot_to_urdf | ( | ConstRefVector | q_sot, |
| RefVector | q_urdf | ||
| ) |
| bool dynamicgraph::sot::RobotUtil::config_urdf_to_sot | ( | ConstRefVector | q_urdf, |
| RefVector | q_sot | ||
| ) |
| JointLimits dynamicgraph::sot::RobotUtil::cp_get_joint_limits_from_id | ( | Index | id | ) |
| 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).
| void dynamicgraph::sot::RobotUtil::display | ( | std::ostream & | os | ) | const |
| 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;
| name | Name of the joint to find. |
| 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).
| id | Id of the joint to find. |
| 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";
| id | Id of the joint to find. |
|
inline |
Get a parameter of type string. If parameter_name already exists the value is overwritten. If not it is inserted.
| parameter_name | Name of the parameter Return false if the parameter is not found. |
| boost::property_tree::ptree& dynamicgraph::sot::RobotUtil::get_property_tree | ( | ) |
Access to property tree directly
|
inline |
Get the logger's verbosity level.
| bool dynamicgraph::sot::RobotUtil::joints_sot_to_urdf | ( | ConstRefVector | q_sot, |
| RefVector | q_urdf | ||
| ) |
| bool dynamicgraph::sot::RobotUtil::joints_urdf_to_sot | ( | ConstRefVector | q_urdf, |
| RefVector | q_sot | ||
| ) |
| 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.
| 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.
| void dynamicgraph::sot::RobotUtil::set_name_to_id | ( | const std::string & | jointName, |
| const Index & | jointId | ||
| ) |
Set relation between the name and the SoT id.
|
inline |
Set a parameter of type string. If parameter_name already exists the value is overwritten. If not it is inserted.
| void dynamicgraph::sot::RobotUtil::set_urdf_to_sot | ( | const dynamicgraph::Vector & | urdf_to_sot | ) |
| void dynamicgraph::sot::RobotUtil::set_urdf_to_sot | ( | const std::vector< Index > & | urdf_to_sot | ) |
Set the map between urdf index and sot index.
|
inline |
Specify the verbosity level of the logger.
| bool dynamicgraph::sot::RobotUtil::velocity_sot_to_urdf | ( | ConstRefVector | q_urdf, |
| ConstRefVector | v_sot, | ||
| RefVector | v_urdf | ||
| ) |
| bool dynamicgraph::sot::RobotUtil::velocity_urdf_to_sot | ( | ConstRefVector | q_urdf, |
| ConstRefVector | v_urdf, | ||
| RefVector | v_sot | ||
| ) |
|
protected |
| dynamicgraph::Vector dynamicgraph::sot::RobotUtil::m_dgv_urdf_to_sot |
| FootUtil dynamicgraph::sot::RobotUtil::m_foot_util |
Foot information.
| ForceUtil dynamicgraph::sot::RobotUtil::m_force_util |
Forces data.
| HandUtil dynamicgraph::sot::RobotUtil::m_hand_util |
Hand information.
| std::map<Index, std::string> dynamicgraph::sot::RobotUtil::m_id_to_name |
The map between id and name.
| std::string dynamicgraph::sot::RobotUtil::m_imu_joint_name |
The name of the joint IMU is attached to.
| std::map<Index, JointLimits> dynamicgraph::sot::RobotUtil::m_limits_map |
The joint limits map.
| std::map<std::string, Index> dynamicgraph::sot::RobotUtil::m_name_to_id |
Map from the name to the id.
| std::size_t dynamicgraph::sot::RobotUtil::m_nbJoints |
Nb of Dofs for the robot.
| std::string dynamicgraph::sot::RobotUtil::m_urdf_filename |
URDF file path.
| std::vector<Index> dynamicgraph::sot::RobotUtil::m_urdf_to_sot |
Map from the urdf index to the SoT index.
|
protected |
Map of the parameters: map of strings.
|
protected |
Property tree.