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])

Convenience method to create the most basic instance of a robot,

constraints_from_configuration(…[, group])

Returns joint constraints on all joints of the configuration.

constraints_from_frame(frame_WCF, …[, group])

Returns a position and orientation constraint on the group’s end-effector link.

detach_tool()

Detaches the attached tool.

draw()

Draws the visual geometry of the robot in the respective CAD environment.

draw_attached_tool()

Draws the attached tool if set.

draw_collision()

Draws the collision geometry of the robot in the respective CAD environment.

draw_visual()

Draws the visual geometry of the robot in the respective CAD environment.

ensure_client()

Checks if the client is set.

ensure_semantics()

Checks if semantics is set.

forward_kinematics(configuration[, group, …])

Calculate the robot’s forward kinematic.

from_attached_tool_to_tool0(frames_tcf)

Converts 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.

from_tool0_to_attached_tool(frames_t0cf)

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

get_RCF([group])

Returns the origin frame of the robot.

get_base_frame([group, full_configuration])

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

get_base_link([group])

Returns the base link.

get_base_link_name([group])

Returns the name of the base link.

get_configurable_joint_names([group])

Returns the configurable joint names.

get_configurable_joint_types([group])

Returns the configurable joint types.

get_configurable_joints([group])

Returns the configurable joints.

get_end_effector_frame([group, …])

Returns the end effector’s frame.

get_end_effector_link([group])

Returns the end effector link.

get_end_effector_link_name([group])

Returns the name of the end effector link.

get_group_configuration(group, …)

Returns the group’s configuration.

get_group_names_from_link_name(link_name)

Returns the group_names to which the link_name belongs to.

get_joint_by_name(name)

Returns the joint in the robot model matching its name.

get_joint_types_by_names(names)

Returns a list of joint types for a list of joint names.

get_link_names([group])

Returns the names of the links in the chain.

get_position_by_joint_name(configuration, …)

Returns the value of the joint_name in the passed configuration.

info()

Prints information about the robot.

inverse_kinematics(frame_WCF[, …])

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

merge_group_with_full_configuration(…)

Returns a robot’s full configuration by merging a group’s configuration with a full configuration.

orientation_constraint_from_frame(frame_WCF, …)

Returns an orientation constraint on the group’s end-effector link.

plan_cartesian_motion(frames_WCF[, …])

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

plan_motion(goal_constraints[, …])

Calculates a motion path.

position_constraint_from_frame(frame_WCF, …)

Returns a position and orientation constraint on the group’s end-effector link.

random_configuration([group])

Returns a random configuration.

scale(factor)

Scales the robot geometry by factor (absolute).

set_RCF(robot_coordinate_frame[, group])

Moves the origin frame of the robot to the robot_coordinate_frame.

to_local_coords(frame_WCF[, group])

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

to_world_coords(frame_RCF[, group])

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

transformation_RCF_WCF([group])

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

transformation_WCF_RCF([group])

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

transformed_axes(configuration[, group])

Returns the robot’s transformed axes.

transformed_frames(configuration[, group])

Returns the robot’s transformed frames.

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

Updates the robot’s geometry.

zero_configuration([group])

Returns the init joint configuration.

Attributes

artist

The artist which is used to visualize the robot.

group_names

All planning groups of the robot.

main_group_name

The robot’s main planning group.

name

Name of the robot, as defined by its model

root_name

The robot’s root name.

scale_factor

The robot’s scale factor.