Trackers¶
A client-side tracker mirrors franky and sends references over the conflated tracker socket:
import time
with robot.start_joint_impedance_tracker(stiffness=[10.0] * 7) as tracker:
deadline = time.monotonic() + 10.0
while time.monotonic() < deadline and tracker.tick() is not None:
tracker.set_target(q, dq=dq)
Leaving the with block stops the tracker. tick() returns None when control ends.
Every control cycle, the robot produces a ~2.5 KB RobotState object. Depending on your network configuration, this might
be too much information to send every control cycle. So zero_franky’s tracker.state and robot.latest_state are specialized msgpack dictionaries which only contain subsets of the full
franky.RobotState values.
The default is the fast profile, which contains:
Key |
Meaning |
|---|---|
Measured joint position and velocity. |
|
Measured end-effector pose. |
|
Force/torque estimates. |
|
Estimated end-effector twist. |
|
|
Duration of the last control cycle, in seconds. |
|
Time elapsed since the motion started, in seconds. |
|
Robot time, in seconds. |
|
Motion-specific control signal produced by |
|
Server-assigned identifier for the robot proxy. |
|
Whether the robot is still executing the motion. |
|
Latest reference accepted by the controller; motion-specific. |
reference is JointReference, CartesianReference, or Torque, with a
motion-specific payload.
Accessing Extended State Information¶
Use full to stream all 54 RobotState fields, or specify a comma-separated list of fields:
zero-franky server --state-fields full
zero-franky server --state-fields q,dq,O_T_EE
For lower latency, run the policy beside franky on the server:
policy_transport="import": the policy must be installed as a module on the server.policy_transport="cloudpickle": the policy is serialized and sent over RPC.
A policy step returns a joint or Cartesian reference, None to hold the current reference, or False / {"stop": True} to stop.