Robot

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

Bases: object

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

__init__(model[, artist, semantics, client])

Initialize self.

attach_tool(tool[, group, touch_links])

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

basic(name[, joints, links, materials])

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

constraints_from_configuration(…[, group])

Create joint constraints for all joints of the configuration.

constraints_from_frame(frame_WCF, …[, group])

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(configuration[, group, …])

Calculate the robot’s forward kinematic.

forward_kinematics_deprecated(configuration)

from_t0cf_to_tcf(frames_t0cf)

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(frames_tcf)

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([group])

Get the origin frame of the robot.

get_base_frame([group, full_configuration])

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

get_base_link([group])

Get the robot’s base link.

get_base_link_name([group])

Get the name of the robot’s base link.

get_configurable_joint_names([group])

Get the configurable joint names.

get_configurable_joint_types([group])

Get the configurable joint types.

get_configurable_joints([group])

Get the robot’s configurable joints.

get_configuration_from_group_state(group, …)

Get a Configuration from a group’s group state.

get_end_effector_frame([group, …])

Get the frame of the robot’s end effector.

get_end_effector_link([group])

Get the robot’s end effector link.

get_end_effector_link_name([group])

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

get_group_configuration(group, …)

Get the group’s configuration.

get_group_names_from_link_name(link_name)

Get the names of the groups link_name belongs to.

get_joint_by_name(name)

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

get_joint_types_by_names(names)

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

get_link_names([group])

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(configuration, …)

Get the position of named joint in given configuration.

info()

Print information about the robot.

inverse_kinematics(frame_WCF[, …])

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

inverse_kinematics_deprecated(frame_WCF[, …])

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(frame_WCF, …)

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

plan_cartesian_motion(frames_WCF[, …])

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

plan_cartesian_motion_deprecated(frames_WCF)

plan_motion(goal_constraints[, …])

Calculate a motion path.

plan_motion_deprecated(goal_constraints[, …])

position_constraint_from_frame(frame_WCF, …)

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

random_configuration([group])

Get a random configuration.

scale(factor)

Scale the robot geometry by a factor (absolute).

set_RCF(robot_coordinate_frame[, group])

Move the origin frame of the robot to the robot_coordinate_frame.

to_local_coordinates(frame_WCF[, group])

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

to_world_coordinates(frame_RCF[, group])

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

transformation_RCF_WCF([group])

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

transformation_WCF_RCF([group])

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

transformed_axes(configuration[, group])

Get the robot’s transformed axes.

transformed_frames(configuration[, group])

Get the robot’s transformed frames.

update(configuration[, group, visual, collision])

Update the robot’s geometry.

zero_configuration([group])

Get the zero joint configuration.

Attributes

artist

Artist used to visualize robot model.

group_names

All planning groups of the robot.

group_states

All group states of the robot.

main_group_name

Robot’s main planning group.

name

Name of the robot, as defined by its model.

root_name

Robot’s root name.

scale_factor

Robot’s scale factor.