Public Member Functions | Private Member Functions | Private Attributes | List of all members
dynamicgraph::sot::ExtractJointMimics Class Reference

#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_
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ExtractJointMimics()

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.

Member Function Documentation

◆ get_mimic_joints()

const std::vector< std::string > & dynamicgraph::sot::ExtractJointMimics::get_mimic_joints ( )

Get mimic joints.

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

◆ go_through()

void dynamicgraph::sot::ExtractJointMimics::go_through ( boost::property_tree::ptree &  pt,
int  level,
int  stage 
)
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.

◆ go_through_full()

void dynamicgraph::sot::ExtractJointMimics::go_through_full ( )
private

Root of the recursive parsing.

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

Member Data Documentation

◆ current_joint_name_

std::string dynamicgraph::sot::ExtractJointMimics::current_joint_name_
private

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

◆ mimic_joints_

std::vector<std::string> dynamicgraph::sot::ExtractJointMimics::mimic_joints_
private

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

◆ tree_

boost::property_tree::ptree dynamicgraph::sot::ExtractJointMimics::tree_
private

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


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


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:27