All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines
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)
boost::shared_ptr< DAE > convert ()
virtual ~ColladaWriter ()

Protected Member Functions

void _buildAiMesh (const aiScene *scene, aiNode *node, domMeshRef pdommesh, domFloat_arrayRef parray, const string &geomid, const urdf::Vector3 &scale)
void _CreateScene ()
void _loadMesh (std::string const &filename, domGeometryRef pdomgeom, const urdf::Vector3 &scale)
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)
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
boost::shared_ptr< DAE > _collada
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 496 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 509 of file collada_urdf.cpp.


Constructor & Destructor Documentation

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

Definition at line 580 of file collada_urdf.cpp.

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

Definition at line 587 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 
) [inline, protected]

Definition at line 1394 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 1737 of file collada_urdf.cpp.

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

Definition at line 1731 of file collada_urdf.cpp.

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

Definition at line 677 of file collada_urdf.cpp.

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

Definition at line 1345 of file collada_urdf.cpp.

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

Definition at line 1645 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 1627 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 1675 of file collada_urdf.cpp.

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

Definition at line 1683 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 1659 of file collada_urdf.cpp.

Definition at line 1611 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 1516 of file collada_urdf.cpp.

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

Definition at line 1197 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 833 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 1263 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 1086 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 1226 of file collada_urdf.cpp.

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

Definition at line 707 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 715 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 1573 of file collada_urdf.cpp.

boost::shared_ptr<DAE> collada_urdf::ColladaWriter::convert ( ) [inline]

< documented profile on robot extensions

Definition at line 590 of file collada_urdf.cpp.

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

Definition at line 670 of file collada_urdf.cpp.

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

Definition at line 673 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 886 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 1290 of file collada_urdf.cpp.


Member Data Documentation

domLibrary_articulated_systemsRef collada_urdf::ColladaWriter::_articulatedSystemsLib [private]

Definition at line 1758 of file collada_urdf.cpp.

boost::shared_ptr<DAE> collada_urdf::ColladaWriter::_collada [private]

Definition at line 1751 of file collada_urdf.cpp.

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

Definition at line 1752 of file collada_urdf.cpp.

domLibrary_effectsRef collada_urdf::ColladaWriter::_effectsLib [private]

Definition at line 1762 of file collada_urdf.cpp.

domLibrary_geometriesRef collada_urdf::ColladaWriter::_geometriesLib [private]

Definition at line 1763 of file collada_urdf.cpp.

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

Definition at line 1753 of file collada_urdf.cpp.

Definition at line 1768 of file collada_urdf.cpp.

Definition at line 1767 of file collada_urdf.cpp.

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

Definition at line 1772 of file collada_urdf.cpp.

domLibrary_kinematics_modelsRef collada_urdf::ColladaWriter::_kinematicsModelsLib [private]

Definition at line 1757 of file collada_urdf.cpp.

domLibrary_kinematics_scenesRef collada_urdf::ColladaWriter::_kinematicsScenesLib [private]

Definition at line 1756 of file collada_urdf.cpp.

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

Definition at line 1769 of file collada_urdf.cpp.

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

Definition at line 1770 of file collada_urdf.cpp.

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

Definition at line 1771 of file collada_urdf.cpp.

domLibrary_materialsRef collada_urdf::ColladaWriter::_materialsLib [private]

Definition at line 1761 of file collada_urdf.cpp.

domLibrary_physics_modelsRef collada_urdf::ColladaWriter::_physicsModelsLib [private]

Definition at line 1760 of file collada_urdf.cpp.

domLibrary_physics_scenesRef collada_urdf::ColladaWriter::_physicsScenesLib [private]

Definition at line 1759 of file collada_urdf.cpp.

Definition at line 1750 of file collada_urdf.cpp.

Definition at line 1765 of file collada_urdf.cpp.

domTechniqueRef collada_urdf::ColladaWriter::_sensorsLib [private]

custom sensors library

Definition at line 1764 of file collada_urdf.cpp.

domLibrary_visual_scenesRef collada_urdf::ColladaWriter::_visualScenesLib [private]

Definition at line 1755 of file collada_urdf.cpp.

Definition at line 1748 of file collada_urdf.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines


collada_urdf
Author(s): Tim Field and Rosen Diankov
autogenerated on Mon Aug 19 2013 11:02:27