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
  • numpy
  • numba

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.

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.8.tar.gz (10.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.8-cp311-cp311-manylinux2014_x86_64.whl (23.9 kB view details)

Uploaded CPython 3.11

franka_sim-0.1.8-cp311-cp311-macosx_11_0_universal2.whl (23.9 kB view details)

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

franka_sim-0.1.8-cp310-cp310-manylinux2014_x86_64.whl (23.9 kB view details)

Uploaded CPython 3.10

franka_sim-0.1.8-cp310-cp310-macosx_11_0_universal2.whl (23.9 kB view details)

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

franka_sim-0.1.8-cp39-cp39-manylinux2014_x86_64.whl (23.9 kB view details)

Uploaded CPython 3.9

File details

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

File metadata

  • Download URL: franka_sim-0.1.8.tar.gz
  • Upload date:
  • Size: 10.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.8.tar.gz
Algorithm Hash digest
SHA256 9cf8f948a67c191069f83448b0e947b348b922bc4bc49c5a25f809a68feae6aa
MD5 deb126c8dd64834cb9698359d6f8bbf3
BLAKE2b-256 5f20928c11caa647ba1ed233dbc674fee0c6123992b8c6907047fb9d80b2f7fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for franka_sim-0.1.8-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ee48af6c11345371f72ff36342b63d233c60c189e1dcd875b04feafc94e6849
MD5 28bd94e161551d9a9e9dca4c1813570e
BLAKE2b-256 f033a55692f855bb46c00a89dce774c422385daab957195015410fd8c83dcd58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for franka_sim-0.1.8-cp311-cp311-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 2d9fb905c44cecdb3eab4bb78e1ecdd00be500cd78821ef0c7ebe675b3b52730
MD5 3262335911d5f2fa081355db80d94386
BLAKE2b-256 e4a52e0fb7c3e9449a3cc6ccf239814de04e87efd902a2cb7bcef52fee133fee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for franka_sim-0.1.8-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cef2cd33a98badaaf5a7e953b3ac310cc37c357c24da60936345c5896f21de50
MD5 abfc23bea52c5ec5a025690c02ceb9db
BLAKE2b-256 a9c0f10b78dc6be4a38be37ed5e8b56382357dc5e004bb443a499fe4805787aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for franka_sim-0.1.8-cp310-cp310-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 094b918f6b97bdf31ae297b3934ab19b8d9da2ba2e7d4b72ce5a895afff17e01
MD5 9025aef1314699c28cce86c775dd338c
BLAKE2b-256 bd3d0efc80386720055b1b19763811a6928f9ced967755f5ff58e03ddfb0f612

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for franka_sim-0.1.8-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 634b74988766f557ebf613c0da0834d01325a965cf811abbaab50024ce06a025
MD5 7874a92733b599f05e507183f96a291f
BLAKE2b-256 b2624ae24383d7570b25173730c82bb42112d2e67ee254034f8d97341ed5a037

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