Skip to content

Stop File Recording

SUMMARY

Stop File Recording ends an active RTDE data recording that was started with Start File Recording and closes the output CSV file. Always call this skill to finalise a recording — stopping cleanly ensures the file is fully flushed and not left in a partial state.

SUPPORTED ROBOTS

This skill is currently supported on Universal Robots only. Calling this method on other robot brands will raise a NotImplementedError.

The Skill

python
robot.stop_file_recording()

The Code

Example: Stop an Active RTDE Recording

Connect to the robot and stop any active file recording.

python
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)

robot.stop_file_recording()
logger.success("File recording stopped.")

# Disconnect
robot.disconnect()

The Explanation of the Code

stop_file_recording halts the active RTDE recording session and closes the CSV file. The file is flushed and finalised on disk. Calling this skill when no recording is active is safe and returns True. Returns True on success.

How to Tune the Parameters

This skill takes no parameters.

Return Value

TypeDescription
boolTrue if the recording was stopped successfully, False otherwise.

Where to Use the Skill

  • End of every recording session — Always call after Start File Recording to cleanly close the output file
  • Emergency stop routines — Include in shutdown handlers to ensure recordings are not left open

When Not to Use the Skill

Do not use Stop File Recording when:

  • No recording is active — calling is safe but has no effect; this is not an error condition