robot_frames
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
robot_frames::TransformationCalculator Class Reference

#include <RobotFrames.hpp>

Public Member Functions

 TransformationCalculator ()
 
void load_robot_model (std::string filepath, bool init_invalid=true)
 
bool is_valid_joint_name (std::string j_name)
 
bool is_valid_joint_type (const KDL::Joint &joint)
 
bool is_valid_joint (const KDL::Joint &joint)
 
void set_blacklist (const std::vector< std::string > &blacklist)
 
void init_blacklist ()
 
void clear_blacklist ()
 
void add_to_blacklist (std::string j_name)
 
void update (const base::samples::Joints &joints)
 
bool get_all_transforms (std::vector< base::samples::RigidBodyState > &transforms, bool keep_content=false)
 
bool get_transform_by_joint_name (const std::string &j_name, base::samples::RigidBodyState &transform)
 
bool get_moving_joints_transforms (std::vector< base::samples::RigidBodyState > &transforms, bool keep_content=false)
 
bool get_static_joints_transforms (std::vector< base::samples::RigidBodyState > &transforms, bool keep_content=false)
 
bool knownJoint (const std::string &link_name)
 
void output_only_valid (bool arg)
 
const KDL::TreeElement & get_tree_element (const std::string &segment_name)
 
const KDL::Segment & get_segment_by_segment_name (const std::string &segment_name)
 
const std::string & get_segment_name_from_joint_name (const std::string &joint_name)
 
std::vector< std::string > get_all_segment_names ()
 
std::vector< std::string > get_static_segment_names ()
 
const std::vector< std::string > & get_moving_joint_names ()
 
const std::vector< std::string > & get_static_joint_names ()
 
const std::vector< std::string > & get_all_joint_names ()
 
const KDL::Segment & get_segment_by_joint (const KDL::Joint joint)
 
const std::string get_parent_name_by_segment_name (std::string seg_name)
 
bool is_fixed (const KDL::Joint &joint)
 
bool is_fixed (const KDL::Segment &segment)
 

Protected Member Functions

void clear_all ()
 

Protected Attributes

std::map< std::string, base::samples::RigidBodyState > moving_joints_transforms_
 
std::map< std::string, base::samples::RigidBodyState > static_joints_transforms_
 
std::vector< std::string > moving_joint_names_
 
std::vector< std::string > static_joint_names_
 
std::vector< std::string > all_joint_names_
 
std::vector< std::string > static_segment_names_
 
std::vector< std::string > blacklist_
 
std::map< std::string, std::string > joint_name2seg_name_
 
KDL::Tree kdl_tree_
 
bool is_initialized_
 
bool output_only_valid_
 

Constructor & Destructor Documentation

robot_frames::TransformationCalculator::TransformationCalculator ( )

Member Function Documentation

void robot_frames::TransformationCalculator::add_to_blacklist ( std::string  j_name)
void robot_frames::TransformationCalculator::clear_all ( )
inlineprotected
void robot_frames::TransformationCalculator::clear_blacklist ( )
const std::vector<std::string>& robot_frames::TransformationCalculator::get_all_joint_names ( )
inline
std::vector<std::string> robot_frames::TransformationCalculator::get_all_segment_names ( )
inline
bool robot_frames::TransformationCalculator::get_all_transforms ( std::vector< base::samples::RigidBodyState > &  transforms,
bool  keep_content = false 
)

Get transforms

Returns
true on success, false otherwise
const std::vector<std::string>& robot_frames::TransformationCalculator::get_moving_joint_names ( )
inline
bool robot_frames::TransformationCalculator::get_moving_joints_transforms ( std::vector< base::samples::RigidBodyState > &  transforms,
bool  keep_content = false 
)
const std::string robot_frames::TransformationCalculator::get_parent_name_by_segment_name ( std::string  seg_name)
inline
const KDL::Segment& robot_frames::TransformationCalculator::get_segment_by_joint ( const KDL::Joint  joint)
inline
const KDL::Segment& robot_frames::TransformationCalculator::get_segment_by_segment_name ( const std::string &  segment_name)
inline
const std::string& robot_frames::TransformationCalculator::get_segment_name_from_joint_name ( const std::string &  joint_name)
inline
const std::vector<std::string>& robot_frames::TransformationCalculator::get_static_joint_names ( )
inline
bool robot_frames::TransformationCalculator::get_static_joints_transforms ( std::vector< base::samples::RigidBodyState > &  transforms,
bool  keep_content = false 
)
std::vector<std::string> robot_frames::TransformationCalculator::get_static_segment_names ( )
inline
bool robot_frames::TransformationCalculator::get_transform_by_joint_name ( const std::string &  j_name,
base::samples::RigidBodyState &  transform 
)
const KDL::TreeElement& robot_frames::TransformationCalculator::get_tree_element ( const std::string &  segment_name)
inline

Retrieve segment by name.

Exceptions
exceptionwhen segment is not known
Returns
reference to segment
void robot_frames::TransformationCalculator::init_blacklist ( )
bool robot_frames::TransformationCalculator::is_fixed ( const KDL::Joint &  joint)
inline
Returns
true, when link provides a fixed transform. False when not.
bool robot_frames::TransformationCalculator::is_fixed ( const KDL::Segment &  segment)
inline
bool robot_frames::TransformationCalculator::is_valid_joint ( const KDL::Joint &  joint)
bool robot_frames::TransformationCalculator::is_valid_joint_name ( std::string  j_name)
bool robot_frames::TransformationCalculator::is_valid_joint_type ( const KDL::Joint &  joint)
bool robot_frames::TransformationCalculator::knownJoint ( const std::string &  link_name)
Returns
true, when segment is known from robot model file, false when not.
void robot_frames::TransformationCalculator::load_robot_model ( std::string  filepath,
bool  init_invalid = true 
)

Load the model file. Throws exception if file not found or model could not be loaded

Parameters
filepath: Path to the robot model definition file
Returns
nothing
void robot_frames::TransformationCalculator::output_only_valid ( bool  arg)

If set to true, only moving joint transformation, that have been set are returned by get_transform_by_joint_name.

void robot_frames::TransformationCalculator::set_blacklist ( const std::vector< std::string > &  blacklist)
void robot_frames::TransformationCalculator::update ( const base::samples::Joints &  joints)

Set state of all the joint of the robot, or just a subset of them. Calculate transforms for the given joints

Parameters
joints: Joint state to set.

Member Data Documentation

std::vector<std::string> robot_frames::TransformationCalculator::all_joint_names_
protected
std::vector<std::string> robot_frames::TransformationCalculator::blacklist_
protected
bool robot_frames::TransformationCalculator::is_initialized_
protected
std::map<std::string, std::string> robot_frames::TransformationCalculator::joint_name2seg_name_
protected
KDL::Tree robot_frames::TransformationCalculator::kdl_tree_
protected
std::vector<std::string> robot_frames::TransformationCalculator::moving_joint_names_
protected
std::map<std::string, base::samples::RigidBodyState> robot_frames::TransformationCalculator::moving_joints_transforms_
protected
bool robot_frames::TransformationCalculator::output_only_valid_
protected
std::vector<std::string> robot_frames::TransformationCalculator::static_joint_names_
protected
std::map<std::string, base::samples::RigidBodyState> robot_frames::TransformationCalculator::static_joints_transforms_
protected
std::vector<std::string> robot_frames::TransformationCalculator::static_segment_names_
protected

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