Skip to content

compas_robots.viewer.scene ¤

This package provides functionality for visualizing robot models in the COMPAS viewer.

Classes¤

RobotModelObject ¤

RobotModelObject(
    configuration: Configuration | None = None,
    show_visual: bool | None = None,
    show_collision: bool | None = None,
    hide_coplanaredges: bool | None = None,
    use_vertexcolors: bool | None = None,
    **kwargs
)

Viewer scene object for displaying COMPAS Robot geometry.

The robot model itself is set via SceneObject.item (i.e. by passing it to Scene.add) rather than through this constructor.

Parameters:

  • configuration (Configuration | None, default: None ) –

    The initial configuration of the robot. Defaults to the zero configuration.

  • show_visual (bool | None, default: None ) –

    Toggle the visibility of the visual geometry. Defaults to True.

  • show_collision (bool | None, default: None ) –

    Toggle the visibility of the collision geometry. Defaults to False.

  • hide_coplanaredges (bool | None, default: None ) –

    True to hide the coplanar edges. It will override the value in the config file.

  • use_vertexcolors (bool | None, default: None ) –

    True to use vertex color. It will override the value in the config file.

  • **kwargs

    Additional keyword arguments. For more info, see compas_viewer.scene.ViewerSceneObject.

See Also

See ViewerSceneObject and BaseRobotModelObject for more info.

Functions¤

create_geometry ¤
create_geometry(
    item: Mesh, name: str | None = None, color: Color | None = None
) -> MeshObject

Create a mesh object from a given geometry.

See Also

AbstractRobotModelObject

init ¤
init()

Initialize the robot object with creating the visual and collision objects.

transform ¤
transform(geometry, transformation: Transformation)

Transform the geometry by a given transformation.

See Also

AbstractRobotModelObject

update_joints ¤
update_joints(joint_state: Configuration)

Update the robot joints.