Public Member Functions | Public Attributes | Protected Member Functions | List of all members
srdf::SRDFWriter Class Reference

#include <srdf_writer.h>

Public Member Functions

void createCollisionDefaultsXML (tinyxml2::XMLElement *root)
 
void createDisabledCollisionPairsXML (tinyxml2::XMLElement *root)
 
void createEndEffectorsXML (tinyxml2::XMLElement *root)
 
void createGroupStatesXML (tinyxml2::XMLElement *root)
 
void createGroupsXML (tinyxml2::XMLElement *root)
 
void createJointPropertiesXML (tinyxml2::XMLElement *root)
 
void createLinkSphereApproximationsXML (tinyxml2::XMLElement *root)
 
void createPassiveJointsXML (tinyxml2::XMLElement *root)
 
void createVirtualJointsXML (tinyxml2::XMLElement *root)
 
void generateSRDF (tinyxml2::XMLDocument &document)
 
std::string getSRDFString ()
 
void initModel (const urdf::ModelInterface &robot_model, const srdf::Model &srdf_model)
 
bool initString (const urdf::ModelInterface &robot_model, const std::string &srdf_string)
 
 SRDFWriter ()
 
void updateSRDFModel (const urdf::ModelInterface &robot_model)
 
bool writeSRDF (const std::string &file_path)
 
 ~SRDFWriter ()
 

Public Attributes

std::vector< Model::CollisionPairdisabled_collision_pairs_
 
std::vector< Model::CollisionPairenabled_collision_pairs_
 
std::vector< Model::EndEffectorend_effectors_
 
std::vector< Model::GroupStategroup_states_
 
std::vector< Model::Groupgroups_
 
Model::JointPropertyMap joint_properties_
 
std::vector< Model::LinkSphereslink_sphere_approximations_
 
std::vector< std::string > no_default_collision_links_
 
std::vector< Model::PassiveJointpassive_joints_
 
std::string robot_name_
 
ModelSharedPtr srdf_model_
 
std::vector< Model::VirtualJointvirtual_joints_
 

Protected Member Functions

void createCollisionPairsXML (tinyxml2::XMLElement *root, const char *tag_name, const std::vector< Model::CollisionPair > &pairs)
 

Detailed Description

Definition at line 83 of file srdf_writer.h.

Constructor & Destructor Documentation

◆ SRDFWriter()

srdf::SRDFWriter::SRDFWriter ( )

Constructor

Definition at line 59 of file srdf_writer.cpp.

◆ ~SRDFWriter()

srdf::SRDFWriter::~SRDFWriter ( )

Destructor

Definition at line 68 of file srdf_writer.cpp.

Member Function Documentation

◆ createCollisionDefaultsXML()

void srdf::SRDFWriter::createCollisionDefaultsXML ( tinyxml2::XMLElement *  root)

Generate XML for SRDF collision defaults

Parameters
root- TinyXML root element to attach sub elements to

Definition at line 329 of file srdf_writer.cpp.

◆ createCollisionPairsXML()

void srdf::SRDFWriter::createCollisionPairsXML ( tinyxml2::XMLElement *  root,
const char *  tag_name,
const std::vector< Model::CollisionPair > &  pairs 
)
protected

Generate XML for SRDF disabled/enabled collisions of robot link pairs

Parameters
root- TinyXML root element to attach sub elements to

Definition at line 355 of file srdf_writer.cpp.

◆ createDisabledCollisionPairsXML()

void srdf::SRDFWriter::createDisabledCollisionPairsXML ( tinyxml2::XMLElement *  root)

Generate XML for SRDF disabled collisions of robot link pairs

Parameters
root- TinyXML root element to attach sub elements to

Definition at line 375 of file srdf_writer.cpp.

◆ createEndEffectorsXML()

void srdf::SRDFWriter::createEndEffectorsXML ( tinyxml2::XMLElement *  root)

Generate XML for SRDF end effectors

Parameters
root- TinyXML root element to attach sub elements to

Definition at line 431 of file srdf_writer.cpp.

◆ createGroupStatesXML()

void srdf::SRDFWriter::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

Definition at line 393 of file srdf_writer.cpp.

◆ createGroupsXML()

void srdf::SRDFWriter::createGroupsXML ( tinyxml2::XMLElement *  root)

Generate XML for SRDF groups

Parameters
root- TinyXML root element to attach sub elements to

Definition at line 213 of file srdf_writer.cpp.

◆ createJointPropertiesXML()

void srdf::SRDFWriter::createJointPropertiesXML ( tinyxml2::XMLElement *  root)

Generate XML for SRDF joint properties

Parameters
root- TinyXML root element to attach sub elements to

Definition at line 506 of file srdf_writer.cpp.

◆ createLinkSphereApproximationsXML()

void srdf::SRDFWriter::createLinkSphereApproximationsXML ( tinyxml2::XMLElement *  root)

Generate XML for SRDF link collision spheres

Parameters
root- TinyXML root element to attach sub elements to

Definition at line 289 of file srdf_writer.cpp.

◆ createPassiveJointsXML()

void srdf::SRDFWriter::createPassiveJointsXML ( tinyxml2::XMLElement *  root)

Generate XML for SRDF passive joints

Parameters
root- TinyXML root element to attach sub elements to

Definition at line 486 of file srdf_writer.cpp.

◆ createVirtualJointsXML()

void srdf::SRDFWriter::createVirtualJointsXML ( tinyxml2::XMLElement *  root)

Generate XML for SRDF virtual joints

Parameters
root- TinyXML root element to attach sub elements to

Definition at line 459 of file srdf_writer.cpp.

◆ generateSRDF()

void srdf::SRDFWriter::generateSRDF ( tinyxml2::XMLDocument &  document)

Generate SRDF XML of all contained data

Returns
TinyXML document that contains current SRDF data in this class

Definition at line 164 of file srdf_writer.cpp.

◆ getSRDFString()

std::string srdf::SRDFWriter::getSRDFString ( )

Get a string of a generated SRDF document

Returns
string of XML of current SRDF contents

Definition at line 147 of file srdf_writer.cpp.

◆ initModel()

void srdf::SRDFWriter::initModel ( const urdf::ModelInterface &  robot_model,
const srdf::Model srdf_model 
)

Initialize the SRDF writer with an exisiting SRDF model (optional)

Parameters
urdf_modela preloaded urdf model reference
srdf_modela preloaded srdf model reference

Definition at line 92 of file srdf_writer.cpp.

◆ initString()

bool srdf::SRDFWriter::initString ( const urdf::ModelInterface &  robot_model,
const std::string &  srdf_string 
)

Initialize the SRDF writer with an exisiting SRDF file (optional)

Parameters
urdf_modela preloaded urdf model reference
srdf_stringthe text contents of an SRDF file
Returns
bool if initialization was successful

Definition at line 75 of file srdf_writer.cpp.

◆ updateSRDFModel()

void srdf::SRDFWriter::updateSRDFModel ( const urdf::ModelInterface &  robot_model)

Update the SRDF Model class using a new SRDF string

Parameters
robot_modela loaded URDF model

Definition at line 119 of file srdf_writer.cpp.

◆ writeSRDF()

bool srdf::SRDFWriter::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

Definition at line 134 of file srdf_writer.cpp.

Member Data Documentation

◆ disabled_collision_pairs_

std::vector<Model::CollisionPair> srdf::SRDFWriter::disabled_collision_pairs_

Definition at line 261 of file srdf_writer.h.

◆ enabled_collision_pairs_

std::vector<Model::CollisionPair> srdf::SRDFWriter::enabled_collision_pairs_

Definition at line 262 of file srdf_writer.h.

◆ end_effectors_

std::vector<Model::EndEffector> srdf::SRDFWriter::end_effectors_

Definition at line 258 of file srdf_writer.h.

◆ group_states_

std::vector<Model::GroupState> srdf::SRDFWriter::group_states_

Definition at line 256 of file srdf_writer.h.

◆ groups_

std::vector<Model::Group> srdf::SRDFWriter::groups_

Definition at line 255 of file srdf_writer.h.

◆ joint_properties_

Model::JointPropertyMap srdf::SRDFWriter::joint_properties_

Definition at line 264 of file srdf_writer.h.

◆ link_sphere_approximations_

std::vector<Model::LinkSpheres> srdf::SRDFWriter::link_sphere_approximations_

Definition at line 259 of file srdf_writer.h.

◆ no_default_collision_links_

std::vector<std::string> srdf::SRDFWriter::no_default_collision_links_

Definition at line 260 of file srdf_writer.h.

◆ passive_joints_

std::vector<Model::PassiveJoint> srdf::SRDFWriter::passive_joints_

Definition at line 263 of file srdf_writer.h.

◆ robot_name_

std::string srdf::SRDFWriter::robot_name_

Definition at line 270 of file srdf_writer.h.

◆ srdf_model_

ModelSharedPtr srdf::SRDFWriter::srdf_model_

Definition at line 267 of file srdf_writer.h.

◆ virtual_joints_

std::vector<Model::VirtualJoint> srdf::SRDFWriter::virtual_joints_

Definition at line 257 of file srdf_writer.h.


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


srdfdom
Author(s): Ioan Sucan , Guillaume Walck
autogenerated on Wed Oct 16 2024 02:22:59