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

Uploaded CPython 3.11

franka_sim-0.1.9-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.9-cp310-cp310-manylinux2014_x86_64.whl (24.2 kB view details)

Uploaded CPython 3.10

franka_sim-0.1.9-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.9-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.9.tar.gz.

File metadata

  • Download URL: franka_sim-0.1.9.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.9.tar.gz
Algorithm Hash digest
SHA256 6b876063b678021301ff459455e4467896ad8b02e0c001850efa19b03e113ea9
MD5 f911a1bd9b22912c8ec3bf5412554285
BLAKE2b-256 c841c97da2b47fac02c53d9164f33b346250a58754e792dd768b55cf2597d811

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for franka_sim-0.1.9-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f4dd641aa1589f5ffae2227bcd65a7b760b56e4445269ba6ba4a86050e50cdd6
MD5 f63e316deaa6806c0992f7ef6f902ad5
BLAKE2b-256 dfc43b3158a4496b8283a77ebf5fac7a41f99af91e608a25b12df9c66b6ed2f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for franka_sim-0.1.9-cp311-cp311-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 c2af57e064947d962c5047df8c5b5083efb46dd390b0f368e884308a4923bd0b
MD5 66553d4904204b93f3e562a5f2cac1e0
BLAKE2b-256 f518bde6284f4fcad4d764a80259ee6a540470e5a646d68b8e5b072a34fea6cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for franka_sim-0.1.9-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d4c78abcbb1e00ea3ab9053f27ede49b69109f9081f0e01a06ce5d2b820cc6ce
MD5 98864dbb27776ed0e7c52527d27b7bd1
BLAKE2b-256 a446a9ec4df3c0ae5c0a84e270b08bece95a9ce975d4d4714c72d5e515e59de4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for franka_sim-0.1.9-cp310-cp310-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 335283b11bd1570c94c61d1358771ca18ece81159a51b691da654a4e3d6f4e9b
MD5 30296c131ec9c2537991764a69174fdc
BLAKE2b-256 03d7579a0f42540c1f8049b9f62934d866b8e1f7db4c1793e36c794f0a3efb95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for franka_sim-0.1.9-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e91681c27c7c0786204aeb45bab843d77887ce7343415048b1825825c7853a97
MD5 a07b91f572590799b8926d9ebefe5fce
BLAKE2b-256 9cb2f7748da08b00069d80dc1e72f846403a9a452876e883b1727b4434b55ad0

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