shapes

Submodules

Classes

class brom_drake.file_manipulation.urdf.shapes.box.BoxDefinition(size: float | list | tuple | ndarray)[source]

Description

Defines a box shape as per URDF specifications.

Attributes

size: Union[float, list, tuple, np.ndarray]

The size of the box along the x, y, and z axes. If this is a float, it is assumed to be a cube with equal sides.

add_geometry_to_element(target_element: Element) Element[source]

Description

Adds the box geometry as a sub-element to the given target element.

This method is an implementation of the abstract method defined in the ShapeDefinition base class.

Parameters

target_element: xml.etree.ElementTree.Element

The target XML element to which the box geometry will be added.

Returns

xml.etree.ElementTree.Element

The element target_element with the box geometry added as a sub-element.

property type: ShapeEnum

Description

Always returns ShapeEnum.kBox to indicate this is a box shape.

This method is an implementation of the abstract method defined in the ShapeDefinition base class.

Returns

ShapeEnum

The shape type, which is always ShapeEnum.kBox for this class.

class brom_drake.file_manipulation.urdf.shapes.cylinder.CylinderDefinition(radius: float, length: float)[source]

Description

Defines a cylinder shape as per URDF specifications.

Attributes

radius: float

The radius of the cylinder.

length: float

The length of the cylinder along its central axis.

add_geometry_to_element(target_element: Element) Element[source]

Description

Adds the cylinder geometry as a sub-element to the given target element.

This method is an implementation of the abstract method defined in the ShapeDefinition base class.

Parameters

target_element: xml.etree.ElementTree.Element

The target XML element to which the cylinder geometry will be added.

Returns

xml.etree.ElementTree.Element

The element target_element with the cylinder geometry added as a sub-element.

property type: ShapeEnum

Description

Returns the ShapeEnum type corresponding to a cylinder.

This method is an implementation of the abstract method defined in the ShapeDefinition base class.

Returns

ShapeEnum

The ShapeEnum type for a cylinder.

class brom_drake.file_manipulation.urdf.shapes.shape_definition.ShapeDefinition[source]

Description

Base class for defining a shape as per URDF specifications.

add_geometry_to_element(target_element: Element) Element[source]

Description

Adds the shape geometry as a sub-element to the given target element.

This method must be implemented in subclasses.

Parameters

target_element: xml.etree.ElementTree.Element

The target XML element to which the shape geometry will be added.

Returns

xml.etree.ElementTree.Element

The element target_element with the shape geometry added as a sub-element.

property type: ShapeEnum

Description

Returns the ShapeEnum type corresponding to the shape.

This method must be implemented in subclasses.

Returns

ShapeEnum

The ShapeEnum type for the shape.

class brom_drake.file_manipulation.urdf.shapes.shape_definition.ShapeEnum(*values)[source]

Description

The different simple shapes that can be created.

class brom_drake.file_manipulation.urdf.shapes.sphere.SphereDefinition(radius: float)[source]

Description

Defines a sphere shape as per URDF specifications.

Attributes

radius: float

The radius of the sphere.

add_geometry_to_element(target_element: Element) Element[source]

Description

Adds the sphere geometry as a sub-element to the given target element.

This method is an implementation of the abstract method defined in the ShapeDefinition base class.

Parameters

target_element: xml.etree.ElementTree.Element

The target XML element to which the sphere geometry will be added.

Returns

xml.etree.ElementTree.Element

The element target_element with the sphere geometry added as a sub-element.

property type: ShapeEnum

Description

Returns the ShapeEnum type corresponding to a sphere.

This method is an implementation of the abstract method defined in the ShapeDefinition base class.

Returns

ShapeEnum

The ShapeEnum type for a sphere.

Functions

(None found)

Variables

(None found)