Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ign -> gz CMake, Python, Partial Source, and File Migrations : gz-sim #1589

Merged
merged 2 commits into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 note that GUI rendering is not supported on macOS. -->
- [ ] Please, attach the ogre.log or ogre2.log file from `~/.ignition/rendering` <!-- Choose the relevant version based on what you checked in the "Rendering plugin" question. -->
- [ ] Please, attach the ogre.log or ogre2.log file from `~/.gz/rendering` <!-- Choose the relevant version based on what you checked in the "Rendering plugin" question. -->

<details>

Expand Down
2 changes: 1 addition & 1 deletion .github/ci/after_make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &
Expand Down
26 changes: 13 additions & 13 deletions .github/ci/packages.apt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
2 changes: 1 addition & 1 deletion .github/workflows/pr-collection-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
22 changes: 10 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand 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}.")
Expand All @@ -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
)

#============================================================================
Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 2 additions & 1 deletion Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ release will remove the deprecated code.
* `GZ_<PROJECT>_<VISIBLE/HIDDEN>`
* CMake `-config` files
* Paths that depend on the project name
* Python library `ignition` namespaces should be replaced with `gz`.

## Gazebo Sim 6.1 to 6.2

Expand Down Expand Up @@ -225,4 +226,4 @@ added an SDF message to the start of log files.
ignition-gazebo. To use the gui component downstream, update the find package
call in cmake to request for the component, e.g.
`gz_find_package(ignition-gazebo1 REQUIRED COMPONENTS gui)`, and link to the
`libignition-gazebo1::gui` target instead of `libignition-gazebo1-gui`
`libgz-sim1::gui` target instead of `libgz-sim1-gui`
4 changes: 2 additions & 2 deletions api.md.in
Original file line number Diff line number Diff line change
@@ -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.

**Useful links**
Expand Down
24 changes: 12 additions & 12 deletions docker/Dockerfile.nightly
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ RUN scripts/enable_nightly.sh

RUN apt-get update \
&& apt-get install -y \
libignition-cmake3-dev \
libignition-common5-dev \
libignition-fuel-tools8-dev \
libignition-math7-eigen3-dev \
libignition-plugin2-dev \
libignition-physics6-dev \
libignition-rendering7-dev \
libignition-tools2-dev \
libignition-transport12-dev \
libignition-gui7-dev \
libignition-msgs9-dev \
libignition-sensors7-dev \
libgz-cmake3-dev \
libgz-common5-dev \
libgz-fuel-tools8-dev \
libgz-math7-eigen3-dev \
libgz-plugin2-dev \
libgz-physics6-dev \
libgz-rendering7-dev \
libgz-tools2-dev \
libgz-transport12-dev \
libgz-gui7-dev \
libgz-msgs9-dev \
libgz-sensors7-dev \
libsdformat13-dev

COPY . gz-sim
Expand Down
6 changes: 3 additions & 3 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,21 @@ distribution using debians.
image of Gazebo Fortress:

```
./build.bash ignition-garden ./Dockerfile.gz
./build.bash gz-garden ./Dockerfile.gz
```

2. Run the docker image using `run.bash`, and pass in the name of the docker
image (first argument to the build.bash script).

```
./run.bash ignition-garden
./run.bash gz-garden
```

3. You can pass arguments to Gazebo by appending them the
`run.bash` command. For example, to load the shapes.sdf file:

```
./run.bash ignition-garden -f shapes.sdf
./run.bash gz-garden -f shapes.sdf
```

## Appendix
Expand Down
2 changes: 1 addition & 1 deletion examples/plugin/custom_sensor_system/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set(GZ_SIM_VER ${gz-sim7_VERSION_MAJOR})
find_package(gz-sensors7 REQUIRED)
set(GZ_SENSORS_VER ${gz-sensors7_VERSION_MAJOR})

# Fetch the custom sensor example from ign-sensors
# Fetch the custom sensor example from gz-sensors
# Users won't commonly use this to fetch their sensors. The sensor may be part
# of the system's CMake project, or installed from another project, etc...
include(FetchContent)
Expand Down
6 changes: 3 additions & 3 deletions examples/scripts/python_api/testFixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

import os

from ignition.common import set_verbosity
from ignition.gazebo import TestFixture, World, world_entity
from ignition.math import Vector3d
from gz.common import set_verbosity
from gz.sim import TestFixture, World, world_entity
from gz.math import Vector3d

set_verbosity(4)

Expand Down
2 changes: 1 addition & 1 deletion examples/worlds/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
file(GLOB files "*.sdf")
install(FILES ${files}
DESTINATION ${IGN_DATA_INSTALL_DIR}/worlds)
DESTINATION ${GZ_DATA_INSTALL_DIR}/worlds)
2 changes: 1 addition & 1 deletion include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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})
2 changes: 1 addition & 1 deletion include/gz/sim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ gz_install_all_headers()

add_subdirectory(components)

install (FILES server.config playback_server.config DESTINATION ${IGN_DATA_INSTALL_DIR})
install (FILES server.config playback_server.config DESTINATION ${GZ_DATA_INSTALL_DIR})
2 changes: 1 addition & 1 deletion include/gz/sim/ServerConfig.hh
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ namespace gz
/// * If GZ_SIM_SERVER_CONFIG_PATH is set but empty, no plugins
/// are loaded.
/// 2. File at ${GZ_HOMEDIR}/.gz/sim/server.config
/// 3. File at ${IGN_DATA_INSTALL_DIR}/server.config
/// 3. File at ${GZ_DATA_INSTALL_DIR}/server.config
///
/// If any of the above files exist but are empty, resolution
/// stops and the plugin list will be empty.
Expand Down
2 changes: 1 addition & 1 deletion include/gz/sim/components/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ configure_file(

install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/components.hh
DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL}/gz/sim
DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL}/gz/sim
)
2 changes: 1 addition & 1 deletion include/gz/sim/components/Serialization.hh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace sim
inline namespace GZ_SIM_VERSION_NAMESPACE {
namespace traits
{
/// \brief Type trait that determines if an gz::sim::convert from In
/// \brief Type trait that determines if a gz::sim::convert from In
/// to Out is defined.
/// Usage:
/// \code
Expand Down
12 changes: 6 additions & 6 deletions include/gz/sim/config.hh.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@

#define GZ_SIM_VERSION_HEADER "Gazebo Sim, version ${PROJECT_VERSION_FULL}\nCopyright (C) 2018 Open Source Robotics Foundation.\nReleased under the Apache 2.0 License.\n\n"

#define GZ_SIM_GUI_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/${IGN_DATA_INSTALL_DIR}/gui"
#define GZ_SIM_SYSTEM_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/${IGN_DATA_INSTALL_DIR}/systems"
#define GZ_SIM_SERVER_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/${IGN_DATA_INSTALL_DIR}"
#define GZ_SIM_PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/gz-${IGN_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins"
#define GZ_SIM_GUI_PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/gz-${IGN_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins/gui"
#define GZ_SIM_WORLD_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${IGN_DATA_INSTALL_DIR}/worlds"
#define GZ_SIM_GUI_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/${GZ_DATA_INSTALL_DIR}/gui"
#define GZ_SIM_SYSTEM_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/${GZ_DATA_INSTALL_DIR}/systems"
#define GZ_SIM_SERVER_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/${GZ_DATA_INSTALL_DIR}"
#define GZ_SIM_PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${GZ_LIB_INSTALL_DIR}/gz-${GZ_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins"
#define GZ_SIM_GUI_PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${GZ_LIB_INSTALL_DIR}/gz-${GZ_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins/gui"
#define GZ_SIM_WORLD_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${GZ_DATA_INSTALL_DIR}/worlds"

#endif
8 changes: 4 additions & 4 deletions include/gz/sim/gui/Gui.hh
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ namespace gui
{
/// \brief Run GUI application
/// \param[in] _argc Number of command line arguments (Used when running
/// without ign-tools. Set to 1 if using ign-tools). Note: The object
/// without gz-tools. Set to 1 if using gz-tools). Note: The object
/// referenced by this variable must continue to exist for the lifetime of the
/// application.
/// \param[in] _argv Command line arguments (Used when running without
/// ign-tools. Set to the name of the application if using ign-tools)
/// gz-tools. Set to the name of the application if using gz-tools)
/// \param[in] _guiConfig The GUI configuration file. If nullptr, the default
/// configuration from GZ_HOMEDIR/.gz/sim/gui.config will be used.
/// \param[in] _renderEngineGui --render-engine-gui option
Expand All @@ -48,11 +48,11 @@ namespace gui

/// \brief Create a Gazebo GUI application
/// \param[in] _argc Number of command line arguments (Used when running
/// without ign-tools. Set to 1 if using ign-tools). Note: The object
/// without gz-tools. Set to 1 if using gz-tools). Note: The object
/// referenced by this variable must continue to exist for the lifetime of the
/// application.
/// \param[in] _argv Command line arguments (Used when running without
/// ign-tools. Set to the name of the application if using ign-tools)
/// gz-tools. Set to the name of the application if using gz-tools)
/// \param[in] _guiConfig The GUI configuration file. If nullptr, the default
/// configuration from GZ_HOMEDIR/.gz/sim/gui.config will be used.
/// \param[in] _defaultGuiConfig The default GUI configuration file. If no
Expand Down
Loading