-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nate Koenig <nate@openrobotics.org>
- Loading branch information
Showing
154 changed files
with
7,186 additions
and
1,438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# This component expresses custom features of the bullet plugin, which can | ||
# expose native bullet data types. | ||
gz_add_component(bullet-featherstone INTERFACE | ||
DEPENDS_ON_COMPONENTS sdf mesh | ||
GET_TARGET_NAME features) | ||
|
||
link_directories(${BULLET_LIBRARY_DIRS}) | ||
target_link_libraries(${features} INTERFACE GzBullet::GzBullet) | ||
|
||
gz_get_libsources_and_unittests(sources test_sources) | ||
|
||
# TODO(MXG): Think about an gz_add_plugin(~) macro for ign-cmake | ||
set(engine_name bullet-featherstone-plugin) | ||
gz_add_component(${engine_name} | ||
SOURCES ${sources} | ||
DEPENDS_ON_COMPONENTS bullet-featherstone | ||
GET_TARGET_NAME bullet_plugin) | ||
|
||
target_link_libraries(${bullet_plugin} | ||
PUBLIC | ||
${features} | ||
${PROJECT_LIBRARY_TARGET_NAME}-sdf | ||
${PROJECT_LIBRARY_TARGET_NAME}-mesh | ||
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER} | ||
gz-math${GZ_MATH_VER}::eigen3) | ||
|
||
# Note that plugins are currently being installed in 2 places: /lib and the engine-plugins dir | ||
install(TARGETS ${bullet_plugin} DESTINATION ${GZ_PHYSICS_ENGINE_INSTALL_DIR}) | ||
|
||
# The library created by `gz_add_component` includes the ign-physics version | ||
# (i.e. libgz-physics1-name-plugin.so), but for portability, | ||
# we also install an unversioned symlink into the same versioned folder. | ||
set(versioned ${CMAKE_SHARED_LIBRARY_PREFIX}${bullet_plugin}${CMAKE_SHARED_LIBRARY_SUFFIX}) | ||
set(unversioned ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME_NO_VERSION_LOWER}-${engine_name}${CMAKE_SHARED_LIBRARY_SUFFIX}) | ||
if (WIN32) | ||
# disable MSVC inherit via dominance warning | ||
target_compile_options(${bullet_plugin} PUBLIC "/wd4250") | ||
INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy | ||
${GZ_PHYSICS_ENGINE_INSTALL_DIR}\/${versioned} | ||
${GZ_PHYSICS_ENGINE_INSTALL_DIR}\/${unversioned})") | ||
else() | ||
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unversioned}) | ||
INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${GZ_PHYSICS_ENGINE_INSTALL_DIR}) | ||
endif() | ||
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unversioned}) | ||
INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${GZ_PHYSICS_ENGINE_INSTALL_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Bullet Featherstone Physics Plugin | ||
|
||
This component enables the use of this [Bullet Physics](https://github.com/bulletphysics/bullet3) `btMultiBody` Featherstone implementation. | ||
The Featherstone uses minimal coordinates to represent articulated bodies and efficiently simulate them. | ||
|
||
# Features | ||
|
||
Originally tracked via: [Bullet featherstone meta-ticket](https://github.com/gazebosim/gz-physics/issues/423) | ||
|
||
## High-level feature list | ||
|
||
* Constructing SDF Models | ||
* Constructing SDF Worlds | ||
* Joint Types: | ||
* Fixed | ||
* Prismatic | ||
* Revolute | ||
* Ball Joint | ||
* Stepping the simulation world | ||
* Applying external forces/torques | ||
* Free Groups | ||
* Contact sensor | ||
|
||
## Physics features list | ||
|
||
These are the specific physics API features implemented. | ||
|
||
* Entity Management Features | ||
* ConstructEmptyWorldFeature | ||
* GetEngineInfo | ||
* GetJointFromModel | ||
* GetLinkFromModel | ||
* GetModelFromWorld | ||
* GetShapeFromLink | ||
* GetWorldFromEngine | ||
* RemoveModelFromWorld | ||
* FreeGroupFeatures | ||
* FindFreeGroupFeature | ||
* SetFreeGroupWorldPose | ||
* SetFreeGroupWorldVelocity | ||
* Kinematics Features | ||
* LinkFrameSemantics | ||
* ModelFrameSemantics | ||
* FreeGroupFrameSemantics | ||
* Joint Features | ||
* GetBasicJointState | ||
* SetBasicJointState | ||
* GetBasicJointProperties | ||
* SetJointVelocityCommandFeature | ||
* SetJointTransformFromParentFeature | ||
* AttachFixedJointFeature | ||
* DetachJointFeature | ||
* GetRevoluteJointProperties | ||
* GetPrismaticJointProperties | ||
* FixedJointCast | ||
* Link Features | ||
* AddLinkExternalForceTorque | ||
* Sdf Features | ||
* sdf::ConstructSDFModel | ||
* sdf::ConstructSDFWorld | ||
* sdf::ConstructSDFCollision | ||
* Shapes Features | ||
* GetShapeBoundingBox | ||
* GetBoxShapeProperties | ||
* AttachBoxShapeFeature | ||
* GetCapsuleShapeProperties | ||
* AttachCapsuleShapeFeature | ||
* GetCylinderShapeProperties | ||
* AttachCylinderShapeFeature | ||
* GetEllipsoidShapeProperties | ||
* AttachEllipsoidShapeFeature | ||
* GetSphereShapeProperties | ||
* AttachSphereShapeFeature | ||
* Simulation Features | ||
* ForwardStep | ||
* GetContactsFromLastStepFeature | ||
* World Features | ||
* Gravity | ||
|
||
# Caveats | ||
|
||
* All links _must_ have a collision element. | ||
|
||
In order for links to be active, bullet checks for the presence of collision elements. | ||
In the case that collisions aren't available, adding a small sphere at the link origin is sufficient (but won't get good collision behavior) | ||
|
||
* All links/joints of a model must be constructed with the model | ||
|
||
Additional links/joints cannot be added to a model after initial construction. | ||
|
||
* Ellipse axis-aligned bounding box returns invalid values on Ubuntu Focal | ||
|
||
Tracked via: https://github.com/gazebosim/gz-physics/issues/440 | ||
|
||
* Joint transmitted wrench doesn't accurately report forces/torques | ||
|
||
Tracked via: https://github.com/gazebosim/gz-physics/pull/434 |
Oops, something went wrong.