Tools

Robotic tools or end effectors are devices mounted to the flange of a robot arm. They enable various tasks such as grasping, welding, cutting, and many more.

An activated tool changes the tool center point (TCP) of the robot, such that the configured center of the tool moves to a desired Cartesian pose instead of the robot flange. Furthermore, it influences the dynamic parameters of the robot.

Some robotic systems also allow triggering special tool commands and querying the state of the tool.

Note

It is expected that one or multiple tools are preconfigured on the robot control to select from.

Tool configuration, tool commands, and tool states are not supported at the moment.

Selecting Tools

The selectable tools are queried with selectable_tools(), which returns the tool names. The name of the currently selected tool is read with selected_tool(); it is None when no tool is selected:

let selectable_tools = robot.selectable_tools()?;
info!("Selectable tools: {selectable_tools:?}");

let selected = robot.selected_tool()?;
info!("Selected tool: {selected:?}");

A tool is selected by name with select_tool(). The method returns as soon as the selected tool is activated by the robot control. If the tool does not exist on the robot control, a ToolHandlingFailed is returned. The example names its tools once as constants:

/// Example tool name: Schunk EGP Co-act gripper.
const EXAMPLE_TOOL: &str = "Schunk_EGP_Co-act";
/// Example tool name: Schmalz `ECBPi` vacuum gripper.
const SCHMALZ_TOOL: &str = "Schmalz_ECBPi";
robot.select_tool(EXAMPLE_TOOL)?;

The active tool is deselected with deselect_tool(). Without a selected tool, it returns a ToolHandlingFailed as well:

robot.deselect_tool()?;

The robot control changes the tool only while the robot stands still. Selecting and deselecting therefore first wait until the robot has come to rest, for example after a stop or a pause, and then until the robot control confirms the change. Each wait is bounded by the robot’s command timeout. The robot has come to rest once every motion it has started is complete. Motions that are still queued, such as a blended motion waiting for the next one, start only after the change and use the new tool. A robot that does not come to rest in time returns RobotArmError::DidNotStop. A change the robot control refuses returns the robot control’s error as RobotArmError::RobotInErrorState, and RobotArmError::NotConfirmed means that the robot control did not apply the change without reporting an error.

After a change, Cartesian targets, the TCP pose and TCP jogging refer to the new TCP. The robot control attaches the payload to the active tool, so set the payload again after selecting another tool.

Full Example

Trait Definitions