Troubleshooting
This page covers common issues and their solutions.
Connection Issues
Error: “Robot is not ready”
Symptoms:
controller.start() prints a status summary and exits:
Joints ........... locked
FCI .............. inactive
Robot is not ready. Unlock first:
Solution:
Unlock the robot before starting the controller:
import aiofranka
aiofranka.unlock() # unlock joints + activate FCI
controller.start() # now this works
Or from the CLI:
aiofranka unlock
Cannot Connect to Robot
Symptoms:
ConnectionError: Unable to connect to robot
Diagnosis:
# Test network connection
ping 172.16.0.2
# Should show < 1ms latency
Solutions:
Check physical connection — Ethernet cable connected? LED on robot’s network port lit?
Check IP configuration — Correct IP? Subnet mask correct (typically 255.255.255.0)?
Check firewall
sudo ufw allow from 172.16.0.0/24
Check robot state — Robot powered on? No error lights? Can you access Franka Desk GUI in browser?
Server Not Responding
Symptoms:
ConnectionError: Server not responding (timeout). Check if server is running.
Solutions:
Check if the server subprocess is still alive:
print(controller.running) # True if server is responsive
Check server logs:
aiofranka log -n 50
The server may have crashed due to a control loop error. Check for error messages:
# This will raise RuntimeError with the error message if server errored state = controller.state
Robot Behavior Issues
Robot Triggers Safety Stop
Symptoms: Robot suddenly stops moving, yellow lights flash.
Common Causes:
Torque Rate Too High — Lower gains or ensure smooth commands:
controller.kp = np.ones(7) * 40.0 # Lower stiffness controller.kd = np.ones(7) * 6.0 # More damping
Discontinuous Commands — Use smooth trajectories:
# Bad: jump to far target controller.set("q_desired", far_target) # Good: use trajectory generation controller.move(far_target)
Collision Detected — Clear workspace, check for obstacles
Communication Constraints Violation (async mode only) — A blocking call starved the 1kHz loop. See Async Mode Guide.
Recovery:
# Recover safety errors and re-unlock
aiofranka unlock
Jerky or Oscillating Motion
Causes & Solutions:
No Rate Limiting:
# Always set frequency before control loop controller.set_freq(50)
Low Damping:
controller.kd = np.ones(7) * 6.0
High Gains:
controller.kp = np.ones(7) * 40.0 # Try lower
Discontinuous Targets — Use smooth functions:
delta = np.sin(cnt / 50.0 * np.pi) * 0.1
Robot Doesn’t Move
Diagnosis:
print(f"Running: {controller.running}")
state = controller.state
print(f"Current position: {state['qpos']}")
print(f"Desired position: {controller.q_desired}")
diff = np.linalg.norm(controller.q_desired - state['qpos'])
print(f"Distance to target: {diff}")
Common Issues:
Forgot to call start() —
controller.start()must be called firstWrong controller type — Sending
q_desiredbut in OSC mode? Usecontroller.switch("impedance")Target equals current — Check the distance to target
Gains too low — Increase
kp
Control Loop Issues
Communication Constraints Violation (Async Mode)
Symptoms: Robot aborts motion with communication_constraints_violation error.
Cause: A blocking call in your async code starved the 1kHz control loop.
Solutions:
Switch to server mode (
FrankaRemoteController) — the recommended approach for heavy workloadsOr follow the Async Mode Guide guide to avoid blocking the event loop
Low Control Frequency
Symptoms: test_connection() shows frequency < 990 Hz or high jitter.
Solutions:
Use a wired Ethernet connection (not WiFi)
Reduce system load (close unnecessary programs)
Consider a real-time Linux kernel
Move heavy computation to a separate process (server mode handles this automatically)
OSC Issues
OSC Unstable or Oscillates
Causes:
Near singularity:
jac = controller.state['jac'] cond = np.linalg.cond(jac) if cond > 100: print(f"Warning: Poor conditioning: {cond}")
Gains too high:
controller.ee_kp = np.array([200, 200, 200, 600, 600, 600]) controller.ee_kd = np.ones(6) * 8.0
Null-space conflict:
controller.null_kp = np.ones(7) * 5.0 controller.null_kd = np.ones(7) * 1.0
OSC Doesn’t Reach Target
Diagnosis:
state = controller.state
ee_current = state['ee']
ee_desired = controller.ee_desired
pos_error = np.linalg.norm(ee_desired[:3, 3] - ee_current[:3, 3])
print(f"Position error: {pos_error * 1000:.1f} mm")
Causes:
Target unreachable (outside workspace)
Null-space pulling away — adjust
null_kp/null_kdSingularity — move via intermediate poses
Programming Issues
TypeError: ‘coroutine’ object is not iterable
Cause: Forgot to await an async function.
# Wrong (async mode)
controller.start()
# Correct (async mode)
await controller.start()
Note
This only applies to async mode. In server mode, controller.start() is synchronous.
RuntimeError: This event loop is already running
Cause: Using asyncio.run() inside an async function.
# Wrong
async def my_function():
asyncio.run(controller.start())
# Correct
async def my_function():
await controller.start()
Getting Help
Before asking for help:
Check this guide — is your issue covered?
Test in simulation — does it work with
RobotInterface(None)?Review the examples in Examples
Check server logs:
aiofranka log -n 50Simplify — does a minimal example reproduce the issue?
When asking for help, include:
aiofranka version:
pip show aiofrankaOperating system and Python version
Minimal code that reproduces the issue
Full error message from terminal
Whether you’re using server mode or async mode
Where to ask:
GitHub Issues: https://github.com/Improbable-AI/aiofranka/issues