Open source robotics simulator with physics, 3D rendering, sensor models and a graphical interface, the latest version of Gazebo.
gazebosim/gz-physics
An abstract C++ physics interface for robot simulation that lets applications swap between different physics engines through a plugin system.
- Stars
- 95
- Forks
- 88
- Open issues
- 148
- Last commit
- 2 days ago
What is it?
Gazebo Physics is a C++ library that sits between robot simulation software and the physics engines that do the actual computation. Rather than tying an application to one engine, it defines a common API for features such as model construction from SDFormat files, collision shapes, joint types, and stepping the simulation or reading and writing its state. Engines are loaded as plugins at runtime, and each engine can expose only the optional features it supports.
The project ships with a reference plugin built on dartsim and includes the Trivial Physics Engine (TPE), a custom engine focused on fast kinematics in large environments. It is a component of the Gazebo simulator, and its folder layout separates the core headers, per-engine plugins, mesh and SDF handling, tests and tutorials. Installation and API documentation are provided through the Gazebo website.
Key features
- 01Defines physics engine features as optional APIs, so each engine exposes only what it supports.
- 02Loads physics engine plugins at runtime.
- 03Builds models from SDFormat files.
- 04Supports collision shapes such as box, sphere, cylinder, capsule, mesh and heightmap.
- 05Supports joint types including revolute, prismatic, fixed, ball and universal.
- 06Includes a dartsim-based reference plugin and the Trivial Physics Engine.
Use cases
- Running the same robot simulation on different physics engines to compare behavior.
- Building robot simulation tools that should not depend on a single physics engine.
- Simulating large environments with the fast-kinematics Trivial Physics Engine.
Quick start
- 1
Follow the installation tutorial linked in the README
- 2
Browse the examples directory to see how to use the library
Things to know
- The README gives no package-manager install command, so setup relies on an external tutorial and building from source.
- It is a C++ library and interface layer, not a standalone simulator, so it needs an application or physics plugin to be useful.
In collections
Topics
FAQ
- What is gz-physics?
- An abstract C++ physics interface for robot simulation that lets applications swap between different physics engines through a plugin system. Gazebo Physics is a C++ library that sits between robot simulation software and the physics engines that do the actual computation. Rather than tying an application to one engine, it defines a common API for features such as model construction from SDFormat files, collision shapes, joint types, and stepping the simulation or reading and writing its state. Engines are loaded as plugins at runtime, and each engine can expose only the optional features it supports.
- Is gz-physics free to use? What license does it have?
- gz-physics is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is gz-physics still maintained?
- Actively maintained. The last commit to gz-physics was on Nov 5, 2026.
- What can I use gz-physics for?
- Running the same robot simulation on different physics engines to compare behavior. Building robot simulation tools that should not depend on a single physics engine. Simulating large environments with the fast-kinematics Trivial Physics Engine.
- How do I install gz-physics?
- Follow the installation tutorial linked in the README Browse the examples directory to see how to use the library
- Where can I get gz-physics?
- The source code and installation instructions are on GitHub: https://github.com/gazebosim/gz-physics
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Gazebo Sim and ROS 2 simulator for the Crazyflie 2.x nano-quadcopter, with its flight controllers, ported from the ROS 1 RotorS-based CrazyS.
A simulation environment built on Gazebo and ROS 2 for testing unmanned surface vehicles in marine scenarios, based on RobotX competition tasks.
Lightweight 2.5D dynamics simulator for wheeled mobile robots and vehicles, usable standalone, via ROS 1/2, or from C++ and Python.
Bullet Physics SDK, a C++ library for real-time collision detection and multi-physics simulation used in games, VR, robotics and machine learning.
An open-source ROS 2 Jazzy and Gazebo Harmonic simulation stack for autonomous mobile robots, covering mapping, localization and Nav2 navigation.