stop_recording
Signature:
BoosterHandGuidingManager.stop_recording() -> TrajectoryData | None
Description:
Stops the recording started by start_recording() and retrieves the generated trajectory data.
Parameters:
No parameters.
Returns:
TrajectoryData | None
TrajectoryData: Trajectory was successfully retrieved; see "Trajectory Data / TrajectoryData".None: No valid trajectory data was generated after recording stopped.
Raises:
RuntimeError: start_recording() was not called, or there is no recording in progress; trajectory file read or parse failure.
Example:
from boosteros.robots.booster import BoosterRobot
robot = BoosterRobot()
robot.set_mode("walk")
with robot.hand_guiding_manager as hand_guiding:
input("Press Enter to start recording")
hand_guiding.start_recording()
input("Move the robot, then press Enter to stop")
trajectory = hand_guiding.stop_recording()
if trajectory is not None:
trajectory.save("/data/demo.btraj")