A high-fidelity simulation server that implements the Franka robot network protocol, enabling seamless switching between simulation and hardware.
Project description
Franka Simulation Server
A high-fidelity Genesis simulation server that communicates with the Franka robot's network protocol, enabling seamless switching between simulation and hardware.
Overview
The Franka Simulation Server provides a drop-in replacement for the real Franka robot, implementing the complete libfranka network protocol. This allows developers to:
- Test and debug robot controllers in simulation before deployment
- Develop applications that work identically on both simulation and hardware
- Validate error handling and safety features
- Experiment with different control strategies risk-free
Related Projects
- libfranka-python - Python bindings for libfranka
- franka-gym - Franka gym implementation
Preview Video
- Native libfranka control
- With Python
Architecture
In this repository, we only provide the simulation server backend with Genesis connection.
The libfranka python bindings will become available in a separate repository.
The system consists of several key components:
-
libfranka Interface Layer
- Implements the standard Franka robot network protocol
- Handles TCP command interface and UDP state updates
- Maintains protocol compatibility all libfranka versions
-
Genesis Simulation Backend
- Physics-based robot simulation using the Genesis engine
- Real-time joint state computation and dynamics
-
State Management
- Complete robot state tracking and synchronization
- Accurate error reporting and status updates
- Real-time state transmission (1kHz update rate)
-
Control Modes
- Joint Position Control
- Joint Velocity Control
- Joint Torque Control
- Supports seamless switching between modes
Key Features
- Protocol Compatibility: Full implementation of the Franka robot network protocol
- Real-time Simulation: High-frequency state updates and control (1kHz)
- Multiple Control Modes: Supports position, velocity, and torque control
- Error Handling: Replicates real robot error states and recovery
Getting Started
Prerequisites
- Python 3.9+
- genesis-world==0.2.1
- numpy==1.26.4
- numba==0.60.0
Installation
Option 1: Install from PyPI (Recommended)
The package is available on PyPI and can be installed with pip:
pip install franka-sim
Option 2: Install from Source
# Clone the repository
git clone git@github.com:BarisYazici/libfranka-sim.git
# Install the package
cd libfranka-sim/simulation
pip install -e .
Basic Usage
After installation, you can run the server using the command-line executable:
# Start the server without visualization
run-franka-sim-server
# Start the server with visualization
run-franka-sim-server -v
Alternatively, if you installed from source, you can use:
# Start the simulation server
python -m franka_sim.run_server -v
In your application, use standard libfranka commands. The simulation will respond exactly like the real robot.
Troubleshooting
If you encounter issues related to missing asset files, make sure you have the correct version of genesis-world installed:
pip install genesis-world==0.2.1
The simulator now automatically uses the assets provided by the Genesis package, so no additional asset files are needed.
Configuration
Switching Between Simulation and Hardware
To switch between simulation and hardware:
-
Update the robot IP address in your application:
- Use
localhostor127.0.0.1for simulation - Use the real robot's IP for hardware
- Use
-
No other changes needed - your application code remains identical
Development Status
The simulation server currently implements all major features of the Franka robot:
- Complete network protocol implementation
- All joint interfaces
- Real-time state updates
- Visualization support
- Genesis connection
- libfranka python bindings
- Advanced collision detection (in progress)
- Error handling and recovery (planned)
- Cartesian interfaces (planned)
- Return mass, coriolis, gravity, and inverse dynamics (Robot models) (planned)
- Gripper simulation (planned)
Contributing
Contributions are welcome! Please read our contributing guidelines and submit pull requests to our repository.
License
This project is licensed under the Apache License Version 2.0 - see the LICENSE file for details.
Acknowledgments
- Franka Robotics GmbH for the original libfranka implementation
- The Genesis Simulator team for the physics engine
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file franka_sim-0.1.11.tar.gz.
File metadata
- Download URL: franka_sim-0.1.11.tar.gz
- Upload date:
- Size: 5.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7bffaeee4c02acab3d0782a8984b573be1679344950d1a115141e3032e3da28
|
|
| MD5 |
4b5f11a0e35420131f8cad78d32fc442
|
|
| BLAKE2b-256 |
b4859ef7544aabebbba69d69614d2cb0800774f616906f6c31156dca82313d42
|
File details
Details for the file franka_sim-0.1.11-cp311-cp311-manylinux2014_x86_64.whl.
File metadata
- Download URL: franka_sim-0.1.11-cp311-cp311-manylinux2014_x86_64.whl
- Upload date:
- Size: 24.2 kB
- Tags: CPython 3.11
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7e60f88e3250b40a4fa50d024e79ad6f4b400cc91c7ce151f98ad9728b65753
|
|
| MD5 |
07d7066d62b113ce7b84c6f4e1d2cd38
|
|
| BLAKE2b-256 |
d1ea0e9db0f5b1fbf348543e9b02261b0fe5e7465ee533739e33092a538b4c7d
|
File details
Details for the file franka_sim-0.1.11-cp311-cp311-macosx_11_0_universal2.whl.
File metadata
- Download URL: franka_sim-0.1.11-cp311-cp311-macosx_11_0_universal2.whl
- Upload date:
- Size: 24.2 kB
- Tags: CPython 3.11, macOS 11.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
706c1719a9ce54b2aedbdbb5edfac5540548d41935714d9097f9a1eb3ccfe058
|
|
| MD5 |
b53f56363df3fb9313ddb4d49ca950ca
|
|
| BLAKE2b-256 |
3cf667f1146889c67d61560b9c692287a2a090d4a1af6de52dd5e64535553cdd
|
File details
Details for the file franka_sim-0.1.11-cp310-cp310-manylinux2014_x86_64.whl.
File metadata
- Download URL: franka_sim-0.1.11-cp310-cp310-manylinux2014_x86_64.whl
- Upload date:
- Size: 24.2 kB
- Tags: CPython 3.10
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0c6b639e226f3e8dccb7cac9730cd185181850819abca62247df6cbce0c3c17
|
|
| MD5 |
f2ba73e1b5085eabad65fe507b939b21
|
|
| BLAKE2b-256 |
bcfd3e9905e2b499b14ed54c148b0768984e6459159ea532e9c08df479ff2e9b
|
File details
Details for the file franka_sim-0.1.11-cp310-cp310-macosx_11_0_universal2.whl.
File metadata
- Download URL: franka_sim-0.1.11-cp310-cp310-macosx_11_0_universal2.whl
- Upload date:
- Size: 24.2 kB
- Tags: CPython 3.10, macOS 11.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75beac2ee782a8515deb0bc9c4e209846578962f32b05967c6fe6b3dfbb82f92
|
|
| MD5 |
b6b1a1e640987a657badc410c9b3c6da
|
|
| BLAKE2b-256 |
9313756e03602fba1689e23c5e2376f3ced049b298572c4bc9364ea3cc4edfa4
|
File details
Details for the file franka_sim-0.1.11-cp39-cp39-manylinux2014_x86_64.whl.
File metadata
- Download URL: franka_sim-0.1.11-cp39-cp39-manylinux2014_x86_64.whl
- Upload date:
- Size: 24.2 kB
- Tags: CPython 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c02bc30a6b63d60721c73f3865534021708b5b8aa29e2ffbd7468e1c69eff4b
|
|
| MD5 |
6444cfc6af8ee40c7e9887bfdca48843
|
|
| BLAKE2b-256 |
a7846aff008718c2b08bf6135020280672313cc96fe1a08ecbafcfeab12487b2
|