BaseRobotModelObject

class compas_robots.scene.BaseRobotModelObject[source]

Bases: AbstractRobotModelObject, SceneObject

Provides common functionality to most robot model scene object implementations.

In COMPAS, “SceneObjects” are classes that assist with the visualization of datastructures and models, in a way that maintains the data separated from the specific CAD interfaces, while providing a way to leverage native performance of the CAD environment.

There are two methods that implementers of this base class should provide, one is concerned with the actual creation of geometry in the native format of the CAD environment (create_geometry()) and the other is one to apply a transformation to geometry (transform()).

Attributes:
modelRobotModel

Instance of a robot model.

Methods

attach_mesh

Rigidly attaches a compas mesh to a given link for visualization.

attach_tool_model

Attach a tool to the robot scene object for visualization.

create

Recursive function that triggers the drawing of the robot model's geometry.

detach_mesh

Removes attached collision meshes with a given name.

detach_tool_model

Detach tool_model from this robot model.

draw_attached_meshes

Draws all meshes attached to the robot model.

draw_collision

Draws all collision geometry of the robot model.

draw_visual

Draws all visual geometry of the robot model.

meshes

Returns all compas meshes of the model.

scale

Scales the robot model's geometry by factor (absolute).

scale_link

Recursive function to apply the scale transformation on each link.

update

Triggers the update of the robot geometry.

update_tool

Triggers the update of the robot geometry of the tool.

Inherited Methods

ToString

Converts the instance to a string.

add

Add a child item to the scene object.

clear

The main clearing method.

copy

Make an independent copy of the data object.

create_geometry

Draw geometry in the respective CAD environment.

draw

The main drawing method.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

remove

Remove a child node from this node.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

transform

Transforms a CAD-specific geometry using a Transformation.

traverse

Traverse the tree from this node.

validate_data

Validate the data against the object's data schema.