8 #ifndef __sot_core_robot_utils_H__     9 #define __sot_core_robot_utils_H__    16 #include <pinocchio/fwd.hpp>    23 #include <boost/assign.hpp>    24 #include <boost/property_tree/ptree.hpp>    47   const std::vector<std::string> &get_mimic_joints();
    50   void go_through(boost::property_tree::ptree &pt, 
int level, 
int stage);
    53   boost::property_tree::ptree 
tree_;
    56   void go_through_full();
    63   ForceLimits() : upper(Vector6d::Zero()), lower(Vector6d::Zero()) {}
    65   ForceLimits(
const Eigen::VectorXd &l, 
const Eigen::VectorXd &u)
    66       : upper(u), lower(l) {}
    68   void display(std::ostream &os) 
const;
    77       m_Force_Id_Right_Foot;
    79   void set_name_to_force_id(
const std::string &
name, 
const Index &force_id);
    81   void set_force_id_to_limits(
const Index &force_id,
    85   void create_force_id_to_name_map();
    87   Index get_id_from_name(
const std::string &
name);
    89   const std::string &get_name_from_id(Index idx);
    90   std::string cp_get_name_from_id(Index idx);
    92   const ForceLimits &get_limits_from_id(Index force_id);
   111   void display(std::ostream &out) 
const;
   124   void display(std::ostream &os) 
const;
   130   void display(std::ostream &os) 
const;
   167   void create_id_to_name_map();
   178   const Index &get_id_from_name(
const std::string &
name);
   186   const std::string &get_name_from_id(Index 
id);
   190   void set_name_to_id(
const std::string &jointName, 
const Index &jointId);
   193   void set_urdf_to_sot(
const std::vector<Index> &urdf_to_sot);
   197   void set_joint_limits_for_id(
const Index &idx, 
const double &lq,
   221   const JointLimits &get_joint_limits_from_id(Index 
id);
   229                const std::string &lineId = 
"");
   237   void display(std::ostream &os) 
const;
   244   template <
typename Type>
   246                      const Type ¶meter_value) {
   248       typedef boost::property_tree::ptree::path_type 
path;
   249       path apath(parameter_name, 
'/');
   250       property_tree_.put<
Type>(apath, parameter_value);
   251     } 
catch (
const boost::property_tree::ptree_error &e) {
   252       std::ostringstream oss;
   253       oss << 
"Robot utils: parameter path is invalid " << 
'\n'   254           << 
" for set_parameter(" << parameter_name << 
")\n"   255           << e.what() << std::endl;
   267   template <
typename Type>
   270       boost::property_tree::ptree::path_type apath(parameter_name, 
'/');
   274     } 
catch (
const boost::property_tree::ptree_error &e) {
   275       std::ostringstream oss;
   276       oss << 
"Robot utils: parameter path is invalid " << 
'\n'   277           << 
" for get_parameter(" << parameter_name << 
")\n"   278           << e.what() << std::endl;
   286   boost::property_tree::ptree &get_property_tree();
   312 #endif  // sot_torque_control_common_h_ JointLimits(double l, double u)
std::map< Index, JointLimits > m_limits_map
The joint limits map. 
bool base_sot_to_urdf(ConstRefVector q_sot, RefVector q_urdf)
const Eigen::Ref< const Eigen::VectorXd > & ConstRefVector
Index m_Force_Id_Right_Hand
ForceUtil m_force_util
Forces data. 
void set_force_id_right_hand(Index anId)
bool base_se3_to_sot(ConstRefVector pos, ConstRefMatrix R, RefVector q_sot)
Eigen::VectorXd::Index Index
RobotUtilShrPtr createRobotUtil(std::string &robotName)
std::string m_Left_Hand_Frame_Name
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. 
void set_force_id_right_foot(Index anId)
std::map< std::string, Index > m_name_to_force_id
dynamicgraph::Vector m_dgv_urdf_to_sot
Index get_force_id_right_foot()
void set_force_id_left_foot(Index anId)
std::shared_ptr< std::vector< std::string > > getListOfRobots()
void setLoggerVerbosityLevel(LoggerVerbosity lv)
Specify the verbosity level of the logger. 
const Eigen::Ref< const Eigen::MatrixXd > ConstRefMatrix
std::string m_imu_joint_name
The name of the joint IMU is attached to. 
std::map< Index, ForceLimits > m_force_id_to_limits
std::shared_ptr< RobotUtil > RobotUtilShrPtr
Accessors - This should be changed to RobotUtilPtrShared. 
ForceLimits(const Eigen::VectorXd &l, const Eigen::VectorXd &u)
std::size_t m_nbJoints
Nb of Dofs for the robot. 
void set_force_id_left_hand(Index anId)
RobotUtilShrPtr RefVoidRobotUtil()
LoggerVerbosity getLoggerVerbosityLevel()
Get the logger's verbosity level. 
Index get_force_id_right_hand()
std::vector< Index > m_urdf_to_sot
Map from the urdf index to the SoT index. 
std::string m_Right_Hand_Frame_Name
RobotUtilShrPtr getRobotUtil(std::string &robotName)
FootUtil m_foot_util
Foot information. 
boost::property_tree::ptree property_tree_
Property tree. 
Index get_force_id_left_hand()
std::map< std::string, std::string > parameters_strings_
Map of the parameters: map of strings. 
std::map< std::string, Index > m_name_to_id
Map from the name to the id. 
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. 
HandUtil m_hand_util
Hand information. 
bool base_urdf_to_sot(ConstRefVector q_urdf, RefVector q_sot)
Eigen::Ref< Eigen::VectorXd > RefVector
std::map< Index, std::string > m_force_id_to_name
Index get_force_id_left_foot()
bool isNameInRobotUtil(std::string &robotName)
std::map< Index, std::string > m_id_to_name
The map between id and name. 
std::string m_urdf_filename
URDF file path.