Demo
The following comparison demonstrates why frankz exists.
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).
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:
- Not everyone knows ROS - steep learning curve for researchers focused on algorithms
- C++ expertise required - libfranka’s C++ API excludes Python-first roboticists
- Focus on algorithms, not control - researchers want to prototype ideas, not debug middleware
- 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:
- MoveIt2
trajectory_processingmodule - TOTG implementation patterns - 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
