Record and replay robot arm movements using the I2RT Python API.
python record_replay_trajectory.py- Record: Move the robot arm by hand while it captures joint positions at 30Hz
- Replay: Robot automatically reproduces your recorded motion
- Save: Store trajectories as
.npyfiles for later use - Load: Load previously saved trajectories from files
r- Start/stop recordingp- Play back recorded motions- Save trajectory to filel- Load trajectory from fileq- Quit
Controls:
r : Start/stop recording
p : Start replay
s : Save trajectory
l : Load trajectory from file
q : Quit
Status:
Recording: False Replaying: False
Trajectory length: 0 samples
Press 'q' to quit.
- Run the script
- Option A: Press
rto start recording, move arm, pressrto stop - Option B: Press
lto load a previously saved trajectory file - Press
pto replay the motion - Press
sto save (optional) - Press
qto quit
--channel can0 # CAN bus channel
--gripper linear_4310 # Yam gripper type so the gravity compensation can load the correct model
--output file.npy # Output filename
--load file.npy # Load trajectory at startup