A high-fidelity Genesis simulation server that communicates with the Franka robot's network protocol, enabling seamless switching between simulation and hardware.
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
- libfranka-python - Python bindings for libfranka
- franka-gym - Franka gym implementation
- Native libfranka control
- With Python
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
- 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
- Python 3.10+
- genesis-world
- numpy
- pinocchio
# Clone the repository
git clone [email protected]:BarisYazici/libfranka-sim.git
# Install the package
pip install -e .
# Start the simulation server
python3 run_server.py -v
python3 run_server.py
In your application, use standard libfranka commands The simulation will respond exactly like the real robot
To switch between simulation and hardware:
-
Update the robot IP address in your application:
- Use
localhost
or127.0.0.1
for simulation - Use the real robot's IP for hardware
- Use
-
No other changes needed - your application code remains identical
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)
Contributions are welcome! Please read our contributing guidelines and submit pull requests to our repository.
This project is licensed under the Apache License Version 2.0 - see the LICENSE file for details.
- Franka Robotics GmbH for the original libfranka implementation
- The Genesis Simulator team for the physics engine