18 #ifndef __ROSEE_PARSER__ 19 #define __ROSEE_PARSER__ 27 #include <ros/console.h> 31 #include <yaml-cpp/yaml.h> 32 #include <urdf_parser/urdf_parser.h> 33 #include <kdl_parser/kdl_parser.hpp> 34 #include <srdfdom/model.h> 37 #include <boost/filesystem/path.hpp> 50 typedef std::shared_ptr<Parser>
Ptr;
51 typedef std::shared_ptr<const Parser>
ConstPtr;
53 Parser(
const ros::NodeHandle& nh );
73 bool init (
const std::string& urdf_path,
const std::string& srdf_path,
const std::string& action_path );
81 std::map<std::string, urdf::JointConstSharedPtr>
getUrdfJointMap()
const;
98 void getFingerJointMap(std::map<std::string, std::vector<std::string>>& finger_joint_map)
const;
117 void getJointFingerMap(std::map<std::string, std::string>& joint_finger_map)
const;
243 bool getJointsInFinger(std::string base_link, std::string tip_link, std::string finger_name);
249 #endif // __ROSEE_PARSER__ std::shared_ptr< const Parser > ConstPtr
std::string getRoseeConfigPath() const
get the filename (with path) of the yaml config file.
std::string getSrdfString() const
get the whole srdf file parsed as a string
void printEndEffectorFingerJointsMap() const
Utility to print the mapping between the End Effector finger chains and the related actuated joints...
int getActuatedJointsNumber() const
getter for the total number of actuated joints in the configuration files
std::string getUrdfString() const
get the whole urdf file parsed as a string
std::vector< int > _fingers_group_id
bool configure()
configure the ROSEE parser based on the configration files requested
std::map< std::string, std::string > _joint_finger_map
bool init()
Initialization function using the ROS param ROSEEConfigPath.
std::string getEndEffectorName() const
getter for the configure End-Effector name
urdf::ModelInterfaceSharedPtr _urdf_model
std::shared_ptr< Parser > Ptr
std::string getActionPath() const
get the path where emit and parse grasping actions
bool removePassiveJoints()
Function to remove the passive joints from the filled maps.
std::map< std::string, std::vector< std::string > > _finger_joint_map
bool parseSRDF()
Function responsible to parse the SRDF data.
void addNotInFingerJoints()
Parser(const ros::NodeHandle &nh)
std::map< std::string, urdf::JointConstSharedPtr > getUrdfJointMap() const
getter for the URDF information of the joints of the End-Effector
bool parseURDF()
Function responsible to get the file needed to fill the internal data structure of the Parser with da...
Class responsible for parsing the YAML file providing the URDF, SRDF, the EE-HAL library implementati...
std::vector< std::string > _fingers_names
std::map< std::string, urdf::JointConstSharedPtr > _urdf_joint_map
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 ti...
std::map< std::string, std::string > getJointFingerMap() const
getter for a description of the End-Effector as a map of joint name, finger name
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...