#include <collada_writer.h>
Classes | |
struct | SCENE |
Public Member Functions | |
ColladaWriter (urdf::Model const &robot) | |
boost::shared_ptr< DAE > | convert () |
virtual | ~ColladaWriter () |
Protected Member Functions | |
virtual void | handleError (daeString msg) |
virtual void | handleWarning (daeString msg) |
Private Member Functions | |
void | addBindings (SCENE const &scene) |
domEffectRef | addEffect (std::string const &geometry_id, urdf::Color const &color_ambient, urdf::Color const &color_diffuse) |
void | addGeometries () |
void | addJoints (daeElementRef parent) |
void | addKinematicLink (boost::shared_ptr< urdf::Link const > urdf_link, daeElementRef parent, int &link_num) |
void | addKinematics (SCENE const &scene) |
void | addMaterials () |
void | addMimicJoint (domFormulaRef formula, const std::string &joint_sid, const std::string &joint_mimic_sid, double multiplier, double offset) |
domRotateRef | addRotate (daeElementRef parent, urdf::Rotation const &r, daeElementRef before=NULL, bool ignore_zero_rotations=false) |
domTranslateRef | addTranslate (daeElementRef parent, urdf::Vector3 const &position, daeElementRef before=NULL, bool ignore_zero_translations=false) |
void | addVisualLink (boost::shared_ptr< urdf::Link const > urdf_link, daeElementRef parent, int &link_num) |
void | addVisuals (SCENE const &scene) |
void | buildMeshFromSTLLoader (boost::shared_ptr< Mesh > stl_mesh, daeElementRef parent, std::string const &geometry_id) |
SCENE | createScene () |
std::string | getTimeStampString () const |
void | initDocument (std::string const &documentName) |
void | loadMesh (std::string const &filename, domGeometryRef geometry, std::string const &geometry_id) |
bool | loadMeshWithSTLLoader (resource_retriever::MemoryResource const &resource, domGeometryRef geometry, std::string const &geometry_id) |
void | setupPhysics (SCENE const &scene) |
Private Attributes | |
boost::shared_ptr< DAE > | collada_ |
domCOLLADA * | dom_ |
domLibrary_effectsRef | effectsLib_ |
domLibrary_geometriesRef | geometriesLib_ |
std::map< std::string, std::string > | geometry_ids_ |
link.name -> geometry.id | |
std::map< std::string, std::string > | joint_sids_ |
joint.name -> joint.sid | |
domLibrary_jointsRef | jointsLib_ |
domLibrary_kinematics_modelsRef | kinematicsModelsLib_ |
domLibrary_kinematics_scenesRef | kinematicsScenesLib_ |
domKinematics_modelRef | kmodel_ |
domLibrary_materialsRef | materialsLib_ |
std::map< std::string, std::string > | node_ids_ |
joint.name -> node.id | |
domLibrary_physics_scenesRef | physicsScenesLib_ |
urdf::Model | robot_ |
domCOLLADA::domSceneRef | scene_ |
domLibrary_visual_scenesRef | visualScenesLib_ |
Static Private Attributes | |
static int | s_doc_count_ = 0 |
Implements writing urdf::Model objects to a COLLADA DOM.
The API for this class is unstable. The public API for collada_urdf is declared in collada_urdf.h.
Definition at line 66 of file collada_writer.h.
collada_urdf::ColladaWriter::ColladaWriter | ( | urdf::Model const & | robot | ) |
Definition at line 56 of file collada_writer.cpp.
collada_urdf::ColladaWriter::~ColladaWriter | ( | ) | [virtual] |
Definition at line 64 of file collada_writer.cpp.
void collada_urdf::ColladaWriter::addBindings | ( | SCENE const & | scene | ) | [private] |
Definition at line 528 of file collada_writer.cpp.
domEffectRef collada_urdf::ColladaWriter::addEffect | ( | std::string const & | geometry_id, | |
urdf::Color const & | color_ambient, | |||
urdf::Color const & | color_diffuse | |||
) | [private] |
void collada_urdf::ColladaWriter::addGeometries | ( | ) | [private] |
Definition at line 196 of file collada_writer.cpp.
void collada_urdf::ColladaWriter::addJoints | ( | daeElementRef | parent | ) | [private] |
Definition at line 385 of file collada_writer.cpp.
void collada_urdf::ColladaWriter::addKinematicLink | ( | boost::shared_ptr< urdf::Link const > | urdf_link, | |
daeElementRef | parent, | |||
int & | link_num | |||
) | [private] |
void collada_urdf::ColladaWriter::addKinematics | ( | SCENE const & | scene | ) | [private] |
Definition at line 568 of file collada_writer.cpp.
void collada_urdf::ColladaWriter::addMaterials | ( | ) | [private] |
Definition at line 688 of file collada_writer.cpp.
void collada_urdf::ColladaWriter::addMimicJoint | ( | domFormulaRef | formula, | |
const std::string & | joint_sid, | |||
const std::string & | joint_mimic_sid, | |||
double | multiplier, | |||
double | offset | |||
) | [private] |
Definition at line 932 of file collada_writer.cpp.
domRotateRef collada_urdf::ColladaWriter::addRotate | ( | daeElementRef | parent, | |
urdf::Rotation const & | r, | |||
daeElementRef | before = NULL , |
|||
bool | ignore_zero_rotations = false | |||
) | [private] |
Definition at line 891 of file collada_writer.cpp.
domTranslateRef collada_urdf::ColladaWriter::addTranslate | ( | daeElementRef | parent, | |
urdf::Vector3 const & | position, | |||
daeElementRef | before = NULL , |
|||
bool | ignore_zero_translations = false | |||
) | [private] |
Definition at line 872 of file collada_writer.cpp.
void collada_urdf::ColladaWriter::addVisualLink | ( | boost::shared_ptr< urdf::Link const > | urdf_link, | |
daeElementRef | parent, | |||
int & | link_num | |||
) | [private] |
void collada_urdf::ColladaWriter::addVisuals | ( | SCENE const & | scene | ) | [private] |
Definition at line 677 of file collada_writer.cpp.
void collada_urdf::ColladaWriter::buildMeshFromSTLLoader | ( | boost::shared_ptr< Mesh > | stl_mesh, | |
daeElementRef | parent, | |||
std::string const & | geometry_id | |||
) | [private] |
shared_ptr< DAE > collada_urdf::ColladaWriter::convert | ( | ) |
Definition at line 66 of file collada_writer.cpp.
ColladaWriter::SCENE collada_urdf::ColladaWriter::createScene | ( | ) | [private] |
Definition at line 151 of file collada_writer.cpp.
string collada_urdf::ColladaWriter::getTimeStampString | ( | ) | const [private] |
Definition at line 961 of file collada_writer.cpp.
void collada_urdf::ColladaWriter::handleError | ( | daeString | msg | ) | [protected, virtual] |
Definition at line 90 of file collada_writer.cpp.
void collada_urdf::ColladaWriter::handleWarning | ( | daeString | msg | ) | [protected, virtual] |
Definition at line 94 of file collada_writer.cpp.
void collada_urdf::ColladaWriter::initDocument | ( | std::string const & | documentName | ) | [private] |
void collada_urdf::ColladaWriter::loadMesh | ( | std::string const & | filename, | |
domGeometryRef | geometry, | |||
std::string const & | geometry_id | |||
) | [private] |
bool collada_urdf::ColladaWriter::loadMeshWithSTLLoader | ( | resource_retriever::MemoryResource const & | resource, | |
domGeometryRef | geometry, | |||
std::string const & | geometry_id | |||
) | [private] |
void collada_urdf::ColladaWriter::setupPhysics | ( | SCENE const & | scene | ) | [private] |
Definition at line 184 of file collada_writer.cpp.
boost::shared_ptr<DAE> collada_urdf::ColladaWriter::collada_ [private] |
Definition at line 121 of file collada_writer.h.
domCOLLADA* collada_urdf::ColladaWriter::dom_ [private] |
Definition at line 122 of file collada_writer.h.
domLibrary_effectsRef collada_urdf::ColladaWriter::effectsLib_ [private] |
Definition at line 132 of file collada_writer.h.
domLibrary_geometriesRef collada_urdf::ColladaWriter::geometriesLib_ [private] |
Definition at line 125 of file collada_writer.h.
std::map<std::string, std::string> collada_urdf::ColladaWriter::geometry_ids_ [private] |
link.name -> geometry.id
Definition at line 136 of file collada_writer.h.
std::map<std::string, std::string> collada_urdf::ColladaWriter::joint_sids_ [private] |
joint.name -> joint.sid
Definition at line 137 of file collada_writer.h.
domLibrary_jointsRef collada_urdf::ColladaWriter::jointsLib_ [private] |
Definition at line 129 of file collada_writer.h.
domLibrary_kinematics_modelsRef collada_urdf::ColladaWriter::kinematicsModelsLib_ [private] |
Definition at line 128 of file collada_writer.h.
domLibrary_kinematics_scenesRef collada_urdf::ColladaWriter::kinematicsScenesLib_ [private] |
Definition at line 127 of file collada_writer.h.
domKinematics_modelRef collada_urdf::ColladaWriter::kmodel_ [private] |
Definition at line 134 of file collada_writer.h.
domLibrary_materialsRef collada_urdf::ColladaWriter::materialsLib_ [private] |
Definition at line 131 of file collada_writer.h.
std::map<std::string, std::string> collada_urdf::ColladaWriter::node_ids_ [private] |
joint.name -> node.id
Definition at line 138 of file collada_writer.h.
domLibrary_physics_scenesRef collada_urdf::ColladaWriter::physicsScenesLib_ [private] |
Definition at line 130 of file collada_writer.h.
urdf::Model collada_urdf::ColladaWriter::robot_ [private] |
Definition at line 120 of file collada_writer.h.
int collada_urdf::ColladaWriter::s_doc_count_ = 0 [static, private] |
Definition at line 118 of file collada_writer.h.
domCOLLADA::domSceneRef collada_urdf::ColladaWriter::scene_ [private] |
Definition at line 123 of file collada_writer.h.
domLibrary_visual_scenesRef collada_urdf::ColladaWriter::visualScenesLib_ [private] |
Definition at line 126 of file collada_writer.h.