physics#
Gazebo Physics : Physics classes and functions for robot applications
Maintainer: scpeters AT openrobotics DOT org
Gazebo Physics, a component of Gazebo, provides an abstract physics interface designed to support simulation and rapid development of robot applications.
Table of Contents
Motivation
Many physics simulation software libraries have been designed for different applications (gaming, robotics, science) and with different features (rigid or deformable contact, 2d or 3d). Gazebo Physics is designed on the premise that there is not a single physics engine that is universally best for all simulation contexts. It should be possible to support a different set of features for each physics engine according to its capabilities. A physics engine can then be chosen for each application based on its context.
Features
Gazebo Physics provides the following functionality:
Granular definition of physics engine features as optional API’s.
Plugin interface for loading physics engines with requested features at runtime.
Features for common aspects of rigid body dynamic simulation
Construct model from SDFormat file.
Collision shapes (such as box, sphere, cylinder, cone, capsule, ellipsoid, mesh, heightmap).
Joint types (such as revolute, prismatic, fixed, ball, screw, universal).
Step simulation, get/set state, apply inputs.
Reference implementation of physics plugin using dartsim.
A custom physics engine focused on fast kinematics of large environments, the Trivial Physics Engine.
CompositeData
structures for efficiently using native types in API.
Install
See the installation tutorial.
Usage
Please refer to the examples directory.
Documentation
API and tutorials can be found at https://gazebosim.org/libs/physics.
On Ubuntu, you can also generate the documentation from a clone of this repository by following these steps.
You will need Doxygen, which can be installed using
sudo apt-get install doxygen
Install dependencies
sudo apt-add-repository -s "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -c -s) main" sudo apt-get build-dep -y libgz-physics8-dev
Clone the repository
git clone https://github.com/gazebosim/gz-physics -b gz-physics8
Configure and build the documentation.
cd gz-physics; mkdir build; cd build; cmake ..; make doc
View the documentation by running the following command from the build directory.
firefox doxygen/html/index.html
Testing
Follow these steps to run tests and static code analysis in your clone of this repository.
Follow the “Source Installation” instructions in the installation tutorial.
Run tests.
make test
Static code checker.
make codecheck
Folder Structure
Refer to the following table for information about important directories and files in this repository.
gz-physics
├── bullet Files for bullet plugin component.
├── bullet-featherstone Files for bullet-featherstone plugin component.
├── dartsim Files for dartsim plugin component.
├── examples Examples about how to use the library.
├── heightmap Heightmap related header files.
├── include/gz/physics Header files.
├── mesh Files for mesh component.
├── sdf Files for sdf component.
├── src Source files and unit tests.
├── test
│ ├── benchmark Benchmark tests.
│ ├── common_test Tests common to multiple physics plugins.
│ ├── include Header files for tests.
│ ├── integration Integration tests.
│ ├── performance Performance tests.
│ ├── plugins Plugins used in tests.
│ ├── regression Regression tests.
│ ├── resources Models and mesh resource files.
│ └── static_assert Tests involving compilation failures.
├── tpe
│ ├── lib Implementation of TPE engine.
│ └── plugin Files for TPE plugin component.
├── tutorials Tutorials, written in markdown.
├── Changelog.md Changelog.
└── CMakeLists.txt CMake build script.
Contributing
Please see the contribution guide.
Code of Conduct
Please see CODE_OF_CONDUCT.md.
Versioning
This library uses Semantic Versioning. Additionally, this library is part of the Gazebo project which periodically releases a versioned set of compatible and complementary libraries. See the Gazebo website for version and release information.
License
This library is licensed under Apache 2.0. See also the LICENSE file.
Gazebo Physics 8.x
Gazebo Physics 8.0.0 (2024-09-25)
Baseline: this includes all changes from 7.3.0 and earlier.
Miscellaneous documentation fixes
Remove deprecated functions
Enable 24.04 CI, require cmake 3.22.1
bullet-featherstone: Support empty links
Fix CTAD compile warnings
bullet-featherstone: Enforce joint velocity and effort limits for velocity control commands
Add Cone as a collision shape
dartsim: optimize picking contact points with ODE collision detector
Add no gravity link support
bullet-featherstone: Support convex decomposition for meshes
Find python directly instead of using GzPython
Fix unused variable warning
Support setting solver iterations
Define
GZ_PHYSICS_VERSION_NAMESPACE
in config.hhRemove
HIDE_SYMBOLS_BY_DEFAULT
: replace by a default configuration in gz-cmake.Use
HIDE_SYMBOLS_BY_DEFAULT
Bump dependency versions: gz-cmake4, gz-common6, gz-math8, gz-plugin3, gz-utils3, sdformat15
Bump major version to 8
Gazebo Physics 7.x
Gazebo Physics 7.3.0 (2024-06-25)
Backport: Add Cone as a collision shape
[featherstone] Publish JointFeedback forces.
Parse voxel resolution when decomposing meshes
bullet-featherstone: Fix attaching fixed joint between models with inertial pose offset
Ray intersection simulation feature
bullet-featherstone: Fix bounding box for collisions with pose offset
bullet-featherstone: Update fixed constraint behavior
Update InspectFeatures.hh
bullet-featherstone: Fix convex hull shape’s AABB
Add package.xml
bullet-featurestore: Enable auto deactivation
bullet-featherstone: Support convex decomposition for meshes
backport bullet-featherstone solver iters
bullet-featherstone: fix SetWorldPose with off-diagonal moment of inertia
Revert “Disable check in DetachableJointTest, CorrectAttachmentPoints for dartsim plugin on macOS (#613)”
Gazebo Physics 7.2.0 (2024-04-10)
Use relative install paths for plugin shared libraries
Disable test failing due to ODE/libccd
bullet-featherstone: Ignore collision between static objects and objects with world joint
Disable check in DetachableJointTest, CorrectAttachmentPoints for dartsim plugin on macOS
bullet-featherstone: Fix attaching fixed joint
Gazebo Physics 7.1.0 (2024-03-14)
bullet-featherstone: Improve mesh collision stability
bullet-featherstone: Support nested models
Garden test cleanup
Support setting max contacts in dartsim’s ODE collision detector
Get bullet version from cmake instead of API
Update CI badges in README
Reduce error to debug messsage for mesh construction
bullet-featherstone: Set collision spinning friction
Infrastructure
dartsim: fix handling inertia matrix pose rotation
bullet-featherstone: fix setting angular velocity
bullet-featherstone: support off-diagonal inertia
bullet-featherstone: Fix how links are flattened in ConstructSdfModel
Add sample ctest cmds to tutorial
Add a test to verify behavior of detachable joints
Use correct link indicies when constructing fixed constraints
Gazebo Physics 7.0.0 (2023-09-29)
dartsim: Fix sign convention error with contact surface motion velocities
Make dartsim/World.hh header private
Documentation fixes
Mimic constraint feature using bullet-featherstone
ign -> gz
Reduce error to debug messsage for mesh construction
Infrastructure
Bumps in harmonic : sdformat14
EllipsoidShape: use const references in API
Fixed Dartsim SDFFeatures_TEST
⬆️ Bump main to 7.0.0~pre1
Gazebo Physics 6.x
Gazebo Physics 6.6.0 (2024-06-11)
dartsim: optimize picking contact points with ODE collision detector
Fix windows compiler warning
Disable test failing due to ODE/libccd
bullet-featherstone: Improve mesh collision stability
bullet-featherstone: Support nested models
Revert “bazel: updates for garden (#513)”
Garden test cleanup
Support setting max contacts in dartsim’s ODE collision detector
Get bullet version from cmake instead of API
Reduce error to debug messsage for mesh construction (#581)
bullet-featherstone: Set collision spinning friction
Infrastructure
dartsim: fix handling inertia matrix pose rotation
bullet-featherstone: fix setting angular velocity
bullet-featherstone: support off-diagonal inertia
bullet-featherstone: Fix how links are flattened in ConstructSdfModel
Add sample ctest cmds to tutorial
Add a test to verify behavior of detachable joints
Use correct link indicies when constructing fixed constraints
Gazebo Physics 6.5.1 (2023-09-26)
joint_features test: reduce console spam
Cleaning up bullet memory use issues
Gazebo Physics 6.5.0 (2023-08-30)
Add optional binary relocatability
Unregister collision detectors when the darstim plugin is unloaded
Minor cleanup of dartsim
Fix Github project automation for new project board
Check that plugin exists before adding common test
Clangtidy fixes
Gazebo Physics 6.4.0 (2023-05-22)
dartsim: Add support for joints in worlds
Changed contraint to constraint
Bullet featherstone: Add JointTransmittedWrench for F-T sensor
Reenable AABB tests for ellipsoids
Fix bullet double to float conversion compiler warnings
Disable failing bullet(-featherstone) tests on windows
Support multiple collisions per link in bullet-featherstone
Fix bullet related segfaults on macOS
dartsim: Refactor entity addition logic in the EntityStorage class
Fix a crash due to an invalid pointer
Forward ports
Gazebo Physics 6.3.2 (2023-03-28)
Fix joint index used in bookkeeping
Move joint transmitted wrench test to separate file
Gazebo Physics 6.3.1 (2023-03-22)
Rename COPYING to LICENSE
Remove an extra symlink on all platforms
Fix memory corruption due to faulty refcount tracking
Infrastructure
Forward Ports
Gazebo Physics 6.3.0 (2023-02-02)
Fix windows warnings related to bullet
ign -> gz : Remove redundant namespace references
Resolve joints in nested models
Apply gravity external to dartsim for added mass
Refactor the VectorApprox to a single location
Port: 5 to 6
Simplify “falling” test to not require LinkFrameSemantics
Install the common test executables to libexec
[bullet]: Fix how changed link poses are computed
Gazebo Physics 6.2.0 (2022-11-28)
Reduce error to debug and add notes
Support fluid added mass
Deduplicate common tests part1
Gazebo Physics 6.1.1 (2022-11-07)
Suppress MSVC warning that is not applicable
Fix construction of nested models
Gazebo Physics 6.1.0 (2022-10-27)
Removed GetCollision API it’s redundant
Add bullet-featherstone plugin
Fix bullet cmake, probably bad merge
Gazebo Physics 6.0.0 (2022-09-21)
Improved documentation and instructions
Added common tests
dartsim: fix handling inertia matrix pose rotation
ABI tweaks to help bullet-featherstone
Add code coverage ignore file
Fix bullet classic entity management
Ignition to Gazebo transition
Fixed warning SDFfeatures_TEST - dartsim
Update GoogleTest to latest version
Use new Joint APIs for Parent/Child name
Bullet: Added collision shape to Capsule and Ellipsoid
examples: fix cmake find version variables
Fix ExpectData compiler warnings
Added DEM support to heightmaps
Remove Bionic from future releases (Garden+)
Gazebo Physics 5.x
Gazebo Physics 5.3.2 (2023-09-01)
Fix a crash due to an invalid pointer
Infrastructure
Rename COPYING to LICENSE
Gazebo Physics 5.3.1 (2023-02-16)
Fix memory corruption due to faulty refcount tracking
Gazebo Physics 5.3.0 (2023-01-09)
Fix windows warnings related to bullet
Apply ign-gz after forward merge from ign-physics2
Port: 2 to 5
Fix build errors and warnings for DART 6.13.0
Backport windows fix
dartsim: fix handling inertia matrix pose rotation
Add code coverage ignore file
Change IGN_DESIGNATION to GZ_DESIGNATION
README: Ignition -> Gazebo
Gazebo Physics 5.2.0 (2022-06-29)
dartsim: support non-tree kinematics in AttachFixedJoint
Use SuppressWarning from ign-utils
Make CONFIG a CMake pass-through option for DART
Remove explicitly-defined copy constructor/operator
Fix ExpectData compiler warnings
Fix copying of ExpectData objects
Add Ubuntu Jammy CI
Fix Apache license version
Add project() to examples
Gazebo Physics 5.1.0 (2021-11-12)
Remove unused gz_auto_headers.hh.in
Added DART feature for setting joint limits dynamically.
Allow customization of contact surface properties
Avoid
auto
usage in Eigen expressions.Fix cmake script for bullet
Improved README.md folder structure
Gazebo Physics 5.0.0 (2021-09-30)
Add GetJointTransmittedWrench feature
[dartsim] Add support for joint frame semantics
Fix TPE Link velocity not being updated and Model velocity not having any effect.
Make gz-physics CMake config files relocatable
Added DART feature for setting joint limits dynamically.
Remove use of deprecated function sdf::JointAxis::InitialPosition
Clean up functions that trigger GCC9 warnings
Forward merges
Infrastructure
Gazebo Physics 4.x
Gazebo Physics 4.x.x (20XX-XX-XX)
Gazebo Physics 4.3.0 (2021-11-11)
Remove unused gz_auto_headers.hh.in
Added DART feature for setting joint limits dynamically.
Allow customization of contact surface properties
Avoid
auto
usage in Eigen expressions.[dartsim] Add support for joint frame semantics
Fix TPE Link velocity not being updated and Model velocity not having any effect.
Infrastructure
Make gz-physics CMake config files relocatable
Gazebo Physics 4.2.0 (2021-07-16)
Support FreeGroup features for nested models
Add Gravity Feature, fix LinkFeatures_TEST
Heightmaps 🏔️
Added Ellipsoid and Capsule shapes to TPE
Fix collision detection issue when using joints across nested models
Use slip compliance APIs available in upstream dartsim release
Fix DART deprecation warning
Integrate Bullet engine
Remove
tools/code_check
and update codecov[Citadel] Update tutorials
Gazebo Physics 4.1.0 (2021-05-01)
[TPE] Update link pose and velocity
Infrastructure
Gazebo Physics 4.0.0 (2021-03-30)
Remove nested models
Add dart-bullet dependency to CI
[tpe] Add empty nested model construction and nested model entity management
dartsim: fdir1 expressed_in frame from SDFormat
Set collision detector and solver for DART
Added ellipsoid and capsule to dartsim
Add “ChangedWorldPose” to ForwardStep::Output’s expected data
[dartsim] Add empty nested model construction and nested model entity management
Rename CanonicalLink to RootLink
write modified link data to output in physics step
[dartsim] Ensure Link and Model APIs continue to work after joint creation in DART
[dartsim] Fix joint construction errors due to link name duplication or BodyNodes moving to other skeletons
Infrastructure
Bump in edifice: gz-common4
Constructing nested models for dartsim
Depend on ignition-utils1 cli component
Bump in edifice: sdformat11
Documentation
Gazebo Physics 3.x
Gazebo Physics 3.x.x (20XX-XX-XX)
Gazebo Physics 3.3.0 (2021-07-12)
Use slip compliance API’s available in upstream dartsim release
Fix DART deprecation warning
Integrate Bullet engine
Remove
tools/code_check
and update codecov[Citadel] Update tutorials
Gazebo Physics 3.2.0 (2021-04-28)
Infrastructure
Linters
Documentation
Add Windows installation
dartsim-plugin windows build fixes
[TPE] Skip computing collisions for static objects
[TPE] Update link pose and velocity
[TPE] Fix poseDirty getter
Add restitution coefficient support for bouncing
Fix compilation with gcc 10.2.0
Support setting canonical link
Ignore invalid joint commands
Fix CONFIG arg in gz_find_package(DART) call
Gazebo Physics 3.1.0 (2020-10-18)
Support for slip compliance in the dartsim-plugin.
Enforce joint effort limit in dartsim-plugin
Support nested models in TPE
Fix CONFIG arg in gz_find_package(DART) call
Fix getting model bounding box in world frame in TPE
Improve fork experience
Gazebo Physics 3.0.0 (2020-09-30)
Upgrade to libsdformat10
Update examples and tutorials
Gazebo Physics 2.x
Gazebo Physics 2.6.2 (2024-01-05)
dartsim: fix handling inertia matrix pose rotation
Fix a crash due to an invalid pointer
Infrastructure
Gazebo Physics 2.6.1 (2023-01-09)
Fix build errors and warnings for DART 6.13.0
Don’t install CMakeLists.txt files
Gazebo Physics 2.6.0 (2022-11-30)
Migrate Ignition headers
Gazebo Physics 2.5.1 (2022-08-16)
Remove redundant namespace references
Add code coverage ignore file
Change
IGN_DESIGNATION
toGZ_DESIGNATION
Ignition -> Gazebo
Make
CONFIG
a CMake pass-through option for DARTRemove explicitly-defined copy constructor/operator for
Shape
Fix
ExpectData
compiler warningsFix copying of
ExpectData
objectsFix Apache license version
Tutorial fixes
Add
project()
to examples
Gazebo Physics 2.5.0 (2021-11-09)
Remove unused gz_auto_headers.hh.in
Added DART feature for setting joint limits dynamically.
Allow customization of contact surface properties
[dartsim] Add support for joint frame semantics
Use slip compliance API’s available in upstream dartsim release
Fix dart deprecation warning
[Citadel] Update tutorials
Infrastructure
Gazebo Physics 2.4.0 (2021-04-14)
[TPE] Update link pose and velocity
Infrastructure
Documentation
TPE: Skip computing collisions for static objects
Add restitution coefficient support for bouncing
Fix compilation with gcc 10.2.0
Fix TPE poseDirty getter
Support setting canonical link
Resolved codecheck issues
Ignore invalid joint commands
Support getting shape AABB in world frame
Fix CONFIG arg in
gz_find_package(DART)
call
Gazebo Physics 2.3.0 (2020-09-29)
Support for slip compliance in the dartsim-plugin.
Enforce joint effort limit in dartsim-plugin
Support nested models in TPE
Gazebo Physics 2.2.0 (2020-07-30)
Add Base and EntityManagement to tpeplugin
Add all features to tpeplugin
Fix TPE codecheck errors
[TPE] Add function to get an Entity’s bounding box
[TPE] Add collision detector
[TPE] Add GetContactsFromLastStepFeature
[TPE] Implement collision filtering using collide bitmasks and add CollisionFilterMaskFeature
Fix copying SpecifyData objects
Extend contact data with force, normal, and penetration depth
Add offset to link and collision pose
Add link offset to simulation
Gazebo Physics 2.1.0 (2020-05-07)
Add RequestFeatures API for casting the features of an entity to a new feature set when possible.
Add Get Bounding Box features
Install plugins to unversioned files
Add DetachJointFeature feature.
Added support for collision bitmasks for collision filtering
Clean up internal resources when a model gets removed
Trivial Physics Engine - partial implementation
Add simple example of physics plugin and loader
Update BitBucket links, add .gitignore, CODEOWNERS, workflow
Physics Plugin Documentation
Reduce the symbol load caused by feature templates
Fix collision issue with detachable joints
Add PlaneShape feature and implement in dartsim with test.
Restore detached BodyNodes to original skeleton
Gazebo Physics 2.0.0 (2019-12-10)
Support compiling against dart 6.9.
Support sdformat 1.7 frame semantics.
Upgrade to libsdformat9
Improve compile time by reducing length of symbol names
Gazebo Physics 1.x
Gazebo Physics 1.10.0 (2020-11-04)
Resolved codecheck issues
Ignore invalid joint commands in the dartsim-plugin
Fix CONFIG arg in gz_find_package(DART) call
Gazebo Physics 1.9.0 (2020-09-17)
Support for slip compliance in the dartsim-plugin.
Enforce joint effort limit in dartsim-plugin
Gazebo Physics 1.8.0 (2020-05-08)
Restore detached BodyNodes to original skeleton
Fix collision issue with detachable joints
Add PlaneShape feature and implement in dartsim with test.
Gazebo Physics 1.7.0 (2020-04-13)
Add RequestFeatures API for casting the features of an entity to a new feature set when possible.
Gazebo Physics 1.6.0 (2020-03-18)
Add Get Bounding Box features
Install plugins to unversioned files
Gazebo Physics 1.5.0 (2020-02-10)
Clean up internal resources when a model gets removed
Add DetachJointFeature feature.
Gazebo Physics 1.4.0 (2019-08-27)
Add SetJointVelocityCommand feature.
Add
IGN_PROFILER_ENABLE
cmake option for enabling the gz-common profiler.
Gazebo Physics 1.3.1 (2019-07-19)
Set the time step from ForwardStep::Input in dartsim.
Gazebo Physics 1.3.0 (2019-07-18)
Support for more friction pyramid parameters in dartsim.
Skip compilation of test plugins if
BUILD_TESTING
is false
Gazebo Physics 1.2.0 (2019-05-29)
Change DART dependency to look for 6.9.0 instead of 6.7.2
Gazebo Physics 1.1.0 (2019-05-20)
Simple port of existing PERFORMANCE test as BENCHMARK
Add prototype of FreeGroup features
Feature for adding external forces and torques to a link
Assign friction coefficients from collision elements
Added axis-aligned bounding box feature
Add introduction and installation tutorials
Remove workaround for console_bridge linking on macOS
Gazebo Physics 1.0.1 (2019-03-05)
Don’t link core to ignition-common3, just the test plugin that uses it
Gazebo Physics 1.0.0 (2019-03-01)
Initial release