Servo Circular
SUMMARY
Servo Circular commands a circular arc motion by providing a via-point (or target) TCP pose. The robot traces a circular arc defined by the current pose, the via-point, and the target pose.
UNITS
Waypoint poses in meters and Euler XYZ degrees. speed in m/s, acceleration in m/s².
The Skill
robot.servo_circular(
pose=via_point_pose,
speed=0.25,
acceleration=1.2,
blend=0.0,
)The Code
Safety first!
A real robot will faithfully do whatever you ask of it - so please take a moment to clear the workspace, keep an E-Stop within reach, and be ready to disconnect.
Operating real hardware is at your own risk.
Example: Execute a Circular Arc Move
Move the robot along a circular arc by providing a via-point offset from the current pose.
"""
Commands a circular-arc move from the current TCP pose to an offset target pose using servo_circular.
Supports Universal Robots (UR).
Usage:
python servo_circular.py [--ip <ROBOT_IP>]
"""
import argparse
import time
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots
def main(ip: str) -> None:
"""Drive a circular arc from the current TCP pose to an offset target."""
#===================== Create Robot ==========================================
robot = universal_robots.UniversalRobotsUR10E(name='UR10e')
# ==================== Visualization (Optional) =============================
# Live: subscribes to the robot's state topic and redraws as it moves.
robot.visualize_rerun(live=True)
try:
#===================== Connect Robot ==========================================
if ip:
robot.connect(ip=ip)
#===================== Prepare Target ==========================================
# Target pose: 2 cm out in Y and 2 cm down in Z from the current pose.
current = robot.get_cartesian_pose()
target = list(current)
target[1] += 0.02
target[2] -= 0.02
# ==================== Run Skill ============================================
logger.warning(
f"About to move real robot along a circular arc from {current} to {target}. "
"Make sure it's safe to move there."
)
logger.info(f"servo_circular target: {target}")
# Command the circular servo move, then stop streaming to end the motion.
robot.servo_circular(
pose=target,
speed=0.1,
acceleration=0.1,
blend=0.0,
)
# In a real application, you would typically stream continuously until some
# condition is met (e.g. a certain time has elapsed, or a sensor triggers).
time.sleep(2.0)
robot.servo_stop()
logger.success("servo_circular complete.")
except (ConnectionError, OSError) as e:
logger.error(f"Error occurred: {e}")
finally:
robot.disconnect()
robot.shutdown()
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="UR10e servo_circular example")
parser.add_argument("--ip", type=str, default=None,
help="UR robot IP address for real hardware, e.g. 192.168.1.100")
args = parser.parse_args()
main(ip=args.ip)Running the Example
python servo_circular.py --ip 192.168.1.100For all options:
python servo_circular.py --helpParameter Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
pose | list[float] | - | Via-point TCP pose [x, y, z, rx, ry, rz]. |
speed | float | 0.25 | TCP speed in m/s. |
acceleration | float | 1.2 | TCP acceleration in m/s². |
blend | float | 0.0 | Blend radius in meters. |
Returns
| Value | Description |
|---|---|
None | This skill returns nothing. |
Raises
| Exception | Condition |
|---|---|
RuntimeError | The robot is not connected. |
How to Tune the Parameters
blend controls how sharply the arc's endpoint transitions into the next queued motion segment: 0.0 brings the robot to a full stop at the end of the arc, while a non-zero radius (in meters) lets the controller round the corner and carry velocity into the next segment - useful for chaining multiple arcs or an arc into a line without stopping, at the cost of the path deviating from the exact via-point near the blend region.
Where to Use the Skill
- Arc weld paths.
- Circular polishing trajectories.
- Any application requiring a curved TCP path.
When Not to Use the Skill
Use a different skill instead in these cases:
- Use Set Cartesian Pose for straight-line moves.