Client
- class aiofranka.client.FrankaClient(hostname, username, password, protocol='http')[source]
Bases:
ABCLow-level client for Franka robot web interface authentication and control.
This abstract base class handles login, logout, control token management, and shutdown operations via the robot’s HTTP/HTTPS API. Used internally by FrankaLockUnlock for brake control and FCI activation.
Note
This is an abstract class. Use FrankaLockUnlock for actual robot control.
- Caveats:
Only one user can have control token at a time
SSL verification disabled by default (self-signed certs)
Must login before requesting control token
Token expires if not used within timeout period
- class aiofranka.client.FrankaLockUnlock(hostname, username, password, protocol='https', relock=False)[source]
Bases:
FrankaClientHigh-level client for Franka robot brake control and FCI activation.
This class provides methods to lock/unlock robot brakes, activate FCI (Franka Control Interface), and manage control tokens. Essential for preparing the robot before using RobotInterface.
Typical workflow: 1. Create FrankaLockUnlock instance 2. Call run(unlock=True, fci=True, persistent=True) 3. Use RobotInterface for control 4. Cleanup automatically handles relock and logout
Examples
Unlock and activate FCI: >>> client = FrankaLockUnlock(“172.16.0.2”, “admin”, “admin”) >>> client.run(unlock=True, fci=True, persistent=True)
Lock robot: >>> client.run(unlock=False)
Request physical access (requires button press): >>> client.run(unlock=True, request=True, wait=True)
- Caveats:
Must be called before first use of RobotInterface
Use persistent=True to keep token for multiple scripts
relock=True automatically locks brakes on exit
Physical access requires pressing button on robot