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

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
    • Maintains protocol compatibility all libfranka versions
  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
  • 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

franka_sim-0.1.11.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.1.11-cp311-cp311-manylinux2014_x86_64.whl (24.2 kB view details)

Uploaded CPython 3.11

franka_sim-0.1.11-cp311-cp311-macosx_11_0_universal2.whl (24.2 kB view details)

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

franka_sim-0.1.11-cp310-cp310-manylinux2014_x86_64.whl (24.2 kB view details)

Uploaded CPython 3.10

franka_sim-0.1.11-cp310-cp310-macosx_11_0_universal2.whl (24.2 kB view details)

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

franka_sim-0.1.11-cp39-cp39-manylinux2014_x86_64.whl (24.2 kB view details)

Uploaded CPython 3.9

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

Hashes for franka_sim-0.1.11.tar.gz
Algorithm Hash digest
SHA256 f7bffaeee4c02acab3d0782a8984b573be1679344950d1a115141e3032e3da28
MD5 4b5f11a0e35420131f8cad78d32fc442
BLAKE2b-256 b4859ef7544aabebbba69d69614d2cb0800774f616906f6c31156dca82313d42

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for franka_sim-0.1.11-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c7e60f88e3250b40a4fa50d024e79ad6f4b400cc91c7ce151f98ad9728b65753
MD5 07d7066d62b113ce7b84c6f4e1d2cd38
BLAKE2b-256 d1ea0e9db0f5b1fbf348543e9b02261b0fe5e7465ee533739e33092a538b4c7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for franka_sim-0.1.11-cp311-cp311-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 706c1719a9ce54b2aedbdbb5edfac5540548d41935714d9097f9a1eb3ccfe058
MD5 b53f56363df3fb9313ddb4d49ca950ca
BLAKE2b-256 3cf667f1146889c67d61560b9c692287a2a090d4a1af6de52dd5e64535553cdd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for franka_sim-0.1.11-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e0c6b639e226f3e8dccb7cac9730cd185181850819abca62247df6cbce0c3c17
MD5 f2ba73e1b5085eabad65fe507b939b21
BLAKE2b-256 bcfd3e9905e2b499b14ed54c148b0768984e6459159ea532e9c08df479ff2e9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for franka_sim-0.1.11-cp310-cp310-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 75beac2ee782a8515deb0bc9c4e209846578962f32b05967c6fe6b3dfbb82f92
MD5 b6b1a1e640987a657badc410c9b3c6da
BLAKE2b-256 9313756e03602fba1689e23c5e2376f3ced049b298572c4bc9364ea3cc4edfa4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for franka_sim-0.1.11-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3c02bc30a6b63d60721c73f3865534021708b5b8aa29e2ffbd7468e1c69eff4b
MD5 6444cfc6af8ee40c7e9887bfdca48843
BLAKE2b-256 a7846aff008718c2b08bf6135020280672313cc96fe1a08ecbafcfeab12487b2

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