Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/arjo/examples/rl_ex…
Browse files Browse the repository at this point in the history
…ample' into arjo/examples/rl_example
  • Loading branch information
arjo129 committed Feb 7, 2025
2 parents 5117071 + 120c1ec commit e602467
Show file tree
Hide file tree
Showing 54 changed files with 154 additions and 239 deletions.
2 changes: 1 addition & 1 deletion .github/ci/packages.apt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ libglew-dev
libgz-cmake4-dev
libgz-common6-dev
libgz-fuel-tools10-dev
libgz-gui9-dev
libgz-gui10-dev
libgz-math8-eigen3-dev
libgz-msgs11-dev
libgz-physics8-dev
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,6 @@ concurrency:
cancel-in-progress: true

jobs:
jammy-ci:
runs-on: ubuntu-latest
name: Ubuntu Jammy CI
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
with:
extra_args: --all-files
- name: Compile and test
id: ci
uses: gazebo-tooling/action-gz-ci@jammy
with:
# per bug https://github.com/gazebosim/gz-sim/issues/1409
cmake-args: '-DCMAKE_INSTALL_PREFIX=/usr -DBUILD_DOCS=OFF'
codecov-enabled: true
cppcheck-enabled: true
cpplint-enabled: true
noble-ci:
runs-on: ubuntu-latest
name: Ubuntu Noble CI
Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
#============================================================================
# Initialize the project
#============================================================================
project(gz-sim9 VERSION 9.0.0)
project(gz-sim10 VERSION 10.0.0)
set (GZ_DISTRIBUTION "Ionic")

#============================================================================
Expand All @@ -18,7 +18,7 @@ find_package(gz-cmake4 REQUIRED)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

gz_configure_project(VERSION_SUFFIX)
gz_configure_project(VERSION_SUFFIX pre1)

#============================================================================
# Set project-specific options
Expand Down Expand Up @@ -113,8 +113,8 @@ set(GZ_FUEL_TOOLS_VER ${gz-fuel_tools10_VERSION_MAJOR})

#--------------------------------------
# Find gz-gui
gz_find_package(gz-gui9 REQUIRED)
set(GZ_GUI_VER ${gz-gui9_VERSION_MAJOR})
gz_find_package(gz-gui10 REQUIRED)
set(GZ_GUI_VER ${gz-gui10_VERSION_MAJOR})
gz_find_package (Qt5
COMPONENTS
Core
Expand Down
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Gazebo Sim 10.x

### Gazebo Sim 10.0.0 (20XX-XX-XX)

## Gazebo Sim 9.x

### Gazebo Sim 9.0.0 (2024-09-25)
Expand Down
31 changes: 31 additions & 0 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,37 @@ Deprecated code produces compile-time warnings. These warning serve as
notification to users that their code should be upgraded. The next major
release will remove the deprecated code.

## Gazebo Sim 9.x to 10.0

### Removals

- **config.hh**:
+ The macro `GZ_SIM_GUI_CONFIG_PATH` has been removed.
Please use `gz::sim::getGUIConfigPath()` instead.

+ The macro `GZ_SIM_SYSTEM_CONFIG_PATH` has been removed.
Please use `gz::sim::getSystemConfigPath()` instead.

+ The macro `GZ_SIM_SERVER_CONFIG_PATH` has been removed.
Please use `gz::sim::getServerConfigPath()` instead.

+ The macro `GZ_SIM_PLUGIN_INSTALL_DIR` has been removed.
Please use `gz::sim::getPluginInstallDir()` instead.

+ The macro `GZ_SIM_GUI_PLUGIN_INSTALL_DIR` has been removed.
Please use `gz::sim::getGUIPluginInstallDir()` instead.

+ The macro `GZ_SIM_WORLD_INSTALL_DIR` has been removed.
Please use `gz::sim::getWorldInstallDir()` instead.

**components/Factory.hh**:
+ `gz::sim::components::Factory::Register(const std::string &_type, ComponentDescriptorBase *_compDesc)` and
`gz::sim::components::Factory::Register(const std::string &_type, ComponentDescriptorBase *_compDesc, RegistrationObjectId _regObjId)`
have been removed. Instead, please use
`gz::sim::components::Factory::Register(const char *_type, ComponentDescriptorBase *_compDesc, RegistrationObjectId _regObjId)`
+ `gz::sim::components::Factory::Unregister()` has been removed. Instead, please use
`gz::sim::components::Factory::Unregister(RegistrationObjectId _regObjId)`.

## Gazebo Sim 8.x to 9.0

* **Modified**:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

Build | Status
-- | --
Test coverage | [![codecov](https://codecov.io/gh/gazebosim/gz-sim/tree/gz-sim9/graph/badge.svg)](https://codecov.io/gh/gazebosim/gz-sim/tree/gz-sim9)
Ubuntu Noble | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=gz_sim-ci-gz-sim9-noble-amd64)](https://build.osrfoundation.org/job/gz_sim-ci-gz-sim9-noble-amd64)
Homebrew | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=gz_sim-ci-gz-sim9-homebrew-amd64)](https://build.osrfoundation.org/job/gz_sim-ci-gz-sim9-homebrew-amd64)
Windows | [![Build Status](https://build.osrfoundation.org/job/gz_sim-9-win/badge/icon)](https://build.osrfoundation.org/job/gz_sim-9-win/)
Test coverage | [![codecov](https://codecov.io/gh/gazebosim/gz-sim/tree/main/graph/badge.svg)](https://codecov.io/gh/gazebosim/gz-sim/tree/main)
Ubuntu Noble | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=gz_sim-ci-main-noble-amd64)](https://build.osrfoundation.org/job/gz_sim-ci-main-noble-amd64)
Homebrew | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=gz_sim-ci-main-homebrew-amd64)](https://build.osrfoundation.org/job/gz_sim-ci-main-homebrew-amd64)
Windows | [![Build Status](https://build.osrfoundation.org/job/gz_sim-main-win/badge/icon)](https://build.osrfoundation.org/job/gz_sim-main-win/)

Gazebo Sim is an open source robotics simulator. Through Gazebo Sim, users have access to high fidelity physics, rendering, and sensor models. Additionally, users and developers have multiple points of entry to simulation including a graphical user interface, plugins, and asynchronous message passing and services.

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.nightly
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN apt-get update \
libgz-rendering9-dev \
libgz-tools2-dev \
libgz-transport14-dev \
libgz-gui9-dev \
libgz-gui10-dev \
libgz-msgs11-dev \
libgz-sensors9-dev \
libsdformat15-dev
Expand Down
4 changes: 2 additions & 2 deletions examples/plugin/command_actor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ project(CommandActor)
find_package(gz-plugin3 REQUIRED COMPONENTS register)
set(GZ_PLUGIN_VER ${gz-plugin3_VERSION_MAJOR})

find_package(gz-sim9 REQUIRED)
find_package(gz-sim10 REQUIRED)
add_library(CommandActor SHARED CommandActor.cc)
set_property(TARGET CommandActor PROPERTY CXX_STANDARD 17)
target_link_libraries(CommandActor
PRIVATE gz-plugin${GZ_PLUGIN_VER}::gz-plugin${GZ_PLUGIN_VER}
PRIVATE gz-sim9::gz-sim9)
PRIVATE gz-sim10::gz-sim10)
4 changes: 2 additions & 2 deletions examples/plugin/custom_component/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ project(CustomComponentPlugin)
find_package(gz-plugin3 REQUIRED COMPONENTS register)
set(GZ_PLUGIN_VER ${gz-plugin3_VERSION_MAJOR})

find_package(gz-sim9 REQUIRED)
find_package(gz-sim10 REQUIRED)
add_library(CustomComponentPlugin SHARED
CustomComponentPlugin.cc
)
set_property(TARGET CustomComponentPlugin PROPERTY CXX_STANDARD 17)
target_link_libraries(CustomComponentPlugin
PRIVATE gz-plugin${GZ_PLUGIN_VER}::gz-plugin${GZ_PLUGIN_VER}
PRIVATE gz-sim9::gz-sim9)
PRIVATE gz-sim10::gz-sim10)
6 changes: 3 additions & 3 deletions examples/plugin/custom_sensor_system/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ project(OdometerSystem)
gz_find_package(gz-plugin3 REQUIRED COMPONENTS register)
set(GZ_PLUGIN_VER ${gz-plugin3_VERSION_MAJOR})

gz_find_package(gz-sim9 REQUIRED)
set(GZ_SIM_VER ${gz-sim9_VERSION_MAJOR})
gz_find_package(gz-sim10 REQUIRED)
set(GZ_SIM_VER ${gz-sim10_VERSION_MAJOR})

find_package(gz-sensors9 REQUIRED)
set(GZ_SENSORS_VER ${gz-sensors9_VERSION_MAJOR})
Expand All @@ -20,7 +20,7 @@ include(FetchContent)
FetchContent_Declare(
sensors_clone
GIT_REPOSITORY https://github.com/gazebosim/gz-sensors
GIT_TAG main
GIT_TAG gz-sensors${GZ_SENSORS_VER}
)
FetchContent_Populate(sensors_clone)
add_subdirectory(${sensors_clone_SOURCE_DIR}/examples/custom_sensor ${sensors_clone_BINARY_DIR})
Expand Down
4 changes: 2 additions & 2 deletions examples/plugin/gui_system_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project(GuiSystemPlugin)

set(CMAKE_AUTOMOC ON)

find_package(gz-sim9 REQUIRED COMPONENTS gui)
find_package(gz-sim10 REQUIRED COMPONENTS gui)

QT5_ADD_RESOURCES(resources_RCC ${PROJECT_NAME}.qrc)

Expand All @@ -17,5 +17,5 @@ add_library(${PROJECT_NAME} SHARED
${resources_RCC}
)
target_link_libraries(${PROJECT_NAME}
PRIVATE gz-sim9::gui
PRIVATE gz-sim10::gui
)
4 changes: 2 additions & 2 deletions examples/plugin/hello_world/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ project(Hello_world)
gz_find_package(gz-plugin3 REQUIRED COMPONENTS register)
set(GZ_PLUGIN_VER ${gz-plugin3_VERSION_MAJOR})

gz_find_package(gz-sim9 REQUIRED)
set(GZ_SIM_VER ${gz-sim9_VERSION_MAJOR})
gz_find_package(gz-sim10 REQUIRED)
set(GZ_SIM_VER ${gz-sim10_VERSION_MAJOR})

add_library(HelloWorld SHARED HelloWorld.cc)
set_property(TARGET HelloWorld PROPERTY CXX_STANDARD 17)
Expand Down
4 changes: 2 additions & 2 deletions examples/plugin/priority_printer_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ project(Priority_printer)
gz_find_package(gz-plugin3 REQUIRED COMPONENTS register)
set(GZ_PLUGIN_VER ${gz-plugin3_VERSION_MAJOR})

gz_find_package(gz-sim9 REQUIRED)
set(GZ_SIM_VER ${gz-sim9_VERSION_MAJOR})
gz_find_package(gz-sim10 REQUIRED)
set(GZ_SIM_VER ${gz-sim10_VERSION_MAJOR})

add_library(PriorityPrinter SHARED PriorityPrinter.cc)
set_property(TARGET PriorityPrinter PROPERTY CXX_STANDARD 17)
Expand Down
8 changes: 4 additions & 4 deletions examples/plugin/rendering_plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set(GUI_PLUGIN RenderingGuiPlugin)

set(CMAKE_AUTOMOC ON)

find_package(gz-gui9 REQUIRED)
find_package(gz-gui10 REQUIRED)

QT5_ADD_RESOURCES(resources_RCC ${GUI_PLUGIN}.qrc)

Expand All @@ -24,21 +24,21 @@ add_library(${GUI_PLUGIN} SHARED
)
target_link_libraries(${GUI_PLUGIN}
PRIVATE
gz-gui9::gz-gui9
gz-gui10::gz-gui10
gz-rendering9::gz-rendering9
)

# Server plugin
set(SERVER_PLUGIN RenderingServerPlugin)

find_package(gz-plugin3 REQUIRED COMPONENTS register)
find_package(gz-sim9 REQUIRED)
find_package(gz-sim10 REQUIRED)

add_library(${SERVER_PLUGIN} SHARED ${SERVER_PLUGIN}.cc)
set_property(TARGET ${SERVER_PLUGIN} PROPERTY CXX_STANDARD 17)
target_link_libraries(${SERVER_PLUGIN}
PRIVATE
gz-plugin3::gz-plugin3
gz-sim9::gz-sim9
gz-sim10::gz-sim10
gz-rendering9::gz-rendering9
)
4 changes: 2 additions & 2 deletions examples/plugin/reset_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ project(ResetPlugins)
find_package(gz-plugin3 REQUIRED COMPONENTS register)
set(GZ_PLUGIN_VER ${gz-plugin3_VERSION_MAJOR})

find_package(gz-sim9 REQUIRED)
set(GZ_SIM_VER ${gz-sim9_VERSION_MAJOR})
find_package(gz-sim10 REQUIRED)
set(GZ_SIM_VER ${gz-sim10_VERSION_MAJOR})

add_library(JointPositionRandomizer SHARED JointPositionRandomizer.cc)
target_link_libraries(JointPositionRandomizer
Expand Down
4 changes: 2 additions & 2 deletions examples/plugin/system_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ project(SampleSystem)
find_package(gz-plugin3 REQUIRED COMPONENTS register)
set(GZ_PLUGIN_VER ${gz-plugin3_VERSION_MAJOR})

find_package(gz-sim9 REQUIRED)
find_package(gz-sim10 REQUIRED)
add_library(SampleSystem SHARED SampleSystem.cc SampleSystem2.cc)
set_property(TARGET SampleSystem PROPERTY CXX_STANDARD 17)
target_link_libraries(SampleSystem
PRIVATE gz-plugin${GZ_PLUGIN_VER}::gz-plugin${GZ_PLUGIN_VER}
PRIVATE gz-sim9::gz-sim9)
PRIVATE gz-sim10::gz-sim10)
2 changes: 1 addition & 1 deletion examples/scripts/python_api/systems/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

from gz.math8 import Vector3d
from gz.sim9 import Model, Link
from gz.sim10 import Model, Link
import random


Expand Down
2 changes: 1 addition & 1 deletion examples/scripts/python_api/testFixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import os

from gz.common6 import set_verbosity
from gz.sim9 import TestFixture, World, world_entity
from gz.sim10 import TestFixture, World, world_entity
from gz.math8 import Vector3d

set_verbosity(4)
Expand Down
4 changes: 2 additions & 2 deletions examples/standalone/acoustic_comms_demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ project(gz-sim-acoustic-comms-demo)
find_package(gz-transport14 QUIET REQUIRED OPTIONAL_COMPONENTS log)
set(GZ_TRANSPORT_VER ${gz-transport14_VERSION_MAJOR})

find_package(gz-sim9 REQUIRED)
set(GZ_SIM_VER ${gz-sim9_VERSION_MAJOR})
find_package(gz-sim10 REQUIRED)
set(GZ_SIM_VER ${gz-sim10_VERSION_MAJOR})

add_executable(acoustic_comms_demo acoustic_comms_demo.cc)
target_link_libraries(acoustic_comms_demo
Expand Down
4 changes: 2 additions & 2 deletions examples/standalone/custom_server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
project(gz-sim-custom-server)

if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
find_package(gz-sim9 REQUIRED)
set(GZ_SIM_VER ${gz-sim9_VERSION_MAJOR})
find_package(gz-sim10 REQUIRED)
set(GZ_SIM_VER ${gz-sim10_VERSION_MAJOR})

add_executable(custom_server custom_server.cc)
target_link_libraries(custom_server
Expand Down
4 changes: 2 additions & 2 deletions examples/standalone/each_performance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)

project(gz-sim-each-performance)

find_package(gz-sim9 QUIET REQUIRED)
find_package(gz-sim10 QUIET REQUIRED)

add_executable(each each.cc)
target_link_libraries(each
gz-sim9::core)
gz-sim10::core)
4 changes: 2 additions & 2 deletions examples/standalone/external_ecm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)

project(gz-sim-external-ecm)

find_package(gz-sim9 REQUIRED)
find_package(gz-sim10 REQUIRED)

add_executable(external_ecm external_ecm.cc)
target_link_libraries(external_ecm
gz-sim9::core)
gz-sim10::core)
4 changes: 2 additions & 2 deletions examples/standalone/gtest_setup/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
project(GTestSetup)

# Find Gazebo
find_package(gz-sim9 REQUIRED)
set(GZ_SIM_VER ${gz-sim9_VERSION_MAJOR})
find_package(gz-sim10 REQUIRED)
set(GZ_SIM_VER ${gz-sim10_VERSION_MAJOR})

# Fetch and configure GTest
include(FetchContent)
Expand Down
4 changes: 2 additions & 2 deletions examples/standalone/light_control/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ project(gz-sim-light-control)
find_package(gz-transport14 QUIET REQUIRED OPTIONAL_COMPONENTS log)
set(GZ_TRANSPORT_VER ${gz-transport14_VERSION_MAJOR})

find_package(gz-sim9 REQUIRED)
set(GZ_SIM_VER ${gz-sim9_VERSION_MAJOR})
find_package(gz-sim10 REQUIRED)
set(GZ_SIM_VER ${gz-sim10_VERSION_MAJOR})

add_executable(light_control light_control.cc)
target_link_libraries(light_control
Expand Down
4 changes: 2 additions & 2 deletions examples/standalone/lrauv_control/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ project(gz-sim-lrauv-control)
find_package(gz-transport14 QUIET REQUIRED OPTIONAL_COMPONENTS log)
set(GZ_TRANSPORT_VER ${gz-transport14_VERSION_MAJOR})

find_package(gz-sim9 REQUIRED)
set(GZ_SIM_VER ${gz-sim9_VERSION_MAJOR})
find_package(gz-sim10 REQUIRED)
set(GZ_SIM_VER ${gz-sim10_VERSION_MAJOR})

add_executable(lrauv_control lrauv_control.cc)
target_link_libraries(lrauv_control
Expand Down
4 changes: 2 additions & 2 deletions examples/standalone/multi_lrauv_race/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ project(gz-sim-multi-lrauv-race)
find_package(gz-transport14 QUIET REQUIRED OPTIONAL_COMPONENTS log)
set(GZ_TRANSPORT_VER ${gz-transport14_VERSION_MAJOR})

find_package(gz-sim9 REQUIRED)
set(GZ_SIM_VER ${gz-sim9_VERSION_MAJOR})
find_package(gz-sim10 REQUIRED)
set(GZ_SIM_VER ${gz-sim10_VERSION_MAJOR})

add_executable(multi_lrauv_race multi_lrauv_race.cc)
target_link_libraries(multi_lrauv_race
Expand Down
4 changes: 4 additions & 0 deletions include/gz/sim/Server.hh
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,10 @@ namespace gz

/// \brief Reset all runners in this simulation
public: void ResetAll();
/// \brief Reset a specific runner in this server
/// \param[in] runnerId - The runner which you want to reset
/// \ return False if the runner does not exist, true otherwise.
public: bool Reset(const std::size_t _runnerId);

/// \brief Private data
private: std::unique_ptr<ServerPrivate> dataPtr;
Expand Down
Loading

0 comments on commit e602467

Please sign in to comment.