Logo

Frankz

2026 Robotics

A modern C++/Python wrapper for libfranka that simplifies Franka Research 3 robot control with advanced trajectory generation.

Franka Research 3 robot executing smooth trajectory using Frankz

Real-time trajectory execution with Frankz on Franka Research 3 robot

Demo

The following comparison demonstrates why frankz exists.

Waypoint Trajectory Comparison

franky-control

frankz

The franky-control can only interpret waypoints as discrete point-to-point motions (left). While frankz generates smooth, continuous trajectories through waypoints (right).

Jerk-Limited Trajectory Smoothing

ruckig waypoints

frankz with ruckig-smoothing waypoints

Use ruckig Cloud api to generate trajectory and playback (left). Notice the sound is jerky. Frankz uses ruckig with TOTG. Notice the motor is smooth.

Background

Researchers face barriers when controlling Franka robots:

  1. Not everyone knows ROS - steep learning curve for researchers focused on algorithms
  2. C++ expertise required - libfranka’s C++ API excludes Python-first roboticists
  3. Focus on algorithms, not control - researchers want to prototype ideas, not debug middleware
  4. Existing solutions fall short:
    • franky-control: Pure Python, but fake waypoints—just discrete point-to-point motions
    • Ruckig Cloud API: Has Python bindings, but generates jerky motions via cloud roundtrips

I built frankz to solve this: smooth trajectory generation + pure Python API + real-time performance.


Contribution

Core Features:

  • Dual-space motion planning (joint-space + Cartesian-space)
  • TOTG (Time-Optimal Trajectory Generation) for speed
  • Ruckig integration for jerk-limited smoothness
  • 1 kHz real-time control loop via C++ backend
  • Zero-overhead Python bindings with nanobind

Performance:

  • <1ms trajectory computation latency
  • 100% real-time constraint satisfaction
  • Zero-copy Python-C++ data transfer

Developer Experience:

from frankz import Robot, Motion
robot = Robot("172.16.0.2")
motion = Motion()
motion.joint_p2p(target=[0, -0.785, 0, -2.356, 0, 1.571, 0.785])
robot.execute(motion)

References

Code Inspiration:

  1. MoveIt2 trajectory_processing module - TOTG implementation patterns
  2. Modern Robotics Chapter 9 - Trajectory generation

Technical Stack:

  • C++17 - Real-time motion generation backend
  • nanobind - Zero-overhead Python bindings
  • libfranka - Franka Control Interface (FCI)
  • Ruckig - Online trajectory optimization

Things I Learned

Low-Level Control:

  • Real-time constraints in robotics (1 kHz loop frequency is non-negotiable)
  • Memory management in Python-C++ bindings (avoiding copies at 1000 Hz)

Trajectory Theory:

  • Time parameterization of paths (how TOTG works under velocity/acceleration limits)
  • Jerk limiting for mechanical longevity (third-order continuity matters)

Software Engineering:

  • Modern Python packaging (scikit-build-core + PyPI workflows)
  • GitHub Actions for cross-platform C++ builds
  • API design balancing simplicity and power

Community Give Back

Since I referenced MoveIt2’s trajectory processing code, I contributed back:

Merged PR: Fixed trajectory constraint handling edge case in trajectory_processing module

This ensures the open-source cycle continues—take from the community, improve it, give back.


Acknowledgments

Supervisor: Prof. Ziqi Wang, HKUST

Lab Resources: Von Neumann Institute, HKUST



PROJECT INFO

Year
2026
Type
Robotics

HARDWARE

Franka Research 3 Real-time kernel Beelink Ser8

SOFTWARE

C++17 Python 3.10+ nanobind libfranka Ruckig

TAGS

robotics motion planning trajectory optimization real-time control