Class SRDFWriter
Defined in File srdf_writer.h
Class Documentation
-
class SRDFWriter
Public Functions
-
SRDFWriter()
Constructor
-
~SRDFWriter()
Destructor
-
bool initString(const urdf::ModelInterface &robot_model, const std::string &srdf_string)
Initialize the SRDF writer with an exisiting SRDF file (optional)
- Parameters:
urdf_model – a preloaded urdf model reference
srdf_string – the text contents of an SRDF file
- Returns:
bool if initialization was successful
-
void initModel(const urdf::ModelInterface &robot_model, const srdf::Model &srdf_model)
Initialize the SRDF writer with an exisiting SRDF model (optional)
- Parameters:
urdf_model – a preloaded urdf model reference
srdf_model – a preloaded srdf model reference
-
void updateSRDFModel(const urdf::ModelInterface &robot_model)
Update the SRDF Model class using a new SRDF string
- Parameters:
robot_model – a loaded URDF model
-
bool writeSRDF(const std::string &file_path)
Generate SRDF XML of all contained data and save to file
- Parameters:
file_path – - string path location to save SRDF
- Returns:
bool - true if save was successful
-
std::string getSRDFString()
Get a string of a generated SRDF document
- Returns:
string of XML of current SRDF contents
-
void generateSRDF(tinyxml2::XMLDocument &document)
Generate SRDF XML of all contained data
- Returns:
TinyXML document that contains current SRDF data in this class
-
void createGroupsXML(tinyxml2::XMLElement *root)
Generate XML for SRDF groups
- Parameters:
root – - TinyXML root element to attach sub elements to
-
void createLinkSphereApproximationsXML(tinyxml2::XMLElement *root)
Generate XML for SRDF link collision spheres
- Parameters:
root – - TinyXML root element to attach sub elements to
-
void createCollisionDefaultsXML(tinyxml2::XMLElement *root)
Generate XML for SRDF collision defaults
- Parameters:
root – - TinyXML root element to attach sub elements to
-
void createDisabledCollisionPairsXML(tinyxml2::XMLElement *root)
Generate XML for SRDF disabled collisions of robot link pairs
- Parameters:
root – - TinyXML root element to attach sub elements to
-
void createGroupStatesXML(tinyxml2::XMLElement *root)
Generate XML for SRDF group states of each joint’s position
- Parameters:
root – - TinyXML root element to attach sub elements to
-
void createEndEffectorsXML(tinyxml2::XMLElement *root)
Generate XML for SRDF end effectors
- Parameters:
root – - TinyXML root element to attach sub elements to
-
void createVirtualJointsXML(tinyxml2::XMLElement *root)
Generate XML for SRDF virtual joints
- Parameters:
root – - TinyXML root element to attach sub elements to
-
void createPassiveJointsXML(tinyxml2::XMLElement *root)
Generate XML for SRDF passive joints
- Parameters:
root – - TinyXML root element to attach sub elements to
-
void createJointPropertiesXML(tinyxml2::XMLElement *root)
Generate XML for SRDF joint properties
- Parameters:
root – - TinyXML root element to attach sub elements to
Public Members
-
std::vector<Model::GroupState> group_states_
-
std::vector<Model::VirtualJoint> virtual_joints_
-
std::vector<Model::EndEffector> end_effectors_
-
std::vector<Model::LinkSpheres> link_sphere_approximations_
-
std::vector<std::string> no_default_collision_links_
-
std::vector<Model::CollisionPair> disabled_collision_pairs_
-
std::vector<Model::CollisionPair> enabled_collision_pairs_
-
std::vector<Model::PassiveJoint> passive_joints_
-
std::map<std::string, std::vector<srdf::Model::JointProperty>> joint_properties_
-
ModelSharedPtr srdf_model_
-
std::string robot_name_
Protected Functions
-
void createCollisionPairsXML(tinyxml2::XMLElement *root, const char *tag_name, const std::vector<Model::CollisionPair> &pairs)
Generate XML for SRDF disabled/enabled collisions of robot link pairs
- Parameters:
root – - TinyXML root element to attach sub elements to
-
SRDFWriter()