Tool Contact
SUMMARY
Tool Contact checks whether the tool has made contact with an object in the given Cartesian direction. Returns True immediately when contact is detected, False otherwise.
SUPPORTED ROBOTS
This skill is currently supported on Universal Robots only. Calling this method on other robot brands will raise a NotImplementedError.
The Skill
contact = robot.tool_contact(direction=[0.0, 0.0, 1.0, 0.0, 0.0, 0.0])The Code
Example: Check for Contact Along the Tool Z Axis
Connect to the robot and check for contact along the downward tool Z axis.
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots
robot_ip = "192.168.1.2" # replace with your robot's IP
robot = universal_robots.UniversalRobotsUR10E()
# Connect
robot.connect(ip=robot_ip)
direction = [0.0, 0.0, 1.0, 0.0, 0.0, 0.0]
contact = robot.tool_contact(direction=direction)
logger.success(f"Tool contact detected: {contact}")
# Disconnect
robot.disconnect()The Explanation of the Code
tool_contact queries the robot controller for contact detection along the specified direction vector. direction is a 6-element vector [x, y, z, rx, ry, rz] in the robot base frame; the first three elements define the Cartesian direction to monitor. A value of True means the controller detected a contact force exceeding its internal threshold along the given direction. Typically used inside a move loop to detect when the tool has touched a surface.
How to Tune the Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
direction | list[float] | Yes | 6-element Cartesian direction vector [x, y, z, rx, ry, rz] in the base frame. |
Return Value
| Value | Type | Description |
|---|---|---|
| Contact detected | bool | True if contact is detected, False otherwise. |
Where to Use the Skill
- Detecting surface contact during a probing or insertion move.
- Confirming part presence in a gripper.
When Not to Use the Skill
Use a different skill instead in these cases:
- Use Move until Contact to command motion that automatically stops on contact; use
tool_contactonly for a one-shot check.

