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
Run it
Before hardware
Related
Writing your own
The same thing as reference, with every method and rule.
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.