Skip to content

Commit

Permalink
Partial cmake and source migrations
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <[email protected]>
  • Loading branch information
methylDragon committed Jul 12, 2022
1 parent 9d24893 commit a4d9731
Show file tree
Hide file tree
Showing 88 changed files with 252 additions and 233 deletions.
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 }}
20 changes: 10 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

gz_configure_project(
REPLACE_IGNITION_INCLUDE_PATH gz/sim
REPLACE_INCLUDE_PATH gz/sim
VERSION_SUFFIX pre1)

#============================================================================
Expand Down Expand Up @@ -177,7 +177,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 +186,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 +201,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 +260,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)
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
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.gazebo 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 examples/worlds/lift_drag.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--
Gazebo lift-drag system demo
This file was adapted from osrf/gazebo/worlds/single_rotor_demo.world
This file was adapted from osrf/sim/worlds/single_rotor_demo.world
Try sending commands:
Expand Down
2 changes: 1 addition & 1 deletion examples/worlds/lift_drag_battery.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--
Gazebo lift-drag system with a battery plugin demo
This file was adapted from osrf/gazebo/worlds/single_rotor_demo.world
This file was adapted from osrf/sim/worlds/single_rotor_demo.world
Try sending commands:
Expand Down
2 changes: 1 addition & 1 deletion examples/worlds/lift_drag_nested.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This is the same example as lift_drag.sdf but modified to show that links in
nested models can be references in the link_name parameter.
This file was adapted from osrf/gazebo/worlds/single_rotor_demo.world
This file was adapted from osrf/sim/worlds/single_rotor_demo.world
Try sending commands:
Expand Down
4 changes: 2 additions & 2 deletions examples/worlds/multicopter_velocity_control.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ You can use the velocity controller and command linear velocity and yaw angular
Send commands to the quadcopter to go straight up:
gz 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}"
To hover
gz topic -t "/X3/gazebo/command/twist" -m gz.msgs.Twist -p " "
gz topic -t "/X3/sim/command/twist" -m gz.msgs.Twist -p " "
Listen to odometry:
Expand Down
2 changes: 1 addition & 1 deletion examples/worlds/plane_propeller_demo.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--
Gazebo lift-drag system demo
This file was adapted from osrf/gazebo/worlds/propeller_plane_demo.world
This file was adapted from osrf/sim/worlds/propeller_plane_demo.world
Try sending commands:
Expand Down
4 changes: 2 additions & 2 deletions examples/worlds/quadcopter.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
Send commands to go straight up:
gz topic -t /X3/gazebo/command/motor_speed --msgtype gz.msgs.Actuators -p 'velocity:[700, 700, 700, 700]'
gz topic -t /X3/sim/command/motor_speed --msgtype gz.msgs.Actuators -p 'velocity:[700, 700, 700, 700]'
And to turn off propellers:
gz topic -t /X3/gazebo/command/motor_speed --msgtype gz.msgs.Actuators -p 'velocity:[0, 0, 0, 0]'
gz topic -t /X3/sim/command/motor_speed --msgtype gz.msgs.Actuators -p 'velocity:[0, 0, 0, 0]'
-->
<sdf version="1.6">
Expand Down
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})
6 changes: 3 additions & 3 deletions include/gz/sim/Server.hh
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ namespace gz
/// 1. `/world/<world_name>/scene/info(none)` : gz::msgs::Scene
/// + Returns the current scene information.
///
/// 2. `/gazebo/resource_paths/get` : gz::msgs::StringMsg_V
/// 2. `/sim/resource_paths/get` : gz::msgs::StringMsg_V
/// + Get list of resource paths.
///
/// 3. `/gazebo/resource_paths/add` : gz::msgs::Empty
/// 3. `/sim/resource_paths/add` : gz::msgs::Empty
/// + Add new resource paths.
///
/// 4. `/server_control`(gz::msgs::ServerControl) :
Expand All @@ -106,7 +106,7 @@ namespace gz
/// 2. `/world/<world_name>/stats` : gz::msgs::WorldStatistics
/// + This topic is throttled to 5Hz.
///
/// 3. `/gazebo/resource_paths` : gz::msgs::StringMsg_V
/// 3. `/sim/resource_paths` : gz::msgs::StringMsg_V
/// + Updated list of resource paths.
///
class GZ_SIM_VISIBLE Server
Expand Down
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
)
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

0 comments on commit a4d9731

Please sign in to comment.