Follower on the machine that moves and Leader
on the one that drives, and everything else, the session, safety, recording and
video sync, comes with them.
Follower
Three methods are required: what the joints are called, how to read them, and how to write them. The rest are there when your hardware needs them.follower.py
super().__init__()goes last. It runs yourdescriptor()andlimits(), so anything they read has to exist first.descriptor()declares your units. Everything else,slew,limits()and every recorded row, is read in them. See Descriptor.limits()is what keeps the arm inside its travel. Leave it out and there are no position limits at all.connect()is where you open your bus.
Leader
Two methods, and nothing to write. Whateverread_joints() returns is where
the operator is: a second arm, a VR controller, a simulator, or a policy.
leader.py
Cameras
The SDK opens cameras for you when you passcameras=. If your driver already
returns frames alongside the joints, hand them over instead.
read_images() supplies the pixels and
push_camera_configs() declares the cameras, so each frame gets a published
track and the same timestamps a captured frame would. Declare nothing and your
frames reach the observation and stop there.
Leave both out on hardware that does not carry its own cameras. The default
opens whatever you passed in
cameras=. See
CameraConfig.Rules
Four that are worth getting right before you run it on hardware.Run it
Before hardware
Related
Descriptor
Declaring joints, units and space, including machines that mix them.
Follower
Every constructor argument, method and event.
Safety
The checks a command passes before it reaches the motors.