From 17bae143af12eee03585d59ced364ec742167606 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Tue, 19 Jul 2022 16:52:12 -0700 Subject: [PATCH] ign -> gz CMake, Python, Partial Source, and File Migrations : gz-sim (#1589) --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ci/after_make.sh | 2 +- .github/ci/packages.apt | 26 ++++----- .github/workflows/ci.yml | 4 +- .github/workflows/pr-collection-labeler.yml | 2 +- CMakeLists.txt | 22 ++++--- Changelog.md | 2 +- Migration.md | 3 +- api.md.in | 4 +- docker/Dockerfile.nightly | 24 ++++---- docker/README.md | 6 +- .../custom_sensor_system/CMakeLists.txt | 2 +- examples/scripts/python_api/testFixture.py | 6 +- examples/worlds/CMakeLists.txt | 2 +- include/CMakeLists.txt | 2 +- include/gz/sim/CMakeLists.txt | 2 +- include/gz/sim/ServerConfig.hh | 2 +- include/gz/sim/components/CMakeLists.txt | 2 +- include/gz/sim/components/Serialization.hh | 2 +- include/gz/sim/config.hh.in | 12 ++-- include/gz/sim/gui/Gui.hh | 8 +-- python/CMakeLists.txt | 58 +++++++++++++++++-- python/src/gz/sim/EntityComponentManager.hh | 2 +- python/src/gz/sim/EventManager.hh | 2 +- python/src/gz/sim/Server.hh | 2 +- python/src/gz/sim/ServerConfig.hh | 2 +- python/src/gz/sim/TestFixture.hh | 2 +- python/src/gz/sim/UpdateInfo.hh | 2 +- python/src/gz/sim/World.hh | 2 +- python/test/testFixture_TEST.py | 6 +- src/CMakeLists.txt | 2 +- src/Conversions_TEST.cc | 4 +- src/LevelManager.cc | 2 +- src/LevelManager.hh | 6 +- src/ServerConfig.cc | 2 +- src/SimulationRunner.cc | 2 +- src/cmd/CMakeLists.txt | 26 ++++----- src/gui/CMakeLists.txt | 6 +- src/gui/GuiRunner.cc | 2 +- src/gui/plugins/modules/CMakeLists.txt | 3 +- src/gui/plugins/scene3d/Scene3D.hh | 4 +- .../plugins/select_entities/SelectEntities.cc | 6 +- .../transform_control/TransformControl.qml | 6 +- .../VisualizationCapabilities.cc | 10 ++-- src/gz.hh | 4 +- src/network/NetworkManager.hh | 4 +- src/network/NetworkManagerPrimary.cc | 2 +- src/network/PeerTracker.hh | 2 +- src/rendering/CMakeLists.txt | 2 +- src/rendering/RenderUtil.cc | 8 +-- src/rendering/SceneManager.cc | 14 ++--- src/systems/CMakeLists.txt | 2 +- src/systems/air_pressure/AirPressure.cc | 2 +- src/systems/altimeter/Altimeter.cc | 2 +- src/systems/breadcrumbs/Breadcrumbs.cc | 2 +- src/systems/contact/Contact.cc | 5 +- src/systems/force_torque/ForceTorque.cc | 2 +- src/systems/imu/Imu.cc | 4 +- src/systems/log/LogPlayback.cc | 2 +- src/systems/log/LogRecord.cc | 2 +- src/systems/logical_camera/LogicalCamera.cc | 2 +- src/systems/magnetometer/Magnetometer.cc | 2 +- .../MulticopterVelocityControl.hh | 2 +- src/systems/navsat/NavSat.cc | 4 +- .../performer_detector/PerformerDetector.hh | 4 +- src/systems/physics/EntityFeatureMap.hh | 2 +- src/systems/physics/EntityFeatureMap_TEST.cc | 2 +- src/systems/physics/Physics.cc | 22 +++---- .../scene_broadcaster/SceneBroadcaster.hh | 2 +- src/systems/sensors/Sensors.cc | 4 +- src/systems/shader_param/ShaderParam.cc | 2 +- src/systems/thruster/Thruster.hh | 2 +- .../triggered_publisher/TriggeredPublisher.cc | 2 +- src/systems/wind_effects/CMakeLists.txt | 2 +- test/benchmark/CMakeLists.txt | 5 +- .../logical_audio_sensor_plugin.cc | 2 +- test/integration/scene_broadcaster_system.cc | 2 +- test/integration/sdf_frame_semantics.cc | 4 +- test/integration/velocity_control_system.cc | 2 +- test/media/rolling_shapes_log/README.md | 2 +- test/plugins/CMakeLists.txt | 2 +- test/worlds/nested_model.sdf | 2 +- tutorials.md.in | 4 +- tutorials/debugging.md | 4 +- tutorials/install.md | 4 +- tutorials/levels.md | 2 +- tutorials/migrating_ardupilot_plugin.md | 2 +- tutorials/migration_link_api.md | 8 +-- tutorials/migration_model_api.md | 8 +-- tutorials/migration_plugins.md | 4 +- tutorials/migration_world_api.md | 6 +- tutorials/python_interfaces.md | 4 +- 92 files changed, 258 insertions(+), 218 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d889bcf988..9fa3ba7da6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -46,7 +46,7 @@ http://answers.gazebosim.org instead.--> - On Windows, run `dxdiag` and report the GPU-related information. - On Mac OS, open a terminal and type `system_profiler SPDisplaysDataType`. Copy the output here. - - [ ] Please, attach the ogre.log or ogre2.log file from `~/.ignition/rendering` + - [ ] Please, attach the ogre.log or ogre2.log file from `~/.gz/rendering`
diff --git a/.github/ci/after_make.sh b/.github/ci/after_make.sh index 83e5e15be5..2e1e59fce2 100644 --- a/.github/ci/after_make.sh +++ b/.github/ci/after_make.sh @@ -8,7 +8,7 @@ make install export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib # For gz-tools -export GZ_CONFIG_PATH=/usr/local/share/ignition +export GZ_CONFIG_PATH=/usr/local/share/gz # For rendering / window tests Xvfb :1 -screen 0 1280x1024x24 & diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt index e5d09e04b4..dde228131a 100644 --- a/.github/ci/packages.apt +++ b/.github/ci/packages.apt @@ -1,19 +1,19 @@ freeglut3-dev libfreeimage-dev libglew-dev -libignition-cmake3-dev -libignition-common5-dev -libignition-gui7-dev -libignition-fuel-tools8-dev -libignition-math7-eigen3-dev -libignition-msgs9-dev -libignition-physics6-dev -libignition-plugin2-dev -libignition-rendering7-dev -libignition-sensors7-dev -libignition-tools2-dev -libignition-transport12-dev -libignition-utils2-cli-dev +libgz-cmake3-dev +libgz-common5-dev +libgz-gui7-dev +libgz-fuel-tools8-dev +libgz-math7-eigen3-dev +libgz-msgs9-dev +libgz-physics6-dev +libgz-plugin2-dev +libgz-rendering7-dev +libgz-sensors7-dev +libgz-tools2-dev +libgz-transport12-dev +libgz-utils2-cli-dev libogre-1.9-dev libprotobuf-dev libprotoc-dev diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66518cb228..98b07b2ee0 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,7 +24,7 @@ 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 with: # per bug https://github.com/gazebosim/gz-sim/issues/1409 cmake-args: '-DBUILD_DOCS=OFF' diff --git a/.github/workflows/pr-collection-labeler.yml b/.github/workflows/pr-collection-labeler.yml index 7d7b4e179d..38c4fc13bf 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 ef7f677dc0..77e6209e20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,9 +17,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/sim - VERSION_SUFFIX pre1) +gz_configure_project(VERSION_SUFFIX pre1) #============================================================================ # Set project-specific options @@ -177,7 +175,7 @@ set(GZ_UTILS_VER ${gz-utils2_VERSION_MAJOR}) #-------------------------------------- # Find protobuf set(REQ_PROTOBUF_VER 3) -gz_find_package(IgnProtobuf +gz_find_package(GzProtobuf VERSION ${REQ_PROTOBUF_VER} REQUIRED COMPONENTS all @@ -186,10 +184,10 @@ set(Protobuf_IMPORT_DIRS ${gz-msgs9_INCLUDE_DIRS}) #-------------------------------------- # Find python -include(IgnPython) +include(GzPython) find_package(PythonLibs QUIET) if (NOT PYTHONLIBS_FOUND) - IGN_BUILD_WARNING("Python is missing: Python interfaces are disabled.") + GZ_BUILD_WARNING("Python is missing: Python interfaces are disabled.") message (STATUS "Searching for Python - not found.") else() message (STATUS "Searching for Python - found version ${PYTHONLIBS_VERSION_STRING}.") @@ -201,16 +199,16 @@ else() if (${pybind11_FOUND}) message (STATUS "Searching for pybind11 - found version ${pybind11_VERSION}.") else() - IGN_BUILD_WARNING("pybind11 is missing: Python interfaces are disabled.") + GZ_BUILD_WARNING("pybind11 is missing: Python interfaces are disabled.") message (STATUS "Searching for pybind11 - not found.") endif() endif() # Plugin install dirs set(GZ_SIM_PLUGIN_INSTALL_DIR - ${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/gz-${IGN_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins + ${CMAKE_INSTALL_PREFIX}/${GZ_LIB_INSTALL_DIR}/gz-${GZ_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins ) set(GZ_SIM_GUI_PLUGIN_INSTALL_DIR - ${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/gz-${IGN_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins/gui + ${CMAKE_INSTALL_PREFIX}/${GZ_LIB_INSTALL_DIR}/gz-${GZ_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins/gui ) #============================================================================ @@ -260,12 +258,12 @@ if(TARGET doc) file(COPY ${CMAKE_SOURCE_DIR}/tutorials/files/ DESTINATION ${CMAKE_BINARY_DIR}/doxygen/html/files/) endif() -# TICKTOCK MASTER HEADER (to bypass IGN_DESIGNATION) +# TICKTOCK MASTER HEADER (to bypass GZ_DESIGNATION) # TODO(CH3): Deprecated. Remove on tock configure_file( - ${CMAKE_CURRENT_BINARY_DIR}/include/gz/${IGN_DESIGNATION}.hh + ${CMAKE_CURRENT_BINARY_DIR}/include/gz/${GZ_DESIGNATION}.hh ${CMAKE_CURRENT_BINARY_DIR}/include/gz/sim.hh COPYONLY) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/include/gz/sim.hh - DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL}/gz) + DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL}/gz) diff --git a/Changelog.md b/Changelog.md index 738f39a13e..95d87f03b5 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3145,7 +3145,7 @@ 1. Update docker nightly dependencies * [BitBucket pull request 310](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/310) -1. Ign tool +1. Gz tool * [BitBucket pull request 296](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/296) * [BitBucket pull request 336](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/336) diff --git a/Migration.md b/Migration.md index 5262430525..12a3dd6a25 100644 --- a/Migration.md +++ b/Migration.md @@ -44,6 +44,7 @@ release will remove the deprecated code. * `GZ__