Record with the example scripts
Therecording/
example lets you drive one SO-101 with another, and record each demo with a
single key.
1
Fill in .env on both machines
.env
2
Name your cameras
In Note these names. You need the same names when you run the policy later.
If a camera is missing, the script won’t start.
follower.py, give each camera a name in CAMERA_PORTS. Run
ls /dev/v4l/by-path to find the ports.follower.py
3
Check two settings
At the top of
follower.py:4
Start both scripts
On the robot machine:On the leader machine:
5
Record with single keys
In the leader’s terminal, press a key (no Enter needed):
You can keep driving between demos. Reset the scene, move the arm back,
then press
n again.Record from your own code
Turn it on when you create the follower:How long to wait for the cloud recorder to start. After this, the state
becomes
failed.States
follower.cloud_recording_state tells you what the recorder is doing.
Demos can’t start while the state is
requested or starting.
start_episode() returns None and logs the reason.
If the state becomes
failed, you can keep driving, but new demos won’t
reach the dashboard. Watch on_recording_state so you notice.Events
The new state, with a reason when there is one. Good for showing on the
operator’s screen.
On the leader
The first time you arm,arm_when_aligned() waits a few seconds for the
recorder to start. This is on purpose, so you don’t start a demo that can’t be
recorded.
leader.cloud_recording_state shows the recorder’s state as None,
"starting", "running" or "failed":
Related
Datasets
Next: turn the recording into a dataset.
Recording
How recording and demos work.