Skip to content

Use the Franky library from non-realtime Machines.

License

Notifications You must be signed in to change notification settings

yblei/net_franky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 net_franky

Use the Franky library from non-realtime machines.

License Tests

🏗️ How it works

┌─────────────┐    RPyC     ┌─────────────┐    libfranka    ┌─────────────┐
│ Your Laptop │ ──────────► │ RT Server   │ ──────────────► │ Franka Robot│
│ (Or Cluster)│             │             │                 │             │
└─────────────┘             └─────────────┘                 └─────────────┘

🎯 Key Benefits:

  • 🔌 Drop-in replacement for the franky library with function stubs
  • Well proven - building on the common rpyc library
  • 🚀 Simple - 5 minutes to get started

🚀 Quick Start

1. Server Setup (Real-time machine)

# One-time setup
mkdir ~/net_franky && cd ~/net_franky
python -m venv .venv && source .venv/bin/activate
pip install net-franky[server]

2. Start server (Run in tmux/screen)

rpyc_classic -p 18812 --host 0.0.0.0

3. Installation

Install via pip

pip install net-franky

Install from source

git clone https://github.com/yblei/net_franky.git
cd net_franky
pip install -e .

Usage

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.


Deviation from franky: Wrapper around the robot class

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.

🤝 Contributing

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:)

About

Use the Franky library from non-realtime Machines.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •  

Languages