ROSEndEffector
ROS End-Effector package: provides a ROS-based set of standard interfaces to command robotics end-effectors in an agnostic fashion.
|
Class responsible for parsing the YAML file providing the URDF, SRDF, the EE-HAL library implementation and the EEInterface. More...
#include <Parser.h>
Public Types | |
typedef std::shared_ptr< Parser > | Ptr |
typedef std::shared_ptr< const Parser > | ConstPtr |
Public Member Functions | |
Parser (const ros::NodeHandle &nh) | |
virtual | ~Parser () |
bool | init () |
Initialization function using the ROS param ROSEEConfigPath. More... | |
bool | init (const std::string &urdf_path, const std::string &srdf_path, const std::string &action_path) |
Initialization function using the path_to_cfg parameter for the path. More... | |
std::map< std::string, urdf::JointConstSharedPtr > | getUrdfJointMap () const |
getter for the URDF information of the joints of the End-Effector More... | |
std::map< std::string, std::vector< std::string > > | getFingerJointMap () const |
getter for a description of the End-Effector as a map of finger name, finger joint names. More... | |
void | getFingerJointMap (std::map< std::string, std::vector< std::string >> &finger_joint_map) const |
getter for the map between the finger kinematic chains and the related actuated joints, reference version of getFingerJointMap More... | |
std::map< std::string, std::string > | getJointFingerMap () const |
getter for a description of the End-Effector as a map of joint name, finger name More... | |
void | getJointFingerMap (std::map< std::string, std::string > &joint_finger_map) const |
getter for a description of the End-Effector as a map of joint name, finger name More... | |
std::string | getEndEffectorName () const |
getter for the configure End-Effector name More... | |
int | getActuatedJointsNumber () const |
getter for the total number of actuated joints in the configuration files More... | |
void | printEndEffectorFingerJointsMap () const |
Utility to print the mapping between the End Effector finger chains and the related actuated joints. More... | |
std::string | getUrdfString () const |
get the whole urdf file parsed as a string More... | |
std::string | getSrdfString () const |
get the whole srdf file parsed as a string More... | |
std::string | getActionPath () const |
get the path where emit and parse grasping actions More... | |
std::string | getRoseeConfigPath () const |
get the filename (with path) of the yaml config file. More... | |
Private Member Functions | |
bool | configure () |
configure the ROSEE parser based on the configration files requested More... | |
bool | parseURDF () |
Function responsible to get the file needed to fill the internal data structure of the Parser with data coming from the ros_ee configuration file requested by the user. More... | |
bool | parseSRDF () |
Function responsible to parse the SRDF data. More... | |
void | addNotInFingerJoints () |
bool | removePassiveJoints () |
Function to remove the passive joints from the filled maps. More... | |
bool | getJointsInFinger (std::string base_link, std::string tip_link, std::string finger_name) |
fill a data structure related with the revolute/prismatic joints included in between base_link and tip_link in the requested URDF More... | |
Private Attributes | |
ros::NodeHandle | _nh |
std::string | _urdf_path |
std::string | _srdf_path |
std::string | _urdf_string |
std::string | _srdf_string |
std::string | _action_path |
bool | _is_initialized = false |
urdf::ModelInterfaceSharedPtr | _urdf_model |
KDL::Tree | _robot_tree |
srdf::Model | _srdfdom |
int | _fingers_num = 0 |
std::vector< std::string > | _fingers_names |
std::vector< int > | _fingers_group_id |
int | _joints_num = 0 |
std::map< std::string, std::vector< std::string > > | _finger_joint_map |
std::map< std::string, std::string > | _joint_finger_map |
std::map< std::string, urdf::JointConstSharedPtr > | _urdf_joint_map |
Class responsible for parsing the YAML file providing the URDF, SRDF, the EE-HAL library implementation and the EEInterface.
typedef std::shared_ptr<const Parser> ROSEE::Parser::ConstPtr |
typedef std::shared_ptr<Parser> ROSEE::Parser::Ptr |
ROSEE::Parser::Parser | ( | const ros::NodeHandle & | nh | ) |
Definition at line 22 of file Parser.cpp.
|
virtual |
Definition at line 28 of file Parser.cpp.
|
private |
Definition at line 172 of file Parser.cpp.
|
private |
configure the ROSEE parser based on the configration files requested
Definition at line 326 of file Parser.cpp.
std::string ROSEE::Parser::getActionPath | ( | ) | const |
get the path where emit and parse grasping actions
Definition at line 464 of file Parser.cpp.
int ROSEE::Parser::getActuatedJointsNumber | ( | ) | const |
getter for the total number of actuated joints in the configuration files
Definition at line 420 of file Parser.cpp.
std::string ROSEE::Parser::getEndEffectorName | ( | ) | const |
getter for the configure End-Effector name
Definition at line 450 of file Parser.cpp.
std::map< std::string, std::vector< std::string > > ROSEE::Parser::getFingerJointMap | ( | ) | const |
getter for a description of the End-Effector as a map of finger name, finger joint names.
There exists another version to get the map as reference: getFingerJointMapAsReference
Definition at line 425 of file Parser.cpp.
void ROSEE::Parser::getFingerJointMap | ( | std::map< std::string, std::vector< std::string >> & | finger_joint_map | ) | const |
getter for the map between the finger kinematic chains and the related actuated joints, reference version of getFingerJointMap
finger_joint_map | a map between the finger kinematic chains and the related actuated joints |
Definition at line 440 of file Parser.cpp.
std::map< std::string, std::string > ROSEE::Parser::getJointFingerMap | ( | ) | const |
getter for a description of the End-Effector as a map of joint name, finger name
Definition at line 430 of file Parser.cpp.
void ROSEE::Parser::getJointFingerMap | ( | std::map< std::string, std::string > & | joint_finger_map | ) | const |
getter for a description of the End-Effector as a map of joint name, finger name
joint_finger_map | a map between the joint and the related finger kinematic chain |
Definition at line 445 of file Parser.cpp.
|
private |
fill a data structure related with the revolute/prismatic joints included in between base_link and tip_link in the requested URDF
base_link | base link of the finger chain |
tip_link | tip link of the finger chain |
Definition at line 32 of file Parser.cpp.
std::string ROSEE::Parser::getRoseeConfigPath | ( | ) | const |
get the filename (with path) of the yaml config file.
Useful get to print infos about file parsed outside this class
std::string ROSEE::Parser::getSrdfString | ( | ) | const |
get the whole srdf file parsed as a string
Definition at line 459 of file Parser.cpp.
std::map< std::string, urdf::JointConstSharedPtr > ROSEE::Parser::getUrdfJointMap | ( | ) | const |
getter for the URDF information of the joints of the End-Effector
Definition at line 435 of file Parser.cpp.
std::string ROSEE::Parser::getUrdfString | ( | ) | const |
get the whole urdf file parsed as a string
Definition at line 455 of file Parser.cpp.
bool ROSEE::Parser::init | ( | ) |
Initialization function using the ROS param ROSEEConfigPath.
Definition at line 362 of file Parser.cpp.
bool ROSEE::Parser::init | ( | const std::string & | urdf_path, |
const std::string & | srdf_path, | ||
const std::string & | action_path | ||
) |
Initialization function using the path_to_cfg parameter for the path.
urdf_path | path to the urdf file |
srdf_path | path to the srdf file |
action_path | path to the action folder |
Definition at line 380 of file Parser.cpp.
|
private |
Function responsible to parse the SRDF data.
Definition at line 85 of file Parser.cpp.
|
private |
Function responsible to get the file needed to fill the internal data structure of the Parser with data coming from the ros_ee configuration file requested by the user.
Definition at line 225 of file Parser.cpp.
void ROSEE::Parser::printEndEffectorFingerJointsMap | ( | ) | const |
Utility to print the mapping between the End Effector finger chains and the related actuated joints.
Definition at line 390 of file Parser.cpp.
|
private |
Function to remove the passive joints from the filled maps.
Definition at line 196 of file Parser.cpp.
|
private |
|
private |
|
private |
|
private |
|
private |