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 (urdf::GeometrySharedPtr 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 (urdf::LinkConstSharedPtr plink, daeElementRef pkinparent, domNodeRef pnodeparent, const string &strModelUri)
 Write link of a kinematic body.
void _WriteMaterial (const string &geometry_id, urdf::MaterialSharedPtr 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
< urdf::LinkConstSharedPtr,
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
< urdf::JointConstSharedPtr,
int > 
_mapjointindices
std::map
< urdf::LinkConstSharedPtr,
int > 
_maplinkindices
std::map
< urdf::MaterialConstSharedPtr,
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< urdf::LinkConstSharedPtr, 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 1532 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 1886 of file collada_urdf.cpp.

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

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

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

Definition at line 1430 of file collada_urdf.cpp.

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

Definition at line 1794 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 1776 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 1824 of file collada_urdf.cpp.

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

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

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

domGeometryRef collada_urdf::ColladaWriter::_WriteGeometry ( urdf::GeometrySharedPtr  geometry,
const std::string &  geometry_id,
urdf::Pose org_trans = NULL 
) [inline, protected]

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

virtual LINKOUTPUT collada_urdf::ColladaWriter::_WriteLink ( urdf::LinkConstSharedPtr  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,
urdf::MaterialSharedPtr  material 
) [inline, protected]

Definition at line 1311 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 1722 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 1375 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 1908 of file collada_urdf.cpp.

Definition at line 1900 of file collada_urdf.cpp.

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

Definition at line 1902 of file collada_urdf.cpp.

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

Definition at line 1901 of file collada_urdf.cpp.

domLibrary_effectsRef collada_urdf::ColladaWriter::_effectsLib [private]

Definition at line 1912 of file collada_urdf.cpp.

domLibrary_geometriesRef collada_urdf::ColladaWriter::_geometriesLib [private]

Definition at line 1913 of file collada_urdf.cpp.

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

Definition at line 1903 of file collada_urdf.cpp.

Definition at line 1918 of file collada_urdf.cpp.

Definition at line 1917 of file collada_urdf.cpp.

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

Definition at line 1922 of file collada_urdf.cpp.

domLibrary_kinematics_modelsRef collada_urdf::ColladaWriter::_kinematicsModelsLib [private]

Definition at line 1907 of file collada_urdf.cpp.

domLibrary_kinematics_scenesRef collada_urdf::ColladaWriter::_kinematicsScenesLib [private]

Definition at line 1906 of file collada_urdf.cpp.

std::map< urdf::JointConstSharedPtr, int > collada_urdf::ColladaWriter::_mapjointindices [private]

Definition at line 1919 of file collada_urdf.cpp.

std::map< urdf::LinkConstSharedPtr, int > collada_urdf::ColladaWriter::_maplinkindices [private]

Definition at line 1920 of file collada_urdf.cpp.

std::map< urdf::MaterialConstSharedPtr, int > collada_urdf::ColladaWriter::_mapmaterialindices [private]

Definition at line 1921 of file collada_urdf.cpp.

domLibrary_materialsRef collada_urdf::ColladaWriter::_materialsLib [private]

Definition at line 1911 of file collada_urdf.cpp.

domLibrary_physics_modelsRef collada_urdf::ColladaWriter::_physicsModelsLib [private]

Definition at line 1910 of file collada_urdf.cpp.

domLibrary_physics_scenesRef collada_urdf::ColladaWriter::_physicsScenesLib [private]

Definition at line 1909 of file collada_urdf.cpp.

Definition at line 1899 of file collada_urdf.cpp.

Definition at line 1915 of file collada_urdf.cpp.

domTechniqueRef collada_urdf::ColladaWriter::_sensorsLib [private]

custom sensors library

Definition at line 1914 of file collada_urdf.cpp.

domLibrary_visual_scenesRef collada_urdf::ColladaWriter::_visualScenesLib [private]

Definition at line 1905 of file collada_urdf.cpp.

Definition at line 1897 of file collada_urdf.cpp.


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


collada_urdf
Author(s): Tim Field, Rosen Diankov, Ioan Sucan , Jackie Kay
autogenerated on Fri Aug 11 2017 02:47:50