SELAB3 Python Code
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
morphevo.urdf_generator.URDFGenerator Class Reference

A class that helps to generate the urdf string of an arm. More...

Public Member Functions

None __init__ (self, str genome_id)
 
None add_anchor (self, float length=1.0, bool can_rotate=True, Tuple[float] rotation_bounds=(0, 360))
 Add an anchor module to the urdf. More...
 
None add_module (self, float length, bool can_tilt=True, bool can_rotate=False, Tuple[float] tilt_bounds=(0, 90), Tuple[float] rotation_bounds=(0, 180))
 Add a module to the urdf string. More...
 
str get_urdf (self)
 Get the generated urdf string. More...
 

Public Attributes

 urdf
 
 anchor_added
 
 module_index
 

Detailed Description

A class that helps to generate the urdf string of an arm.

Constructor & Destructor Documentation

◆ __init__()

None morphevo.urdf_generator.URDFGenerator.__init__ (   self,
str  genome_id 
)
Parameters
genome_idThe id of the genome that will be translated to urdf.

Member Function Documentation

◆ add_anchor()

None morphevo.urdf_generator.URDFGenerator.add_anchor (   self,
float   length = 1.0,
bool   can_rotate = True,
Tuple[float]   rotation_bounds = (0, 360) 
)

Add an anchor module to the urdf.

Parameters
lengthThe length of the anchor.
can_rotateRepresents if an anchor can rotate.
rotation_boundsThe bounds in which the arm can rotate.

◆ add_module()

None morphevo.urdf_generator.URDFGenerator.add_module (   self,
float  length,
bool   can_tilt = True,
bool   can_rotate = False,
Tuple[float]   tilt_bounds = (0, 90),
Tuple[float]   rotation_bounds = (0, 180) 
)

Add a module to the urdf string.

Parameters
lengthThe length of the module.
can_tiltIf a module can tilt.
can_rotateIf a module can rotate.
tilt_boundsAngle bounds in between a module can tilt.
rotation_boundsAngle bounds in between a module can rotate.

◆ get_urdf()

str morphevo.urdf_generator.URDFGenerator.get_urdf (   self)

Get the generated urdf string.

Returns
The generated urdf string.

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