#include <robot-utils.hh>
Public Member Functions | |
ExtractJointMimics (std::string &robot_model) | |
Constructor. More... | |
const std::vector< std::string > & | get_mimic_joints () |
Get mimic joints. More... | |
Private Member Functions | |
void | go_through (boost::property_tree::ptree &pt, int level, int stage) |
void | go_through_full () |
Private Attributes | |
std::string | current_joint_name_ |
std::vector< std::string > | mimic_joints_ |
boost::property_tree::ptree | tree_ |
Definition at line 41 of file robot-utils.hh.
dynamicgraph::sot::ExtractJointMimics::ExtractJointMimics | ( | std::string & | robot_model | ) |
Constructor.
Read the XML file in the property tree.
Start the recursive parsing.
Definition at line 48 of file robot-utils.cpp.
const std::vector< std::string > & dynamicgraph::sot::ExtractJointMimics::get_mimic_joints | ( | ) |
Get mimic joints.
Definition at line 57 of file robot-utils.cpp.
|
private |
If pt is empty (i.e. this is a leaf)
and this is a name of a joint (stage == 3) update the curret_joint_name_ variable.
This is not a leaf
But this is joint
the continue the exploration.
we are exploring the xml attributes of a joint -> continue the exploration
The xml attribute of the joint is the name next leaf is the name we are possibly looking for
The exploration of the tree tracback on the joint and find that this is a mimic joint.
Save the current name of the joint in mimic_joints.
Explore the subtree of the XML robot description.
Definition at line 67 of file robot-utils.cpp.
|
private |
Root of the recursive parsing.
Definition at line 61 of file robot-utils.cpp.
|
private |
Definition at line 55 of file robot-utils.hh.
|
private |
Definition at line 54 of file robot-utils.hh.
|
private |
Definition at line 53 of file robot-utils.hh.