From 3fb60d021daa73da71d89443d59b3b121ab4abdf Mon Sep 17 00:00:00 2001 From: methylDragon Date: Mon, 11 Jul 2022 17:13:25 -0700 Subject: [PATCH] Partial source and cmake migrations Signed-off-by: methylDragon --- .github/ci/packages.apt | 14 +++++----- .github/workflows/ci.yml | 4 +-- .github/workflows/pr-collection-labeler.yml | 2 +- CMakeLists.txt | 6 ++--- Migration.md | 2 +- README.md | 2 +- api.md.in | 4 +-- bullet/CMakeLists.txt | 4 +-- configure.bat | 26 ------------------- dartsim/CMakeLists.txt | 4 +-- 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 | 4 +-- mesh/CMakeLists.txt | 2 +- sdf/CMakeLists.txt | 2 +- sdf/include/gz/physics/sdf/ConstructVisual.hh | 2 +- test/CMakeLists.txt | 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 | 2 +- tutorials/09-set-up-physics-engine-tpe.md | 4 +-- tutorials/09_use_custom_engine.md | 2 +- 34 files changed, 62 insertions(+), 90 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/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..d21af22e2 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ 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 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..aba352412 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 an 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..2276ba058 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 an gz_add_plugin(~) macro for gz-cmake set(engine_name dartsim-plugin) gz_add_component(${engine_name} SOURCES ${sources} 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..35fdf6301 100644 --- a/include/gz/physics/detail/RelativeQuantity.hh +++ b/include/gz/physics/detail/RelativeQuantity.hh @@ -478,7 +478,7 @@ namespace gz const RotationType &/*_currentCoordinates*/) { // TODO(anyone): Replace with gzwarn when/if we add an ign console - // dependency to ign-physics + // dependency to gz-physics std::cerr << "[AABBSpace::ResolveToWorldCoordinates] Warning: " << "Axis-aligned bounding boxes cannot undergo coordinate " << "changes.\n"; @@ -491,7 +491,7 @@ namespace gz const RotationType &/*_targetCoordinates*/) { // TODO(anyone): Replace with gzwarn when/if we add an ign console - // dependency to ign-physics + // 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/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..b292bd916 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 an 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..ab6af84d7 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/sim/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/sim/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..10a768b80 100644 --- a/tutorials/08-implementing-a-custom-feature.md +++ b/tutorials/08-implementing-a-custom-feature.md @@ -22,7 +22,7 @@ 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. 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..fed71acb2 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