Classes | Public Member Functions | Protected Member Functions | Private Types | Static Private Member Functions | Private Attributes
collada_urdf::ColladaWriter Class Reference

Implements writing urdf::Model objects to a COLLADA DOM. More...

List of all members.

Classes

struct  axis_sids
struct  instance_articulated_system_output
struct  instance_kinematics_model_output
struct  instance_physics_model_output
struct  kinbody_models
struct  kinematics_model_output
struct  LINKOUTPUT
struct  physics_model_output
struct  SCENE

Public Member Functions

 ColladaWriter (const urdf::Model &robot, int writeoptions)
bool convert ()
daeDocument * doc ()
bool writeTo (string const &file)
virtual ~ColladaWriter ()

Protected Member Functions

void _buildAiMesh (const aiScene *scene, aiNode *node, domMeshRef pdommesh, domFloat_arrayRef parray, const string &geomid, const urdf::Vector3 &scale, urdf::Pose *org_trans=NULL)
void _CreateScene ()
void _loadMesh (std::string const &filename, domGeometryRef pdomgeom, const urdf::Vector3 &scale, urdf::Pose *org_trans)
void _loadVertices (const shapes::Mesh *mesh, domGeometryRef pdomgeom)
void _WriteBindingsInstance_kinematics_scene ()
domEffectRef _WriteEffect (std::string const &effect_id, urdf::Color const &color_ambient, urdf::Color const &color_diffuse)
domGeometryRef _WriteGeometry (boost::shared_ptr< urdf::Geometry > geometry, const std::string &geometry_id, urdf::Pose *org_trans=NULL)
virtual void _WriteInstance_kinematics_model (daeElementRef parent, const string &sidscope, int id)
 Write kinematic body in a given scene.
boost::shared_ptr
< instance_physics_model_output
_WriteInstance_physics_model (int id, daeElementRef parent, const string &sidscope, const MAPLINKPOSES &maplinkposes)
virtual LINKOUTPUT _WriteLink (boost::shared_ptr< const urdf::Link > plink, daeElementRef pkinparent, domNodeRef pnodeparent, const string &strModelUri)
 Write link of a kinematic body.
void _WriteMaterial (const string &geometry_id, boost::shared_ptr< urdf::Material > material)
void _WritePhysics ()
void _WriteRobot (int id=0)
 Write kinematic body in a given scene.
void _WriteTransformation (daeElementRef pelt, const urdf::Pose &t)
 Write transformation.
virtual void handleError (daeString msg)
virtual void handleWarning (daeString msg)
virtual boost::shared_ptr
< kinematics_model_output
WriteKinematics_model (int id)
boost::shared_ptr
< physics_model_output
WritePhysics_model (int id, const MAPLINKPOSES &maplinkposes)

Private Types

typedef std::map
< boost::shared_ptr< const
urdf::Link >, urdf::Pose
MAPLINKPOSES

Static Private Member Functions

static std::string _ComputeId (const std::string &name)
 computes a collada-compliant sid from the urdf name
static std::string _ComputeKinematics_modelId (int id)
static urdf::Pose _poseInverse (const urdf::Pose &p)
static urdf::Vector3 _poseMult (const urdf::Pose &p, const urdf::Vector3 &v)
static urdf::Pose _poseMult (const urdf::Pose &p0, const urdf::Pose &p1)
static urdf::Rotation _quatFromMatrix (const boost::array< double, 12 > &mat)
static urdf::Rotation _quatMult (const urdf::Rotation &quat0, const urdf::Rotation &quat1)

Private Attributes

domLibrary_articulated_systemsRef _articulatedSystemsLib
DAE _collada
daeDocument * _doc
domCOLLADA * _dom
domLibrary_effectsRef _effectsLib
domLibrary_geometriesRef _geometriesLib
domCOLLADA::domSceneRef _globalscene
boost::shared_ptr
< instance_articulated_system_output
_iasout
boost::shared_ptr
< instance_kinematics_model_output
_ikmout
Assimp::Importer _importer
domLibrary_kinematics_modelsRef _kinematicsModelsLib
domLibrary_kinematics_scenesRef _kinematicsScenesLib
std::map< boost::shared_ptr
< const urdf::Joint >, int > 
_mapjointindices
std::map< boost::shared_ptr
< const urdf::Link >, int > 
_maplinkindices
std::map< boost::shared_ptr
< const urdf::Material >, int > 
_mapmaterialindices
domLibrary_materialsRef _materialsLib
domLibrary_physics_modelsRef _physicsModelsLib
domLibrary_physics_scenesRef _physicsScenesLib
const urdf::Model_robot
SCENE _scene
domTechniqueRef _sensorsLib
 custom sensors library
domLibrary_visual_scenesRef _visualScenesLib
int _writeoptions

Detailed Description

Implements writing urdf::Model objects to a COLLADA DOM.

Definition at line 528 of file collada_urdf.cpp.


Member Typedef Documentation

typedef std::map< boost::shared_ptr<const urdf::Link>, urdf::Pose > collada_urdf::ColladaWriter::MAPLINKPOSES [private]

Definition at line 541 of file collada_urdf.cpp.


Constructor & Destructor Documentation

collada_urdf::ColladaWriter::ColladaWriter ( const urdf::Model robot,
int  writeoptions 
) [inline]

Definition at line 612 of file collada_urdf.cpp.

virtual collada_urdf::ColladaWriter::~ColladaWriter ( ) [inline, virtual]

Definition at line 616 of file collada_urdf.cpp.


Member Function Documentation

void collada_urdf::ColladaWriter::_buildAiMesh ( const aiScene *  scene,
aiNode *  node,
domMeshRef  pdommesh,
domFloat_arrayRef  parray,
const string &  geomid,
const urdf::Vector3 &  scale,
urdf::Pose org_trans = NULL 
) [inline, protected]

Definition at line 1538 of file collada_urdf.cpp.

static std::string collada_urdf::ColladaWriter::_ComputeId ( const std::string &  name) [inline, static, private]

computes a collada-compliant sid from the urdf name

Definition at line 1892 of file collada_urdf.cpp.

static std::string collada_urdf::ColladaWriter::_ComputeKinematics_modelId ( int  id) [inline, static, private]

Definition at line 1886 of file collada_urdf.cpp.

void collada_urdf::ColladaWriter::_CreateScene ( ) [inline, protected]

Definition at line 719 of file collada_urdf.cpp.

void collada_urdf::ColladaWriter::_loadMesh ( std::string const &  filename,
domGeometryRef  pdomgeom,
const urdf::Vector3 &  scale,
urdf::Pose org_trans 
) [inline, protected]

Definition at line 1489 of file collada_urdf.cpp.

void collada_urdf::ColladaWriter::_loadVertices ( const shapes::Mesh mesh,
domGeometryRef  pdomgeom 
) [inline, protected]

Definition at line 1436 of file collada_urdf.cpp.

static urdf::Pose collada_urdf::ColladaWriter::_poseInverse ( const urdf::Pose p) [inline, static, private]

Definition at line 1800 of file collada_urdf.cpp.

static urdf::Vector3 collada_urdf::ColladaWriter::_poseMult ( const urdf::Pose p,
const urdf::Vector3 &  v 
) [inline, static, private]

Definition at line 1782 of file collada_urdf.cpp.

static urdf::Pose collada_urdf::ColladaWriter::_poseMult ( const urdf::Pose p0,
const urdf::Pose p1 
) [inline, static, private]

Definition at line 1830 of file collada_urdf.cpp.

static urdf::Rotation collada_urdf::ColladaWriter::_quatFromMatrix ( const boost::array< double, 12 > &  mat) [inline, static, private]

Definition at line 1838 of file collada_urdf.cpp.

static urdf::Rotation collada_urdf::ColladaWriter::_quatMult ( const urdf::Rotation &  quat0,
const urdf::Rotation &  quat1 
) [inline, static, private]

Definition at line 1814 of file collada_urdf.cpp.

Definition at line 1766 of file collada_urdf.cpp.

domEffectRef collada_urdf::ColladaWriter::_WriteEffect ( std::string const &  effect_id,
urdf::Color const &  color_ambient,
urdf::Color const &  color_diffuse 
) [inline, protected]

Definition at line 1671 of file collada_urdf.cpp.

domGeometryRef collada_urdf::ColladaWriter::_WriteGeometry ( boost::shared_ptr< urdf::Geometry >  geometry,
const std::string &  geometry_id,
urdf::Pose org_trans = NULL 
) [inline, protected]

Definition at line 1278 of file collada_urdf.cpp.

virtual void collada_urdf::ColladaWriter::_WriteInstance_kinematics_model ( daeElementRef  parent,
const string &  sidscope,
int  id 
) [inline, protected, virtual]

Write kinematic body in a given scene.

Definition at line 875 of file collada_urdf.cpp.

boost::shared_ptr<instance_physics_model_output> collada_urdf::ColladaWriter::_WriteInstance_physics_model ( int  id,
daeElementRef  parent,
const string &  sidscope,
const MAPLINKPOSES maplinkposes 
) [inline, protected]

Definition at line 1354 of file collada_urdf.cpp.

virtual LINKOUTPUT collada_urdf::ColladaWriter::_WriteLink ( boost::shared_ptr< const urdf::Link >  plink,
daeElementRef  pkinparent,
domNodeRef  pnodeparent,
const string &  strModelUri 
) [inline, protected, virtual]

Write link of a kinematic body.

Parameters:
linkLink to write
pkinparentKinbody parent
pnodeparentNode parent
strModelUri

Definition at line 1128 of file collada_urdf.cpp.

void collada_urdf::ColladaWriter::_WriteMaterial ( const string &  geometry_id,
boost::shared_ptr< urdf::Material >  material 
) [inline, protected]

Definition at line 1317 of file collada_urdf.cpp.

void collada_urdf::ColladaWriter::_WritePhysics ( ) [inline, protected]

Definition at line 749 of file collada_urdf.cpp.

void collada_urdf::ColladaWriter::_WriteRobot ( int  id = 0) [inline, protected]

Write kinematic body in a given scene.

Definition at line 757 of file collada_urdf.cpp.

void collada_urdf::ColladaWriter::_WriteTransformation ( daeElementRef  pelt,
const urdf::Pose t 
) [inline, protected]

Write transformation.

Parameters:
peltElement to transform
tTransform to write

Definition at line 1728 of file collada_urdf.cpp.

< documented profile on robot extensions

Definition at line 623 of file collada_urdf.cpp.

daeDocument* collada_urdf::ColladaWriter::doc ( ) [inline]

Definition at line 619 of file collada_urdf.cpp.

virtual void collada_urdf::ColladaWriter::handleError ( daeString  msg) [inline, protected, virtual]

Definition at line 712 of file collada_urdf.cpp.

virtual void collada_urdf::ColladaWriter::handleWarning ( daeString  msg) [inline, protected, virtual]

Definition at line 715 of file collada_urdf.cpp.

virtual boost::shared_ptr<kinematics_model_output> collada_urdf::ColladaWriter::WriteKinematics_model ( int  id) [inline, protected, virtual]

Definition at line 928 of file collada_urdf.cpp.

boost::shared_ptr<physics_model_output> collada_urdf::ColladaWriter::WritePhysics_model ( int  id,
const MAPLINKPOSES maplinkposes 
) [inline, protected]

!inertial));

Definition at line 1381 of file collada_urdf.cpp.

bool collada_urdf::ColladaWriter::writeTo ( string const &  file) [inline]

Definition at line 701 of file collada_urdf.cpp.


Member Data Documentation

domLibrary_articulated_systemsRef collada_urdf::ColladaWriter::_articulatedSystemsLib [private]

Definition at line 1914 of file collada_urdf.cpp.

Definition at line 1906 of file collada_urdf.cpp.

daeDocument* collada_urdf::ColladaWriter::_doc [private]

Definition at line 1908 of file collada_urdf.cpp.

domCOLLADA* collada_urdf::ColladaWriter::_dom [private]

Definition at line 1907 of file collada_urdf.cpp.

domLibrary_effectsRef collada_urdf::ColladaWriter::_effectsLib [private]

Definition at line 1918 of file collada_urdf.cpp.

domLibrary_geometriesRef collada_urdf::ColladaWriter::_geometriesLib [private]

Definition at line 1919 of file collada_urdf.cpp.

domCOLLADA::domSceneRef collada_urdf::ColladaWriter::_globalscene [private]

Definition at line 1909 of file collada_urdf.cpp.

Definition at line 1924 of file collada_urdf.cpp.

Definition at line 1923 of file collada_urdf.cpp.

Assimp::Importer collada_urdf::ColladaWriter::_importer [private]

Definition at line 1928 of file collada_urdf.cpp.

domLibrary_kinematics_modelsRef collada_urdf::ColladaWriter::_kinematicsModelsLib [private]

Definition at line 1913 of file collada_urdf.cpp.

domLibrary_kinematics_scenesRef collada_urdf::ColladaWriter::_kinematicsScenesLib [private]

Definition at line 1912 of file collada_urdf.cpp.

std::map< boost::shared_ptr<const urdf::Joint>, int > collada_urdf::ColladaWriter::_mapjointindices [private]

Definition at line 1925 of file collada_urdf.cpp.

std::map< boost::shared_ptr<const urdf::Link>, int > collada_urdf::ColladaWriter::_maplinkindices [private]

Definition at line 1926 of file collada_urdf.cpp.

std::map< boost::shared_ptr<const urdf::Material>, int > collada_urdf::ColladaWriter::_mapmaterialindices [private]

Definition at line 1927 of file collada_urdf.cpp.

domLibrary_materialsRef collada_urdf::ColladaWriter::_materialsLib [private]

Definition at line 1917 of file collada_urdf.cpp.

domLibrary_physics_modelsRef collada_urdf::ColladaWriter::_physicsModelsLib [private]

Definition at line 1916 of file collada_urdf.cpp.

domLibrary_physics_scenesRef collada_urdf::ColladaWriter::_physicsScenesLib [private]

Definition at line 1915 of file collada_urdf.cpp.

Definition at line 1905 of file collada_urdf.cpp.

Definition at line 1921 of file collada_urdf.cpp.

domTechniqueRef collada_urdf::ColladaWriter::_sensorsLib [private]

custom sensors library

Definition at line 1920 of file collada_urdf.cpp.

domLibrary_visual_scenesRef collada_urdf::ColladaWriter::_visualScenesLib [private]

Definition at line 1911 of file collada_urdf.cpp.

Definition at line 1903 of file collada_urdf.cpp.


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


collada_urdf
Author(s): Tim Field, Rosen Diankov
autogenerated on Thu Aug 27 2015 14:41:03