TinyURDF 1.0.0
A Modern C++ Library for Parsing and Visualizing URDF Model Files
Loading...
Searching...
No Matches
LinkParser Class Reference

represents a general description of a link element in a graph-based structure mechanism. this structure allows modeling more complex connections between child and parent links via joints, representing a graph of linked elements example graph-based structure. More...

#include <link_parser.h>

Inheritance diagram for LinkParser:
[legend]
Collaboration diagram for LinkParser:
[legend]

Public Member Functions

 LinkParser ()
 
void parse (const tinyxml2::XMLElement *xml) override
 
bool isA (const char *name) override
 
bool empty () const override
 
void clear () override
 
void print (std::ostream &os) override
 
const char * getTypename () override
 
std::shared_ptr< Linkget () override
 
 ~LinkParser ()=default
 
- Public Member Functions inherited from ParserBase< Link >
const char * getNameOf (const tinyxml2::XMLElement *xml)
 
void parse (const tinyxml2::XMLElement *xml)
 
void parse (const tinyxml2::XMLElement *xml)
 

Additional Inherited Members

- Protected Member Functions inherited from ParserBase< Link >
 ParserBase ()
 
virtual ~ParserBase ()
 
- Protected Member Functions inherited from ObjectBase
 ObjectBase ()
 
virtual ~ObjectBase ()
 
virtual ObjectBasegetPointer ()
 
- Protected Attributes inherited from ParserBase< Link >
std::shared_ptr< LinkTptr
 

Detailed Description

represents a general description of a link element in a graph-based structure mechanism. this structure allows modeling more complex connections between child and parent links via joints, representing a graph of linked elements example graph-based structure.

<link name="my_link">
<inertial>
<origin xyz="0 0 0.5" rpy="0 0 0"/>
<mass value="1"/>
<inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100" />
</inertial>
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry type= "box" size = "1 1 1" />
<geometry type= "mesh" filename ="mesh1.stl" scale = "1 1 1" />
<material name="Cyan">
<color rgba="0 1.0 1.0 1.0"/>
<texture filename = "file1.STL" />
<density value = "1.0" />
</material>
</visual>
<collision>
<origin xyz="0 0 0" rpy = "0 0 0"/>
<geometry type = "cylinder" radius="1" length="0.5" />
</collision>
</link>
Note
for somhow issue the get method of the link parser do not get a refrenace to the parsed object rather it gives a pointer to the specifc parsed instanciated during ruintime , we use the same inhertancce pardigm like geometryParser
Todo:
find a way to get the parsed obejct in a sperate method or overolding it

Constructor & Destructor Documentation

◆ LinkParser()

LinkParser::LinkParser ( )

◆ ~LinkParser()

LinkParser::~LinkParser ( )
default

Member Function Documentation

◆ clear()

void LinkParser::clear ( )
overridevirtual

Implements ObjectBase.

◆ empty()

bool LinkParser::empty ( ) const
overridevirtual

Implements ObjectBase.

◆ get()

std::shared_ptr< Link > LinkParser::get ( )
overridevirtual

Reimplemented from ParserBase< Link >.

◆ getTypename()

const char * LinkParser::getTypename ( )
overridevirtual

Implements ObjectBase.

◆ isA()

bool LinkParser::isA ( const char *  name)
overridevirtual

Implements ObjectBase.

◆ parse()

void LinkParser::parse ( const tinyxml2::XMLElement *  xml)
overridevirtual

Reimplemented from ParserBase< Link >.

◆ print()

void LinkParser::print ( std::ostream &  os)
overridevirtual

Implements ObjectBase.


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