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
model (
RobotModel
) – The robot model, usually created from an URDF structure.artist (
compas.robots.base_artist.BaseRobotModelArtist
) – Instance of the artist used to visualize the robot model. Defaults toNone
.semantics (
compas_fab.robots.RobotSemantics
) – The semantic model of the robot. Defaults toNone
.client (
compas_fab.backends.interfaces.ClientInterface
) – The backend client to use for communication, e.g.compas_fab.backends.RosClient
attributes (
dict
) – Named attributes related to the robot instance.attached_tools (
compas_fab.robots.Tool
) – Dictionary mapping planning groups to the tool currently attached to them, if any.
Methods
Attach a tool to the robot independently of the model definition.
Create the most basic instance of a robot, based only on name.
Create joint constraints for all joints of the configuration.
Create a position and an orientation constraint from a frame calculated for the group's end-effector link.
Detach the attached tool.
Alias of
draw_visual()
.Draw the robot's collision geometry using the defined
Robot.artist
.Draw the robot's visual geometry using the defined
Robot.artist
.Check if the client is set.
Check if the model's geometry has been loaded.
Check if semantics is set.
Calculate the robot's forward kinematic.
Convert frames at the robot's flange (tool0 frame) to frames at the robot's tool tip (tcf frame) using the attached tool.
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 the origin frame of the robot.
Returns a list of all attached collisions meshes of each of the attached tools, if any.
Get the frame of the robot's base link, which is the robot's origin frame.
Get the robot's base link.
Get the name of the robot's base link.
Get the configurable joint names.
Get the configurable joint types.
Get the robot's configurable joints.
Get a
Configuration
from a group's group state.Get the frame of the robot's end effector.
Get the robot's end effector link.
Get the name of the robot's end effector link.
Get the group's configuration.
Get the names of the groups link_name belongs to.
RGet the joint in the robot model matching the given name.
Get a list of joint types given a list of joint names.
Get the names of the links in the kinematic chain.
Get the names of the links with collision geometry.
Get the position of named joint in given configuration.
Print information about the robot.
Calculate the robot's inverse kinematic for a given frame.
Iterate over the inverse kinematic solutions of a robot.
Get the robot's full configuration by merging a group's configuration with a full configuration.
Create an orientation constraint from a frame on the group's end-effector link.
Calculate a cartesian motion path (linear in tool space).
Calculate a motion path.
Create a position constraint from a frame on the group's end-effector link.
Get a random configuration.
Scale the robot geometry by a factor (absolute).
Move the origin frame of the robot to the robot_coordinate_frame.
Represent a frame from the world coordinate system (WCF) in the robot's coordinate system (RCF).
Represent a frame from the robot's coordinate system (RCF) in the world coordinate system (WCF).
Get the transformation from the robot's coordinate system (RCF) to the world coordinate system (WCF).
Get the transformation from the world coordinate system (WCF) to the robot's coordinate system (RCF).
Get the robot's transformed axes.
Get the robot's transformed frames.
Update the robot's geometry.
Get the zero joint configuration.
Inherited Methods
Converts the instance to a string.
Make an independent copy of the data object.
Construct an object of this type from the provided data.
Construct an object from serialized data contained in a JSON file.
Construct an object from serialized data contained in a JSON string.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Convert an object to its native data representation.
Serialize the data representation of an object to a JSON file.
Serialize the data representation of an object to a JSON string.
Validate the object's data against its data schema.
Validate the object's data against its json schema.