Robot

class compas_fab.robots.Robot(model=None, artist=None, semantics=None, client=None)[source]

Bases: Data

Represents a robot.

This class binds together several building blocks, such as the robot’s descriptive model, its semantic information and an instance of a backend client into a cohesive programmable interface. This representation builds upon the model described in the class compas.robots.RobotModel of the COMPAS framework.

Attributes

Methods

attach_tool

Attach a tool to the robot independently of the model definition.

basic

Create the most basic instance of a robot, based only on name.

constraints_from_configuration

Create joint constraints for all joints of the configuration.

constraints_from_frame

Create a position and an orientation constraint from a frame calculated for the group's end-effector link.

detach_tool

Detach the attached tool.

draw

Alias of draw_visual().

draw_collision

Draw the robot's collision geometry using the defined Robot.artist.

draw_visual

Draw the robot's visual geometry using the defined Robot.artist.

ensure_client

Check if the client is set.

ensure_geometry

Check if the model's geometry has been loaded.

ensure_semantics

Check if semantics is set.

forward_kinematics

Calculate the robot's forward kinematic.

forward_kinematics_deprecated

from_t0cf_to_tcf

Convert frames at the robot's flange (tool0 frame) to frames at the robot's tool tip (tcf frame) using the attached tool.

from_tcf_to_t0cf

Convert a list of frames at the robot's tool tip (tcf frame) to frames at the robot's flange (tool0 frame) using the attached tool.

get_RCF

Get the origin frame of the robot.

get_attached_tool_collision_meshes

Returns a list of all attached collisions meshes of each of the attached tools, if any.

get_base_frame

Get the frame of the robot's base link, which is the robot's origin frame.

get_base_link

Get the robot's base link.

get_base_link_name

Get the name of the robot's base link.

get_configurable_joint_names

Get the configurable joint names.

get_configurable_joint_types

Get the configurable joint types.

get_configurable_joints

Get the robot's configurable joints.

get_configuration_from_group_state

Get a Configuration from a group's group state.

get_end_effector_frame

Get the frame of the robot's end effector.

get_end_effector_link

Get the robot's end effector link.

get_end_effector_link_name

Get the name of the robot's end effector link.

get_group_configuration

Get the group's configuration.

get_group_names_from_link_name

Get the names of the groups link_name belongs to.

get_joint_by_name

RGet the joint in the robot model matching the given name.

get_joint_types_by_names

Get a list of joint types given a list of joint names.

get_link_names

Get the names of the links in the kinematic chain.

get_link_names_with_collision_geometry

Get the names of the links with collision geometry.

get_position_by_joint_name

Get the position of named joint in given configuration.

info

Print information about the robot.

inverse_kinematics

Calculate the robot's inverse kinematic for a given frame.

inverse_kinematics_deprecated

iter_inverse_kinematics

Iterate over the inverse kinematic solutions of a robot.

merge_group_with_full_configuration

Get the robot's full configuration by merging a group's configuration with a full configuration.

orientation_constraint_from_frame

Create an orientation constraint from a frame on the group's end-effector link.

plan_cartesian_motion

Calculate a cartesian motion path (linear in tool space).

plan_cartesian_motion_deprecated

plan_motion

Calculate a motion path.

plan_motion_deprecated

position_constraint_from_frame

Create a position constraint from a frame on the group's end-effector link.

random_configuration

Get a random configuration.

scale

Scale the robot geometry by a factor (absolute).

set_RCF

Move the origin frame of the robot to the robot_coordinate_frame.

to_local_coordinates

Represent a frame from the world coordinate system (WCF) in the robot's coordinate system (RCF).

to_world_coordinates

Represent a frame from the robot's coordinate system (RCF) in the world coordinate system (WCF).

transformation_RCF_WCF

Get the transformation from the robot's coordinate system (RCF) to the world coordinate system (WCF).

transformation_WCF_RCF

Get the transformation from the world coordinate system (WCF) to the robot's coordinate system (RCF).

transformed_axes

Get the robot's transformed axes.

transformed_frames

Get the robot's transformed frames.

update

Update the robot's geometry.

zero_configuration

Get the zero joint configuration.

Inherited Methods

ToString

Converts the instance to a string.

copy

Make an independent copy of the data object.

from_data

Construct an object of this type from the provided data.

from_json

Construct an object from serialized data contained in a JSON file.

from_jsonstring

Construct an object from serialized data contained in a JSON string.

sha256

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

to_data

Convert an object to its native data representation.

to_json

Serialize the data representation of an object to a JSON file.

to_jsonstring

Serialize the data representation of an object to a JSON string.

validate_data

Validate the object's data against its data schema.

validate_json

Validate the object's data against its json schema.