Go to the documentation of this file.
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,
size_type level,
54 boost::property_tree::ptree
tree_;
57 void go_through_full();
64 ForceLimits() : upper(Vector6d::Zero()), lower(Vector6d::Zero()) {}
66 ForceLimits(
const Eigen::VectorXd &l,
const Eigen::VectorXd &u)
67 : upper(
u), lower(l) {}
69 void display(std::ostream &os)
const;
80 void set_name_to_force_id(
const std::string &
name,
const Index &force_id);
82 void set_force_id_to_limits(
const Index &force_id,
86 void create_force_id_to_name_map();
88 Index get_id_from_name(
const std::string &
name);
90 const std::string &get_name_from_id(
Index idx);
91 std::string cp_get_name_from_id(
Index idx);
112 void display(std::ostream &out)
const;
125 void display(std::ostream &os)
const;
131 void display(std::ostream &os)
const;
168 void create_id_to_name_map();
179 const Index &get_id_from_name(
const std::string &
name);
187 const std::string &get_name_from_id(
Index id);
191 void set_name_to_id(
const std::string &jointName,
const Index &jointId);
194 void set_urdf_to_sot(
const std::vector<Index> &urdf_to_sot);
198 void set_joint_limits_for_id(
const Index &idx,
const double &lq,
230 const std::string &lineId =
"");
238 void display(std::ostream &os)
const;
245 template <
typename Type>
247 const Type ¶meter_value) {
249 typedef boost::property_tree::ptree::path_type
path;
250 path apath(parameter_name,
'/');
251 property_tree_.put<
Type>(apath, parameter_value);
252 }
catch (
const boost::property_tree::ptree_error &e) {
253 std::ostringstream oss;
254 oss <<
"Robot utils: parameter path is invalid " <<
'\n'
255 <<
" for set_parameter(" << parameter_name <<
")\n"
256 << e.what() << std::endl;
268 template <
typename Type>
271 boost::property_tree::ptree::path_type apath(parameter_name,
'/');
275 }
catch (
const boost::property_tree::ptree_error &e) {
276 std::ostringstream oss;
277 oss <<
"Robot utils: parameter path is invalid " <<
'\n'
278 <<
" for get_parameter(" << parameter_name <<
")\n"
279 << e.what() << std::endl;
287 boost::property_tree::ptree &get_property_tree();
313 #endif // sot_torque_control_common_h_
Index get_force_id_left_hand()
std::map< Index, std::string > m_id_to_name
The map between id and name.
std::vector< Index > m_urdf_to_sot
Map from the urdf index to the SoT index.
bool base_sot_to_urdf(ConstRefVector q_sot, RefVector q_urdf)
RobotUtilShrPtr createRobotUtil(std::string &robotName)
std::size_t m_nbJoints
Nb of Dofs for the robot.
bool base_se3_to_sot(ConstRefVector pos, ConstRefMatrix R, RefVector q_sot)
Index get_force_id_right_foot()
boost::property_tree::ptree property_tree_
Property tree.
Type get_parameter(const std::string ¶meter_name)
Get a parameter of type string. If parameter_name already exists the value is overwritten....
Eigen::VectorXd::Index Index
Index m_Force_Id_Right_Foot
const typedef Eigen::Ref< const Eigen::MatrixXd > ConstRefMatrix
void setLoggerVerbosityLevel(LoggerVerbosity lv)
Specify the verbosity level of the logger.
Index get_force_id_right_hand()
std::map< std::string, std::string > parameters_strings_
Map of the parameters: map of strings.
dynamicgraph::Vector m_dgv_urdf_to_sot
std::shared_ptr< std::vector< std::string > > getListOfRobots()
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....
const typedef Eigen::Ref< const Eigen::VectorXd > & ConstRefVector
Index get_force_id_left_foot()
std::shared_ptr< RobotUtil > RobotUtilShrPtr
Accessors - This should be changed to RobotUtilPtrShared.
LoggerVerbosity getLoggerVerbosityLevel()
Get the logger's verbosity level.
void set_force_id_left_hand(Index anId)
std::map< Index, JointLimits > m_limits_map
The joint limits map.
ForceLimits(const Eigen::VectorXd &l, const Eigen::VectorXd &u)
ForceUtil m_force_util
Forces data.
void set_force_id_left_foot(Index anId)
RobotUtilShrPtr RefVoidRobotUtil()
std::map< Index, ForceLimits > m_force_id_to_limits
std::string m_Right_Hand_Frame_Name
JointLimits(double l, double u)
std::map< Index, std::string > m_force_id_to_name
Eigen::Ref< Eigen::VectorXd > RefVector
HandUtil m_hand_util
Hand information.
Index m_Force_Id_Right_Hand
RobotUtilShrPtr getRobotUtil(std::string &robotName)
std::map< std::string, Index > m_name_to_force_id
void set_force_id_right_hand(Index anId)
bool base_urdf_to_sot(ConstRefVector q_urdf, RefVector q_sot)
std::string m_imu_joint_name
The name of the joint IMU is attached to.
std::string m_urdf_filename
URDF file path.
std::map< std::string, Index > m_name_to_id
Map from the name to the id.
std::string m_Left_Hand_Frame_Name
void set_force_id_right_foot(Index anId)
FootUtil m_foot_util
Foot information.
bool isNameInRobotUtil(std::string &robotName)
sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31