From 3ac4e662e13c4fd024b95ceb9368fe075f781c92 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Mon, 11 Jul 2022 17:13:11 -0700 Subject: [PATCH 1/2] Move png file (#381) Signed-off-by: methylDragon --- .../img/{ign-libraries.png => gz-libraries.png} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename tutorials/img/{ign-libraries.png => gz-libraries.png} (100%) diff --git a/tutorials/img/ign-libraries.png b/tutorials/img/gz-libraries.png similarity index 100% rename from tutorials/img/ign-libraries.png rename to tutorials/img/gz-libraries.png From 438a718856242cec53d0000d6d4cede93263be0c Mon Sep 17 00:00:00 2001 From: methylDragon Date: Mon, 11 Jul 2022 17:13:25 -0700 Subject: [PATCH 2/2] Partial source and cmake migrations (#381) Signed-off-by: methylDragon --- .github/ci/packages.apt | 14 +++++----- .github/workflows/ci.yml | 4 +-- .github/workflows/pr-collection-labeler.yml | 2 +- CMakeLists.txt | 6 ++--- Changelog.md | 4 +-- Migration.md | 2 +- README.md | 4 +-- api.md.in | 4 +-- bullet/CMakeLists.txt | 4 +-- configure.bat | 26 ------------------- dartsim/CMakeLists.txt | 4 +-- dartsim/src/CustomHeightmapShape.hh | 2 +- dartsim/src/CustomMeshShape.hh | 2 +- dartsim/src/JointFeatures_TEST.cc | 6 ++--- dartsim/src/SDFFeatures.cc | 2 +- heightmap/CMakeLists.txt | 2 +- include/CMakeLists.txt | 2 +- include/gz/physics/TemplateHelpers.hh | 2 +- include/gz/physics/detail/RelativeQuantity.hh | 8 +++--- mesh/CMakeLists.txt | 2 +- sdf/CMakeLists.txt | 2 +- sdf/include/gz/physics/sdf/ConstructVisual.hh | 2 +- test/CMakeLists.txt | 2 +- test/MockCenterOfMass.hh | 2 +- test/benchmark/CMakeLists.txt | 2 +- test/integration/FrameSemantics.hh | 4 +-- test/integration/JointTypes.hh | 4 +-- test/performance/CMakeLists.txt | 2 +- tpe/CMakeLists.txt | 2 +- tpe/plugin/CMakeLists.txt | 2 +- tpe/plugin/src/SDFFeatures.cc | 2 +- tutorials.md.in | 4 +-- tutorials/01_intro.md | 2 +- tutorials/02_installation.md | 14 +++++----- tutorials/06-physics-simulation-concepts.md | 12 ++++----- tutorials/08-implementing-a-custom-feature.md | 16 ++++++------ tutorials/09-set-up-physics-engine-tpe.md | 4 +-- tutorials/09_use_custom_engine.md | 4 +-- 38 files changed, 78 insertions(+), 106 deletions(-) delete mode 100644 configure.bat diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt index b670b9997..25021c47a 100644 --- a/.github/ci/packages.apt +++ b/.github/ci/packages.apt @@ -1,10 +1,10 @@ libbenchmark-dev libeigen3-dev -libignition-cmake3-dev -libignition-common5-dev -libignition-math7-dev -libignition-math7-eigen3-dev -libignition-plugin2-dev -libignition-utils2-cli-dev -libignition-utils2-dev +libgz-cmake3-dev +libgz-common5-dev +libgz-math7-dev +libgz-math7-eigen3-dev +libgz-plugin2-dev +libgz-utils2-cli-dev +libgz-utils2-dev libsdformat13-dev diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba1eed61a..bd14ed689 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Compile and test id: ci - uses: ignition-tooling/action-ignition-ci@focal + uses: gazebo-tooling/action-gz-ci@focal with: codecov-enabled: true cppcheck-enabled: true @@ -24,4 +24,4 @@ jobs: uses: actions/checkout@v2 - name: Compile and test id: ci - uses: ignition-tooling/action-ignition-ci@jammy + uses: gazebo-tooling/action-gz-ci@jammy diff --git a/.github/workflows/pr-collection-labeler.yml b/.github/workflows/pr-collection-labeler.yml index 7d7b4e179..38c4fc13b 100644 --- a/.github/workflows/pr-collection-labeler.yml +++ b/.github/workflows/pr-collection-labeler.yml @@ -8,6 +8,6 @@ jobs: steps: - name: Add collection labels if: github.event.action == 'opened' - uses: ignition-tooling/pr-collection-labeler@v1 + uses: gazebo-tooling/pr-collection-labeler@v1 with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 3047b795a..01be1fea8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,9 +16,7 @@ find_package(gz-cmake3 REQUIRED) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -gz_configure_project( - REPLACE_IGNITION_INCLUDE_PATH gz/physics - VERSION_SUFFIX pre1) +gz_configure_project(VERSION_SUFFIX pre1) #============================================================================ # Set project-specific options @@ -96,7 +94,7 @@ set(GZ_PHYSICS_RESOURCE_DIR "${CMAKE_SOURCE_DIR}/resources") # Plugin install dirs set(GZ_PHYSICS_ENGINE_INSTALL_DIR - ${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/gz-${IGN_DESIGNATION}-${PROJECT_VERSION_MAJOR}/engine-plugins + ${CMAKE_INSTALL_PREFIX}/${GZ_LIB_INSTALL_DIR}/gz-${GZ_DESIGNATION}-${PROJECT_VERSION_MAJOR}/engine-plugins ) #============================================================================ diff --git a/Changelog.md b/Changelog.md index 2043ed575..52461ab0d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -38,7 +38,7 @@ 1. Fix TPE Link velocity not being updated and Model velocity not having any effect. * [Pull request #289](https://github.com/gazebosim/gz-physics/pull/289) -1. Make ignition-physics CMake config files relocatable +1. Make gz-physics CMake config files relocatable * [Pull request #282](https://github.com/gazebosim/gz-physics/pull/282) 1. Added DART feature for setting joint limits dynamically. @@ -91,7 +91,7 @@ * [Pull request #287](https://github.com/gazebosim/gz-physics/pull/287) * [Pull request #281](https://github.com/gazebosim/gz-physics/pull/281) -1. Make ignition-physics CMake config files relocatable +1. Make gz-physics CMake config files relocatable * [Pull request #282](https://github.com/gazebosim/gz-physics/pull/282) ### Gazebo Physics 4.2.0 (2021-07-16) diff --git a/Migration.md b/Migration.md index 65fea3e8c..bbf3b5979 100644 --- a/Migration.md +++ b/Migration.md @@ -61,7 +61,7 @@ release will remove the deprecated code. ### Modifications -1. Depends on ignition-utils1. +1. Depends on gz-utils1. 1. Depends on sdformat11. diff --git a/README.md b/README.md index 196e80b6a..97c5fde85 100644 --- a/README.md +++ b/README.md @@ -128,12 +128,12 @@ Follow these steps to run tests and static code analysis in your clone of this r Refer to the following table for information about important directories and files in this repository. ``` -ign-physics +gz-physics ├── bullet Files for bullet plugin component. ├── dartsim Files for dartsim plugin component. ├── example Examples about how to use the library ├── heightmap Heightmap related header files. -├── include/ignition/physics Header files. +├── include/gz/physics Header files. ├── mesh Files for mesh component. ├── resources Model and mesh resource files used by tests. ├── sdf Files for sdf component. diff --git a/api.md.in b/api.md.in index 9bf3d8a27..e9222f8b3 100644 --- a/api.md.in +++ b/api.md.in @@ -1,6 +1,6 @@ -## Gazebo @IGN_DESIGNATION_CAP@ +## Gazebo @GZ_DESIGNATION_CAP@ -Gazebo @IGN_DESIGNATION_CAP@ is a component in Gazebo, a set of libraries +Gazebo @GZ_DESIGNATION_CAP@ is a component in Gazebo, a set of libraries designed to rapidly develop robot and simulation applications. ## License diff --git a/bullet/CMakeLists.txt b/bullet/CMakeLists.txt index 62219d95f..ccd775167 100644 --- a/bullet/CMakeLists.txt +++ b/bullet/CMakeLists.txt @@ -9,7 +9,7 @@ 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 +# TODO(MXG): Think about a gz_add_plugin(~) macro for gz-cmake set(engine_name bullet-plugin) gz_add_component(${engine_name} SOURCES ${sources} @@ -30,7 +30,7 @@ install(TARGETS ${bullet_plugin} DESTINATION ${GZ_PHYSICS_ENGINE_INSTALL_DIR}) # Install redirection headers install( DIRECTORY include/ - DESTINATION "${IGN_INCLUDE_INSTALL_DIR_FULL}") + DESTINATION "${GZ_INCLUDE_INSTALL_DIR_FULL}") # The library created by `gz_add_component` includes the gz-physics version # (i.e. libgz-physics1-name-plugin.so), but for portability, diff --git a/configure.bat b/configure.bat deleted file mode 100644 index 71b94d7cb..000000000 --- a/configure.bat +++ /dev/null @@ -1,26 +0,0 @@ - -:: NOTE: This script is only meant to be used as part of the ignition developers' CI system -:: Users and developers should build and install this library using cmake and Visual Studio - - -:: Install dependencies -::call %win_lib% :download_unzip_install bullet dart -call %win_lib% :download_unzip_install eigen3-3.3.4.zip -call %win_lib% :install_ign_project ign-plugin default - -:: Set configuration variables -@set build_type=Release -@if not "%1"=="" set build_type=%1 -@echo Configuring for build type %build_type% - -:: Go to the directory that this configure.bat file exists in -cd /d %~dp0 - -:: Create a build directory and configure -md build -cd build -cmake .. -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX="%WORKSPACE_INSTALL_DIR%" -DCMAKE_BUILD_TYPE="%build_type%" -DBUILD_TESTING:BOOL=False -:: Note: We disable testing by default. If the intention is for the CI to build and test -:: this project, then the CI script will turn it back on. - -:: If the caller wants to build and/or install, they should do so after calling this script diff --git a/dartsim/CMakeLists.txt b/dartsim/CMakeLists.txt index cbaeb245b..c8756ab83 100644 --- a/dartsim/CMakeLists.txt +++ b/dartsim/CMakeLists.txt @@ -13,11 +13,11 @@ endif() install( DIRECTORY include/ - DESTINATION "${IGN_INCLUDE_INSTALL_DIR_FULL}") + DESTINATION "${GZ_INCLUDE_INSTALL_DIR_FULL}") gz_get_libsources_and_unittests(sources test_sources) -# TODO(MXG): Think about an gz_add_plugin(~) macro for ign-cmake +# TODO(MXG): Think about a gz_add_plugin(~) macro for gz-cmake set(engine_name dartsim-plugin) gz_add_component(${engine_name} SOURCES ${sources} diff --git a/dartsim/src/CustomHeightmapShape.hh b/dartsim/src/CustomHeightmapShape.hh index dfd83e394..3358df8af 100644 --- a/dartsim/src/CustomHeightmapShape.hh +++ b/dartsim/src/CustomHeightmapShape.hh @@ -26,7 +26,7 @@ namespace physics { namespace dartsim { /// \brief This class creates a custom derivative of dartsim's HeightmapShape -/// class which allows an gz::common::Heightmap to be converted into a +/// class which allows a gz::common::Heightmap to be converted into a /// HeightmapShape that can be used by dartsim. /// Using float precision because Bullet's collision detector doesn't support /// double. common::HeightmapData also holds floats. diff --git a/dartsim/src/CustomMeshShape.hh b/dartsim/src/CustomMeshShape.hh index 1f7531b55..4a30b55f9 100644 --- a/dartsim/src/CustomMeshShape.hh +++ b/dartsim/src/CustomMeshShape.hh @@ -26,7 +26,7 @@ namespace physics { namespace dartsim { /// \brief This class creates a custom derivative of dartsim's MeshShape class -/// which allows an gz::common::Mesh to be converted into a MeshShape that +/// which allows a gz::common::Mesh to be converted into a MeshShape that /// can be used by dartsim. class CustomMeshShape : public dart::dynamics::MeshShape { diff --git a/dartsim/src/JointFeatures_TEST.cc b/dartsim/src/JointFeatures_TEST.cc index 8421a7ba6..d504d2982 100644 --- a/dartsim/src/JointFeatures_TEST.cc +++ b/dartsim/src/JointFeatures_TEST.cc @@ -834,7 +834,7 @@ TEST_F(JointFeaturesFixture, JointAttachDetach) // the same as it was before they were attached fixedJoint->SetTransformFromParent(poseParentChild); - // The name of the link obtained using the ign-physics API should remain the + // The name of the link obtained using the gz-physics API should remain the // same even though AttachFixedJoint renames the associated BodyNode. EXPECT_EQ(bodyName, model2Body->GetName()); @@ -855,7 +855,7 @@ TEST_F(JointFeaturesFixture, JointAttachDetach) // now detach joint and expect model2 to start moving again fixedJoint->Detach(); - // The name of the link obtained using the ign-physics API should remain the + // The name of the link obtained using the gz-physics API should remain the // same even though Detach renames the associated BodyNode. EXPECT_EQ(bodyName, model2Body->GetName()); @@ -1030,7 +1030,7 @@ TEST_F(JointFeaturesFixture, JointAttachDetachSpawnedModel) const auto poseParent = dartBody1->getTransform(); const auto poseChild = dartBody2->getTransform(); - // Before ign-physics PR #31, uncommenting the following `step` call makes + // Before gz-physics PR #31, uncommenting the following `step` call makes // this test pass, but commenting it out makes it fail. // world->Step(output, state, input); auto fixedJoint = model2Body->AttachFixedJoint(model1Body); diff --git a/dartsim/src/SDFFeatures.cc b/dartsim/src/SDFFeatures.cc index 628489f70..7a41f9a5b 100644 --- a/dartsim/src/SDFFeatures.cc +++ b/dartsim/src/SDFFeatures.cc @@ -665,7 +665,7 @@ Identity SDFFeatures::ConstructSdfLink( this->ConstructSdfCollision(linkIdentity, *collision); } - // ign-physics is currently ignoring visuals, so we won't parse them from the + // gz-physics is currently ignoring visuals, so we won't parse them from the // SDF // for (std::size_t i = 0; i < _sdfLink.VisualCount(); ++i) // { diff --git a/heightmap/CMakeLists.txt b/heightmap/CMakeLists.txt index 2012b5b98..4dd857c11 100644 --- a/heightmap/CMakeLists.txt +++ b/heightmap/CMakeLists.txt @@ -7,4 +7,4 @@ target_link_libraries(${heightmap} install( DIRECTORY include/ - DESTINATION "${IGN_INCLUDE_INSTALL_DIR_FULL}") + DESTINATION "${GZ_INCLUDE_INSTALL_DIR_FULL}") diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 4b2bdd7bb..992a1312e 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,2 +1,2 @@ add_subdirectory(gz) -install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL}) +install(DIRECTORY ignition DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL}) diff --git a/include/gz/physics/TemplateHelpers.hh b/include/gz/physics/TemplateHelpers.hh index 08a6242ba..e01a16f83 100644 --- a/include/gz/physics/TemplateHelpers.hh +++ b/include/gz/physics/TemplateHelpers.hh @@ -66,7 +66,7 @@ namespace gz /// \brief Use this macro to create an API "selector" for a custom class. /// /// Features may define APIs for class types that are not anticipated ahead of -/// time by the ign-physics library. When aggregating the API for that class +/// time by the gz-physics library. When aggregating the API for that class /// from a set of features, the Aggregator must be given a Selector that can /// ignore features that don't mention the class (or else a compilation failure /// would occur). diff --git a/include/gz/physics/detail/RelativeQuantity.hh b/include/gz/physics/detail/RelativeQuantity.hh index 1d54070d1..6edfaf7a7 100644 --- a/include/gz/physics/detail/RelativeQuantity.hh +++ b/include/gz/physics/detail/RelativeQuantity.hh @@ -477,8 +477,8 @@ namespace gz const Quantity &_box, const RotationType &/*_currentCoordinates*/) { - // TODO(anyone): Replace with gzwarn when/if we add an ign console - // dependency to ign-physics + // TODO(anyone): Replace with gzwarn when/if we add a gz console + // dependency to gz-physics std::cerr << "[AABBSpace::ResolveToWorldCoordinates] Warning: " << "Axis-aligned bounding boxes cannot undergo coordinate " << "changes.\n"; @@ -490,8 +490,8 @@ namespace gz const RotationType &/*_currentCoordinates*/, const RotationType &/*_targetCoordinates*/) { - // TODO(anyone): Replace with gzwarn when/if we add an ign console - // dependency to ign-physics + // TODO(anyone): Replace with gzwarn when/if we add a gz console + // dependency to gz-physics std::cerr << "[AABBSpace::ResolveToTargetCoordinates] Warning: " << "Axis-aligned bounding boxes cannot undergo coordinate " << "changes.\n"; diff --git a/mesh/CMakeLists.txt b/mesh/CMakeLists.txt index af5885524..96af77285 100644 --- a/mesh/CMakeLists.txt +++ b/mesh/CMakeLists.txt @@ -7,4 +7,4 @@ target_link_libraries(${mesh} install( DIRECTORY include/ - DESTINATION "${IGN_INCLUDE_INSTALL_DIR_FULL}") + DESTINATION "${GZ_INCLUDE_INSTALL_DIR_FULL}") diff --git a/sdf/CMakeLists.txt b/sdf/CMakeLists.txt index b2d661306..0917bdf91 100644 --- a/sdf/CMakeLists.txt +++ b/sdf/CMakeLists.txt @@ -5,4 +5,4 @@ target_link_libraries(${sdf} INTERFACE ${SDFormat_LIBRARIES}) install( DIRECTORY include/ - DESTINATION "${IGN_INCLUDE_INSTALL_DIR_FULL}") + DESTINATION "${GZ_INCLUDE_INSTALL_DIR_FULL}") diff --git a/sdf/include/gz/physics/sdf/ConstructVisual.hh b/sdf/include/gz/physics/sdf/ConstructVisual.hh index 6400fa2eb..da82a549b 100644 --- a/sdf/include/gz/physics/sdf/ConstructVisual.hh +++ b/sdf/include/gz/physics/sdf/ConstructVisual.hh @@ -32,7 +32,7 @@ class ConstructSdfVisual : public virtual Feature class Link : public virtual Feature::Link { // TODO(MXG): Return a Shape type instead of a bool once we have shape - // features in the core ign-physics library. + // features in the core gz-physics library. public: bool ConstructVisual(const ::sdf::Visual &_visual); }; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d1b00f4a0..ed0e79427 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,5 +1,5 @@ #============================================================================ -# Do a fake install of ign-physics in order to test the examples. +# Do a fake install of gz-physics in order to test the examples. #============================================================================ set(FAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/fake/install") diff --git a/test/MockCenterOfMass.hh b/test/MockCenterOfMass.hh index 4adad8a31..d2da10bd7 100644 --- a/test/MockCenterOfMass.hh +++ b/test/MockCenterOfMass.hh @@ -24,7 +24,7 @@ namespace mock { ///////////////////////////////////////////////// - // TODO(MXG): Offer an gz::physics::Vector class that accepts a + // TODO(MXG): Offer a gz::physics::Vector class that accepts a // FeaturePolicy type. template using Vector = Eigen::Matrix< diff --git a/test/benchmark/CMakeLists.txt b/test/benchmark/CMakeLists.txt index 0dc1c49bc..292a4f003 100644 --- a/test/benchmark/CMakeLists.txt +++ b/test/benchmark/CMakeLists.txt @@ -1,4 +1,4 @@ -include(IgnBenchmark) +include(GzBenchmark) set(tests ExpectData.cc diff --git a/test/integration/FrameSemantics.hh b/test/integration/FrameSemantics.hh index bfe4115c5..57de63556 100644 --- a/test/integration/FrameSemantics.hh +++ b/test/integration/FrameSemantics.hh @@ -15,8 +15,8 @@ * */ -#ifndef IGNITION_PHYSICS_TEST_INTEGRATION_FRAMESEMANTICS_HH -#define IGNITION_PHYSICS_TEST_INTEGRATION_FRAMESEMANTICS_HH +#ifndef GZ_PHYSICS_TEST_INTEGRATION_FRAMESEMANTICS_HH +#define GZ_PHYSICS_TEST_INTEGRATION_FRAMESEMANTICS_HH #include #include diff --git a/test/integration/JointTypes.hh b/test/integration/JointTypes.hh index 4e7e03884..d658604c9 100644 --- a/test/integration/JointTypes.hh +++ b/test/integration/JointTypes.hh @@ -15,8 +15,8 @@ * */ -#ifndef IGNITION_PHYSICS_TEST_INGEGRATION_JOINTTYPES_HH -#define IGNITION_PHYSICS_TEST_INGEGRATION_JOINTTYPES_HH +#ifndef GZ_PHYSICS_TEST_INGEGRATION_JOINTTYPES_HH +#define GZ_PHYSICS_TEST_INGEGRATION_JOINTTYPES_HH #include #include diff --git a/test/performance/CMakeLists.txt b/test/performance/CMakeLists.txt index 2646e63da..1034620fa 100644 --- a/test/performance/CMakeLists.txt +++ b/test/performance/CMakeLists.txt @@ -1,7 +1,7 @@ gz_get_sources(tests) # ExpectData test causes lcov to hang -# see ign-cmake issue 25 +# see gz-cmake issue 25 if("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "COVERAGE") list(REMOVE_ITEM tests ExpectData.cc) diff --git a/tpe/CMakeLists.txt b/tpe/CMakeLists.txt index a66e7c3e1..a77cfeeff 100644 --- a/tpe/CMakeLists.txt +++ b/tpe/CMakeLists.txt @@ -3,4 +3,4 @@ add_subdirectory(plugin) install( DIRECTORY include/ - DESTINATION "${IGN_INCLUDE_INSTALL_DIR_FULL}") + DESTINATION "${GZ_INCLUDE_INSTALL_DIR_FULL}") diff --git a/tpe/plugin/CMakeLists.txt b/tpe/plugin/CMakeLists.txt index bcbf58be5..f3075af5b 100644 --- a/tpe/plugin/CMakeLists.txt +++ b/tpe/plugin/CMakeLists.txt @@ -9,7 +9,7 @@ target_include_directories(${features} SYSTEM INTERFACE) gz_get_libsources_and_unittests(sources test_sources) -# TODO(MXG): Think about an gz_add_plugin(~) macro for ign-cmake +# TODO(MXG): Think about a gz_add_plugin(~) macro for gz-cmake set(engine_name tpe-plugin) gz_add_component(${engine_name} SOURCES ${sources} diff --git a/tpe/plugin/src/SDFFeatures.cc b/tpe/plugin/src/SDFFeatures.cc index 967ef95a8..409e222c7 100644 --- a/tpe/plugin/src/SDFFeatures.cc +++ b/tpe/plugin/src/SDFFeatures.cc @@ -321,7 +321,7 @@ Identity SDFFeatures::ConstructSdfCollision( } // \todo(anyone) add mesh. currently mesh has to be loaded externally // and passed in as argument as there is no logic for searching resources - // in ign-physics + // in gz-physics const auto collisionIdentity = this->AddCollision(link->GetId(), *collision); // set collide bitmask diff --git a/tutorials.md.in b/tutorials.md.in index e69f8c3a0..d0ef00a9a 100644 --- a/tutorials.md.in +++ b/tutorials.md.in @@ -1,8 +1,8 @@ \page tutorials Tutorials -Welcome to the Gazebo @IGN_DESIGNATION_CAP@ tutorials. These tutorials +Welcome to the Gazebo @GZ_DESIGNATION_CAP@ tutorials. These tutorials will guide you through the process of understanding the capabilities of the -Gazebo @IGN_DESIGNATION_CAP@ library and how to use the library effectively. +Gazebo @GZ_DESIGNATION_CAP@ library and how to use the library effectively. **Contents** diff --git a/tutorials/01_intro.md b/tutorials/01_intro.md index 425f31571..5ae8eddd2 100644 --- a/tutorials/01_intro.md +++ b/tutorials/01_intro.md @@ -20,7 +20,7 @@ Gazebo Physics extensibility and modularity. For a big picture of the Gazebo Physics operation in Gazebo ecosystem, see the abstract diagram below: -@image html img/ign-libraries.png +@image html img/gz-libraries.png In general, `gz-sim` is the main simulation library, in which its functionalities are powered by many component libraries. diff --git a/tutorials/02_installation.md b/tutorials/02_installation.md index 478ce2d55..5de68e93f 100644 --- a/tutorials/02_installation.md +++ b/tutorials/02_installation.md @@ -35,7 +35,7 @@ wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - On Ubuntu systems, `apt-get` can be used to install `gz-plugin`: ``` sudo apt-get update -sudo apt-get install libignition-physics<#>-dev +sudo apt-get install libgz-physics<#>-dev ``` Be sure to replace `<#>` with a number value, such as `1` or `2`, depending on which version you need. @@ -44,7 +44,7 @@ Be sure to replace `<#>` with a number value, such as `1` or `2`, depending on w 1. 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 ignition-physics<#>-dev + sudo apt-get build-dep -y gz-physics<#>-dev ``` Be sure to replace `<#>` with a number value, such as `1` or `2`, depending on which version you need. @@ -90,7 +90,7 @@ command-line tools: 2. Run the following commands ``` brew tap osrf/simulation - brew install ignition-physics<#> + brew install gz-physics<#> ``` Be sure to replace `<#>` with a number value, such as `1` or `2`, depending on which version you need. @@ -99,7 +99,7 @@ Be sure to replace `<#>` with a number value, such as `1` or `2`, depending on w 1. Install dependencies ``` brew tap osrf/simulation - brew install ignition-physics<#> --only-dependencies + brew install gz-physics<#> --only-dependencies ``` 2. Clone the repository @@ -142,7 +142,7 @@ conda activate gz-ws ## Binary Installation ``` -conda install libignition-physics<#> --channel conda-forge +conda install libgz-physics<#> --channel conda-forge ``` Be sure to replace `<#>` with a number value, such as 1 or 2, depending on @@ -156,12 +156,12 @@ This assumes you have created and activated a Conda environment while installing You can view available versions and their dependencies: ``` - conda search libignition-physics* --channel conda-forge --info + conda search libgz-physics* --channel conda-forge --info ``` Install dependencies, replacing `<#>` with the desired versions: ``` - conda install libignition-cmake<#> libignition-common<#> libignition-math<#> libignition-plugin<#> libsdformat<#> --channel conda-forge + conda install libgz-cmake<#> libgz-common<#> libgz-math<#> libgz-plugin<#> libsdformat<#> --channel conda-forge ``` 2. Navigate to where you would like to build the library, and clone the repository. diff --git a/tutorials/06-physics-simulation-concepts.md b/tutorials/06-physics-simulation-concepts.md index 7c74e58b3..1e7372002 100644 --- a/tutorials/06-physics-simulation-concepts.md +++ b/tutorials/06-physics-simulation-concepts.md @@ -10,7 +10,7 @@ This tutorial introduces simulation concepts that are used in Gazebo Physics. ## Physics simulation features -Here is a snapshot of simulation features supported by ign-physics: +Here is a snapshot of simulation features supported by gz-physics: - Collision detection: ODE, Bullet, various collision shapes and mesh - Kinematics; joint, arbitrary body shapes, various kinematic states like transmoration, velocity, acceleration etc., inverse kinematics @@ -56,7 +56,7 @@ To control the car movement, in a separate terminal window, we publish a Twist message using Gazebo Transport library: ```bash -ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 1.0}, angular: {z: 0.5}" +gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 1.0}, angular: {z: 0.5}" ``` Then press the Play button to start the simulation. @@ -114,13 +114,13 @@ Double message represeting the torque (Nm) applying to the rotor rod axis: ```bash -ign topic -t "/model/lift_drag_demo_model/joint/rod_1_joint/cmd_force" -m gz.msgs.Double -p "data: 0.7" +gz topic -t "/model/lift_drag_demo_model/joint/rod_1_joint/cmd_force" -m gz.msgs.Double -p "data: 0.7" ``` Then please press Play button to start the simulation. ```bash -ign topic -t "/model/lift_drag_demo_model/joint/rod_1_joint/cmd_force" -m gz.msgs.Double -p "data: 0.0" +gz topic -t "/model/lift_drag_demo_model/joint/rod_1_joint/cmd_force" -m gz.msgs.Double -p "data: 0.0" ``` You will see the cube drops due to no lift force from support torque on the rod, @@ -209,13 +209,13 @@ Twist message to command the `X3` multicopter ascending 0.1 m.s as follow: ```bash -ign topic -t "/X3/gazebo/command/twist" -m gz.msgs.Twist -p "linear: {x:0 y: 0 z: 0.1} angular {z: 0}" +gz topic -t "/X3/gazebo/command/twist" -m gz.msgs.Twist -p "linear: {x:0 y: 0 z: 0.1} angular {z: 0}" ``` then hovering: ```bash -ign topic -t "/X3/gazebo/command/twist" -m gz.msgs.Twist -p " " +gz topic -t "/X3/gazebo/command/twist" -m gz.msgs.Twist -p " " ``` @image html img/hover.gif width=100% diff --git a/tutorials/08-implementing-a-custom-feature.md b/tutorials/08-implementing-a-custom-feature.md index e4968ef16..7db6fd8ea 100644 --- a/tutorials/08-implementing-a-custom-feature.md +++ b/tutorials/08-implementing-a-custom-feature.md @@ -22,11 +22,11 @@ physics engine in `gz-physics` repository and how to define a custom Below is the general structure of the `gz-physics` repository: ``` -ign-physics +gz-physics ├── dartsim Files for dartsim plugin component. ├── tpe Files for tpe plugin component. ├── heightmap Files for heightmap component. -├── include/ignition/physics Header files. +├── include/gz/physics Header files. ├── mesh Files for mesh component. ├── resources Model and mesh resource files used by tests. ├── sdf Files for sdf component. @@ -49,14 +49,14 @@ Looking closer to a plugin folder, for example, the `dartsim` (DART) plugin: dartsim ├── worlds Example SDF files for testing dartsim plugin functionalities. ├── src Main implementation files of the plugin features interfacing the physics engines API -├── include/ignition/physics/dartsim Header files for the plugin features. +├── include/gz/physics/dartsim Header files for the plugin features. └── CMakeLists.txt CMake plugin build script. ``` Basically, new implementation of \ref gz::physics::Feature "Feature" or \ref gz::physics::FeatureList "FeatureList", which is corresponded to a functionality of the external physics engine can be defined as a header in -`include/ignition/physics/` folder. The custom feature could +`include/gz/physics/` folder. The custom feature could be added in a \ref gz::physics::FeatureList "FeatureList" and implemented its functionalities in `src` folder. @@ -134,9 +134,9 @@ will not run at the same time when requested. ### Define custom feature template -With the requirements and restrictions above, we first need to define a feature template for the custom feature. In this case, this feature will be responsible for retrieving world pointer from the physics engine. The template is placed in [World.hh](https://github.com/gazebosim/gz-physics/blob/main/dartsim/include/ignition/physics/dartsim/World.hh): +With the requirements and restrictions above, we first need to define a feature template for the custom feature. In this case, this feature will be responsible for retrieving world pointer from the physics engine. The template is placed in [World.hh](https://github.com/gazebosim/gz-physics/blob/main/dartsim/include/gz/physics/dartsim/World.hh): -\snippet dartsim/include/ignition/physics/dartsim/World.hh feature template +\snippet dartsim/include/gz/physics/dartsim/World.hh feature template The `RetrieveWorld` feature retrieves world pointer from physics engine, so we will use the `World` entity inherited @@ -160,7 +160,7 @@ dartsim │ ├── CustomFeatures.hh │ ├── CustomFeatures.cc │ └── ... -├── include/ignition/physics/dartsim +├── include/gz/physics/dartsim │ └── World.hh └── CMakeLists.txt ``` @@ -208,6 +208,6 @@ dartsim │ ├── CustomFeatures.hh │ ├── CustomFeatures.cc │ ├── ... -├── include/ignition/physics/dartsim +├── include/gz/physics/dartsim └── CMakeLists.txt ``` diff --git a/tutorials/09-set-up-physics-engine-tpe.md b/tutorials/09-set-up-physics-engine-tpe.md index 16e9d3d17..5c3ea1805 100644 --- a/tutorials/09-set-up-physics-engine-tpe.md +++ b/tutorials/09-set-up-physics-engine-tpe.md @@ -127,8 +127,8 @@ and [Base.hh](https://github.com/gazebosim/gz-physics/blob/main/tpe/plugin/src/B into `plugin` folder by: ```bash -wget https://raw.githubusercontent.com/gazebosim/gz-physics/main/tpe/plugin/CMakeLists.txt -P /tpe/plugin/ -wget https://raw.githubusercontent.com/gazebosim/gz-physics/main/tpe/plugin/src/Base.hh -P /tpe/plugin/src +wget https://raw.githubusercontent.com/gazebosim/gz-physics/main/tpe/plugin/CMakeLists.txt -P /tpe/plugin/ +wget https://raw.githubusercontent.com/gazebosim/gz-physics/main/tpe/plugin/src/Base.hh -P /tpe/plugin/src ``` Now the folder structure looks like this: diff --git a/tutorials/09_use_custom_engine.md b/tutorials/09_use_custom_engine.md index 900b5ed07..7eeaa1b07 100644 --- a/tutorials/09_use_custom_engine.md +++ b/tutorials/09_use_custom_engine.md @@ -23,7 +23,7 @@ the folder structure could be slightly different from what's shown below. Here's the plugin folder structure of TPE, within the Gazebo Physics library. ``` -ign-physics +gz-physics ├── tpe │ ├── plugin Implementation of the plugin features interfacing the physics engines API │ │ ├── src @@ -103,7 +103,7 @@ in `EntityManagementFeatures` "FeatureList" using TPE API from `tpe/lib` in Gaze Before we dive into the feature implementation, we need to understand how the features are defined. The \ref gz::physics::ConstructEmptyWorldFeature "ConstructEmptyWorldFeature" -is declared in a function template file `gz-physics/include/ignition/physics/ConstructEmpty.hh`. +is declared in a function template file `gz-physics/include/gz/physics/ConstructEmpty.hh`. Gazebo Physics library uses function templates to specify features that accept generic types. The use of templates makes it easier to implement features using different physics engine APIs,