Use the Franky library from non-realtime machines.
┌─────────────┐ RPyC ┌─────────────┐ libfranka ┌─────────────┐
│ Your Laptop │ ──────────► │ RT Server │ ──────────────► │ Franka Robot│
│ (Or Cluster)│ │ │ │ │
└─────────────┘ └─────────────┘ └─────────────┘
- 🔌 Drop-in replacement for the franky library with function stubs
- ⚡ Well proven - building on the common rpyc library
- 🚀 Simple - 5 minutes to get started
# One-time setup
mkdir ~/net_franky && cd ~/net_franky
python -m venv .venv && source .venv/bin/activate
pip install net-franky[server]rpyc_classic -p 18812 --host 0.0.0.0pip install net-frankygit clone https://github.com/yblei/net_franky.git
cd net_franky
pip install -e .from net_franky import setup_net_franky
# Connect to remote server
setup_net_franky("server-ip", 18812)
from net_franky.franky import Robot, CartesianMotion
robot = Robot("10.90.90.1") # Replace this with your robot's IP
# Let's start slow (this lets the robot use a maximum of 5% of its velocity, acceleration, and jerk limits)
robot.relative_dynamics_factor = 0.05
# Move the robot 20cm along the relative X-axis of its end-effector
motion = CartesianMotion(Affine([0.2, 0.0, 0.0]), ReferenceType.Relative)
robot.move(motion)That's it! 🎉 Your robot code now runs remotely.
Franky supports the registration of a callback function to a motion. This is useful to record trajectories or to stream pose information back for visualization. Since this function is called with 1000Hz and the calls are buffered, execution over the network leads to significant delays.
We therefore provide a pointer to the latest motion callback data in
robot_state, time_step, rel_time, abs_time, control_signal = robot.get_last_callback_data()
Warning: If you get segmentation faults, make sure you use the same version of python on the server and the client.
We welcome your contributions! Please feel free to report issues if there are any. If you have new ideas/features, please fork the repository, implement your changes, and create a pull request:)