Skip to main content

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

Compatibility

franka_sim implements the latest libfranka wire protocol — robot server version 10. In this protocol the robot model is built client-side: during connection the client fetches the robot URDF via the GetRobotModel command and builds its own Pinocchio model. The server therefore just serves a valid URDF (a hand-less FR3 arm by default) instead of a precompiled model library.

You need a libfranka version that speaks server protocol 10:

libfranka Version Robot System Version Robot/Gripper Server
>= 0.18.0 >= 5.9.0 10 / 3 ✅ supported
>= 0.15.0 >= 5.7.2 9 / 3 — not supported

See the Franka software compatibility matrix for the full list. Older libfranka releases (server version 9 and below) use a different wire format — double-based RobotState and server-side LoadModelLibrary instead of GetRobotModel — and are not compatible with this server.

Related Projects

Preview Video

  • Native libfranka control

Libfranka Native Control

  • With Python

With Python

Architecture

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:

  1. libfranka Interface Layer

    • Implements the standard Franka robot network protocol
    • Handles TCP command interface and UDP state updates
    • Targets the latest libfranka wire protocol (robot server version 10)
  2. Genesis Simulation Backend

    • Physics-based robot simulation using the Genesis engine
    • Real-time joint state computation and dynamics
  3. State Management

    • Complete robot state tracking and synchronization
    • Accurate error reporting and status updates
    • Real-time state transmission (1kHz update rate)
  4. 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:

  1. Update the robot IP address in your application:

    • Use localhost or 127.0.0.1 for simulation
    • Use the real robot's IP for hardware
  2. 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
  • v10 wire protocol (Connect, float-based RobotState, GetRobotModel/URDF)
  • Robot model via URDF (client-side Pinocchio through GetRobotModel)
  • Advanced collision detection (in progress)
  • Error handling and recovery (planned)
  • Cartesian interfaces (planned)
  • Gripper simulation / Franka Hand (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

franka_sim-0.2.0.tar.gz (5.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

franka_sim-0.2.0-cp311-cp311-manylinux2014_x86_64.whl (32.4 kB view details)

Uploaded CPython 3.11

franka_sim-0.2.0-cp311-cp311-macosx_11_0_universal2.whl (32.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ universal2 (ARM64, x86-64)

franka_sim-0.2.0-cp310-cp310-manylinux2014_x86_64.whl (32.4 kB view details)

Uploaded CPython 3.10

franka_sim-0.2.0-cp310-cp310-macosx_11_0_universal2.whl (32.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ universal2 (ARM64, x86-64)

franka_sim-0.2.0-cp39-cp39-manylinux2014_x86_64.whl (32.4 kB view details)

Uploaded CPython 3.9

File details

Details for the file franka_sim-0.2.0.tar.gz.

File metadata

  • Download URL: franka_sim-0.2.0.tar.gz
  • Upload date:
  • Size: 5.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for franka_sim-0.2.0.tar.gz
Algorithm Hash digest
SHA256 67da6c4a00ce68162affb85eb9627a820c9cda419767830e1b44fa5ce7624b7a
MD5 e8e4e95855d33bb1d562eb3a316ebbbf
BLAKE2b-256 07ddc7ea262968042e19e18e7eebcbe7ef7aefbb735c3e768ddb6db084d75071

See more details on using hashes here.

File details

Details for the file franka_sim-0.2.0-cp311-cp311-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for franka_sim-0.2.0-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3c20ee1ad70d05d734a59c8efffb25fe66e890af1cbcee3b7afb7be6f9d05b69
MD5 679147bbd1262cb1150208f6b1fa20f6
BLAKE2b-256 26301faea2521046ca621cd29b9447a8d957edb9c084a0a376995377e81cc4a7

See more details on using hashes here.

File details

Details for the file franka_sim-0.2.0-cp311-cp311-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for franka_sim-0.2.0-cp311-cp311-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 cb305e1ec6af3a96b82d33ffb60a5380240a5e09c87885597bfdfe4f7a81a9c3
MD5 57ab66f4b8ffb828fd0f1eebde601962
BLAKE2b-256 a2230a2fe6d7552e1f8ed144d814e3b2cfececf50cfc0fcf07445b1c4be1a1da

See more details on using hashes here.

File details

Details for the file franka_sim-0.2.0-cp310-cp310-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for franka_sim-0.2.0-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 31791bdf144c89d68bc3fb9a0ef6d286d7d31330c09ee281c1a041855713ab35
MD5 e589b0cc44a1ab73bd48624928b49f11
BLAKE2b-256 b12f3546b5d83567479efa76ce8c43038f5ee11a3f899571254952e61f9627e4

See more details on using hashes here.

File details

Details for the file franka_sim-0.2.0-cp310-cp310-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for franka_sim-0.2.0-cp310-cp310-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 4f5a5010d3e86eac36c55db7ff4e8e7b28efa4360a7fb46a682c6d70ed8f677e
MD5 dc62af201abce3b693884d38f21a74fd
BLAKE2b-256 60291e9b7e3adcf22f0616f301c2f3c6467d7fece0bd9a740a80e98dabbfc89f

See more details on using hashes here.

File details

Details for the file franka_sim-0.2.0-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for franka_sim-0.2.0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e6c5225012193ed5ce5f3491817f0c9324430d93e2b6103d900637fad14af98e
MD5 189a5480bbf460d2b9f8fba3938489b0
BLAKE2b-256 09896419e63e940566e7425bca0f8c9034b20f516bd6e2b2ec6f20882962c125

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page