hpp::model::srdf::Parser Class Reference

Parse an SRDF file to add semantic information (special configurations, collision pairs) to an existing hpp::model::HumanoidRobotPtr_t. More...

#include <hpp/model/srdf/parser.hh>

List of all members.

Public Types

typedef
::srdf::Model::DisabledCollision 
CollisionPairType
typedef std::vector
< CollisionPairType
CollisionPairsType
typedef std::map< std::string,
std::vector< double > > 
ConfigurationType
typedef ::srdf::Model::GroupState SRDFGroupStateType
typedef std::vector
< SRDFGroupStateType
SRDFGroupStatesType
typedef urdf::Parser::BodyType BodyType
typedef urdf::Parser::RobotPtrType RobotPtrType

Public Member Functions

 Parser (urdf::Parser *parser)
 Default constructor.
virtual ~Parser ()
 Destructor.
void displayDisabledCollisionPairs (std::ostream &os)
 Display in output stream list of disabled collision pairs.
void parse (const std::string &semanticResourceName, RobotPtrType robot)
 Parse an URDF file and add semantic information to humanoid robot.
void parseFromParameter (const std::string &srdfParameterName, RobotPtrType robot)
 Parse a ROS parameter containing a srdf robot description.
void processSemanticDescription ()
 Process information parsed from a file or a parameter.
void prefix (const std::string &prefix)
 Set the prefix of all joints.

Protected Member Functions

void addCollisionPairs ()
 Add collision pairs to robot.
bool isCollisionPairDisabled (const std::string &bodyName_1, const std::string &bodyName_2)
 Check if given body pair is disabled.
bool areDofsInJoint (const std::vector< double > &dofs, const std::string &jointName, std::string &jointType)
 Check if dof vector is consistent with joint.

Detailed Description

Parse an SRDF file to add semantic information (special configurations, collision pairs) to an existing hpp::model::HumanoidRobotPtr_t.


Member Typedef Documentation

typedef ::srdf::Model::DisabledCollision hpp::model::srdf::Parser::CollisionPairType
typedef std::map<std::string, std::vector<double> > hpp::model::srdf::Parser::ConfigurationType
typedef ::srdf::Model::GroupState hpp::model::srdf::Parser::SRDFGroupStateType

Constructor & Destructor Documentation

Default constructor.

Parameters:
parserthe corresponding URDF parse
Note:
the parser will NOT be deleted by the destructor
virtual hpp::model::srdf::Parser::~Parser ( ) [virtual]

Destructor.


Member Function Documentation

Add collision pairs to robot.

bool hpp::model::srdf::Parser::areDofsInJoint ( const std::vector< double > &  dofs,
const std::string &  jointName,
std::string &  jointType 
) [protected]

Check if dof vector is consistent with joint.

Display in output stream list of disabled collision pairs.

bool hpp::model::srdf::Parser::isCollisionPairDisabled ( const std::string &  bodyName_1,
const std::string &  bodyName_2 
) [protected]

Check if given body pair is disabled.

void hpp::model::srdf::Parser::parse ( const std::string &  semanticResourceName,
RobotPtrType  robot 
)

Parse an URDF file and add semantic information to humanoid robot.

The URDF and SRDF file location must use the resource retriever format.

For instance, the following strings are allowed:

See resource_retriever documentation for more information.

Parameters:
semanticResourceNameSRDF resource name
robotthe robot being constructed.
Note:
the inner URDF parser should have been updated before.
void hpp::model::srdf::Parser::parseFromParameter ( const std::string &  srdfParameterName,
RobotPtrType  robot 
)

Parse a ROS parameter containing a srdf robot description.

Parameters:
srdfParameterNamename of the ROS parameter,
robotthe robot being constructed.
Note:
the inner URDF parser should have been updated before.
void hpp::model::srdf::Parser::prefix ( const std::string &  prefix) [inline]

Set the prefix of all joints.

Process information parsed from a file or a parameter.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends