robot_designer_plugin.export.urdf.generic.helpers module

robot_designer_plugin.export.urdf.generic.helpers.convert_euler(euler, old_convention, new_convention)[source]

Converts between Euler conventions.

WARNING: does not do what it is expected to do (x will always be the angle around the local x axis). Converts between different euler conventions. Conventions are specified as strings. Possible options are ‘XYZ’, ‘XZY’, ‘YXZ’, ‘YZX’, ‘ZXY’, ‘ZYX’ and ‘RPY’

Parameters
  • euler (Python list/tuple with three elements) – The euler angles

  • old_convention – String describing the old convention

  • new_convention – String describing the new convention

Returns

python list of the orientation in the new convention

robot_designer_plugin.export.urdf.generic.helpers.get_value(element, default=0.0)[source]

Reads a value of an urdf_dom element. If the element is not readable (i.e., is None), the default value is returned. This is useful when working with etree or generateDS.py.

Parameters
  • element – the urdf_dom element

  • default – The default value

Returns

The value (a string!)

robot_designer_plugin.export.urdf.generic.helpers.list_to_string(l)[source]

Converts a python list of floats to a string. If there are no decimals behind the comma separator they will be cut off (e.g., :math:`1.0

ightarrow 1`)

param l

return

robot_designer_plugin.export.urdf.generic.helpers.rpy_to_xyz(rpy)[source]

Converts Converts a tuple representing roll-pitch-yaw (XYZ=ZY’X’’)values to euler XY’Z’’

Parameters

rpy – list/tuple with the RPY angles

Returns

list with the euler angles

robot_designer_plugin.export.urdf.generic.helpers.string_to_list(s)[source]

Converts a XML string representing a float vector to python list of float.

Parameters

s – the XML string

Returns

the python list