Is Connected
SUMMARY
Is Connected returns True when a hardware adapter is attached to the manipulator state and the underlying link reports connected; False otherwise (offline, never connected, or link disconnected).
SUPPORTED ROBOTS
Available on all supported manipulators. Live hardware connections are currently established only for Universal Robots.
UNITS
Returns a boolean.
The Skill
python
connected = robot.is_connected()The Code
python
"""
Check live connection status example for the Synapse SDK.
``is_connected`` reports whether the manipulator state is being driven by
live hardware.
With ``--ip``, logs the value before connect, after connect, and after
disconnect. Without ``--ip``, only the offline (``False``) case is shown.
Illustrated using Universal Robots (UR10e), supported on all robots.
Usage:
python is_connected.py [--ip <ROBOT_IP>]
"""
import argparse
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots
def main(ip: str | None = None):
"""Log ``is_connected`` offline, and around a connect/disconnect cycle if ``ip`` is given."""
# Create the robot instance (no hardware yet)
robot = universal_robots.UniversalRobotsUR10E()
logger.info(f"is_connected (pre-connect): {robot.is_connected()}")
if ip is None:
return
# Connect to the robot with given ip
robot.connect(ip=ip)
logger.success(f"is_connected (post-connect): {robot.is_connected()}")
# Disconnect from the robot
robot.disconnect()
logger.info(f"is_connected (post-disconnect): {robot.is_connected()}")
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="is_connected Synapse example")
parser.add_argument("--ip", type=str, default=None, help="UR robot IP address (optional)")
args = parser.parse_args()
main(ip=args.ip)The Explanation of the Code
python
from telekinesis.synapse.robots.manipulators import universal_robots
robot = universal_robots.UniversalRobotsUR10E()
logger.info(f"is_connected (pre-connect): {robot.is_connected()}")Create the robot. UR10e is used here for illustration; the same pattern works for every supported brand. With no hardware adapter yet attached, is_connected() returns False.
python
robot.connect(ip=ip)
logger.success(f"is_connected (post-connect): {robot.is_connected()}")Connect to the robot at the given IP. Once the link is up is_connected() returns True, confirming the manipulator state is driven by live hardware.
python
robot.disconnect()
logger.info(f"is_connected (post-disconnect): {robot.is_connected()}")Disconnect the adapter and verify is_connected() flips back to False.
Return Value
| Type | Description |
|---|---|
bool | True if a hardware adapter is attached and the link reports connected; False otherwise. |
Where to Use the Skill
- Pre-flight checks - Confirm the controller link is up before sending motion commands.
- Mode branching - Switch between live execution and offline kinematics depending on hardware availability.
- Reconnection logic - Poll inside a retry loop after a network blip.

