Skip to content

Commit 7d98779

Browse files
authored
Merge pull request #1151 from gazebosim/merge_9_main_20250714
Merge 9 -> main
2 parents 1d049ed + 3c1040e commit 7d98779

31 files changed

+614
-143
lines changed

.bazelrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
common --enable_bzlmod
2+
common --lockfile_mode=off
3+
4+
# Add C++17 compiler flags.
5+
build --cxxopt=-std=c++17
6+
build --host_cxxopt=-std=c++17
7+
8+
build --force_pic
9+
build --strip=never
10+
build --strict_system_includes
11+
build --fission=dbg
12+
build --features=per_object_debug_info
13+
14+
# Enable header processing, required for layering checks with parse_header.
15+
build --process_headers_in_dependencies

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.3.1

.github/workflows/bazel.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Bazel CI
2+
on:
3+
push:
4+
branches: [gz-rendering9, main]
5+
pull_request:
6+
branches: [gz-rendering9, main]
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
test:
14+
uses: bazel-contrib/.github/.github/workflows/[email protected]
15+
with:
16+
folders: |
17+
[
18+
".",
19+
]
20+
exclude: |
21+
[
22+
{"folder": ".", "bzlmodEnabled": false},
23+
]

.github/workflows/ci.bazelrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This file contains Bazel settings to apply on CI only.
2+
# It is referenced with a --bazelrc option in the call to bazel in ci.yaml
3+
4+
# Debug where options came from
5+
build --announce_rc
6+
# This directory is configured in GitHub actions to be persisted between runs.
7+
# We do not enable the repository cache to cache downloaded external artifacts
8+
# as these are generally faster to download again than to fetch them from the
9+
# GitHub actions cache.
10+
build --disk_cache=~/.cache/bazel
11+
# Don't rely on test logs being easily accessible from the test runner,
12+
# though it makes the log noisier.
13+
test --test_output=errors
14+
# Allows tests to run bazelisk-in-bazel, since this is the cache folder used
15+
test --test_env=XDG_CACHE_HOME

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ build_*
55
# OS generated files
66
.DS_Store
77
*.swp
8+
9+
# Bazel generated files
10+
bazel-*

BUILD.bazel

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
load("@rules_gazebo//gazebo:headers.bzl", "gz_configure_header", "gz_export_header")
2+
load("@rules_license//rules:license.bzl", "license")
3+
4+
package(
5+
default_applicable_licenses = [":license"],
6+
features = [
7+
"layering_check",
8+
"parse_headers",
9+
],
10+
)
11+
12+
license(
13+
name = "license",
14+
package_name = "gz-rendering",
15+
)
16+
17+
licenses(["notice"])
18+
19+
exports_files([
20+
"package.xml",
21+
"LICENSE",
22+
"MODULE.bazel",
23+
])
24+
25+
gz_configure_header(
26+
name = "Config",
27+
src = "include/gz/rendering/config.hh.in",
28+
package_xml = "package.xml",
29+
)
30+
31+
gz_export_header(
32+
name = "Export",
33+
out = "include/gz/rendering/Export.hh",
34+
export_base = "GZ_RENDERING",
35+
lib_name = "gz-rendering",
36+
)
37+
38+
public_headers_no_gen = glob([
39+
"include/gz/rendering/*.hh",
40+
"include/gz/rendering/base/*.hh",
41+
])
42+
43+
public_headers = public_headers_no_gen + [
44+
"include/gz/rendering/config.hh",
45+
"include/gz/rendering/Export.hh",
46+
]
47+
48+
sources = glob(
49+
[
50+
"src/*.cc",
51+
"src/base/*.cc",
52+
"src/bazel/*.cc",
53+
],
54+
exclude = ["src/*_TEST.cc"],
55+
)
56+
57+
cc_library(
58+
name = "gz-rendering",
59+
srcs = sources,
60+
hdrs = public_headers,
61+
includes = ["include"],
62+
local_defines = [
63+
"GZ_RENDERING_PLUGIN_PATH='\"\"'",
64+
"GZ_RENDERING_RELATIVE_RESOURCE_PATH='\"\"'",
65+
"GZ_RENDERING_ENGINE_RELATIVE_INSTALL_DIR='\"\"'",
66+
],
67+
visibility = ["//visibility:public"],
68+
deps = [
69+
"@gz-common",
70+
"@gz-common//events",
71+
"@gz-common//geospatial",
72+
"@gz-common//graphics",
73+
"@gz-math",
74+
"@gz-plugin//:loader",
75+
"@gz-utils//:ImplPtr",
76+
"@gz-utils//:SuppressWarning",
77+
],
78+
)
79+
80+
test_sources = glob([
81+
"src/*_TEST.cc",
82+
])
83+
84+
[
85+
cc_test(
86+
name = src.replace("/", "_").replace(".cc", "").replace("src_", ""),
87+
srcs = [src],
88+
deps = [
89+
":gz-rendering",
90+
"@googletest//:gtest",
91+
"@googletest//:gtest_main",
92+
"@gz-common//geospatial",
93+
],
94+
)
95+
for src in test_sources
96+
]

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ gz_find_package(GzOGRE VERSION 1.9.0
7272
REQUIRED_BY ogre
7373
PRIVATE_FOR ogre)
7474

75-
# Ogre versions greater than 1.9.x are not officialy supported.
75+
# Ogre versions greater than 1.9.x are not officially supported.
7676
# Display a warning for the users on this setup unless they provide
7777
# USE_UNOFFICIAL_OGRE_VERSIONS flag
7878
if (NOT USE_UNOFFICIAL_OGRE_VERSIONS)
7979
if (OGRE_VERSION VERSION_GREATER_EQUAL 1.10.0)
8080
GZ_BUILD_WARNING("Ogre 1.x versions greater than 1.9 are not officially supported."
81-
"The software might compile and even work but support from upstream"
82-
"could be reduced to accepting patches for newer versions")
81+
"The software might compile and even work but support from upstream"
82+
"could be reduced to accepting patches for newer versions")
8383
endif()
8484
endif()
8585

Changelog.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,39 @@
66

77
### Gazebo Rendering 9.X
88

9+
### Gazebo Rendering 9.2.0 (2025-06-06)
10+
11+
1. Disable a couple of tests on windows
12+
* [Pull request #1126](https://github.com/gazebosim/gz-rendering/pull/1126)
13+
14+
1. Enable bazel build (core only)
15+
* [Pull request #1144](https://github.com/gazebosim/gz-rendering/pull/1144)
16+
17+
1. Hide Ogre and Ogre2 external window on MacOS and Windows
18+
* [Pull request #1141](https://github.com/gazebosim/gz-rendering/pull/1141)
19+
20+
1. Fix clamp of temperature in thermal camera output (#1133)
21+
* [Pull request #1135](https://github.com/gazebosim/gz-rendering/pull/1135)
22+
23+
1. Change to std::get_if for gz::rendering::Variant for throwless behaviour
24+
* [Pull request #1124](https://github.com/gazebosim/gz-rendering/pull/1124)
25+
26+
1. Added missing includes
27+
* [Pull request #1128](https://github.com/gazebosim/gz-rendering/pull/1128)
28+
29+
1. Add sanity check for valid submesh indices
30+
* [Pull request #1123](https://github.com/gazebosim/gz-rendering/pull/1123)
31+
32+
1. Remove unused variable in OgreRenderingEngine.cc
33+
* [Pull request #1119](https://github.com/gazebosim/gz-rendering/pull/1119)
34+
35+
1. Fix spelling issues in documentation
36+
* [Pull request #1114](https://github.com/gazebosim/gz-rendering/pull/1114)
37+
* [Pull request #1115](https://github.com/gazebosim/gz-rendering/pull/1115)
38+
39+
1. Remove ClearMaterialsCache call when a material is destroyed in ogre2
40+
* [Pull request #1110](https://github.com/gazebosim/gz-rendering/pull/1110)
41+
942
### Gazebo Rendering 9.1.0 (2025-01-27)
1043

1144
1. Visualize Frustum

MODULE.bazel

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## MODULE.bazel
2+
module(
3+
name = "gz-rendering",
4+
repo_name = "org_gazebosim_gz-rendering",
5+
)
6+
7+
bazel_dep(name = "googletest", version = "1.15.2")
8+
bazel_dep(name = "rules_license", version = "1.0.0")
9+
10+
# Gazebo Dependencies
11+
bazel_dep(name = "rules_gazebo", version = "0.0.3")
12+
bazel_dep(name = "gz-common")
13+
bazel_dep(name = "gz-math")
14+
bazel_dep(name = "gz-plugin")
15+
bazel_dep(name = "gz-utils")
16+
17+
archive_override(
18+
module_name = "gz-common",
19+
strip_prefix = "gz-common-main",
20+
urls = ["https://github.com/gazebosim/gz-common/archive/refs/heads/main.tar.gz"],
21+
)
22+
23+
archive_override(
24+
module_name = "gz-math",
25+
strip_prefix = "gz-math-main",
26+
urls = ["https://github.com/gazebosim/gz-math/archive/refs/heads/main.tar.gz"],
27+
)
28+
29+
archive_override(
30+
module_name = "gz-plugin",
31+
strip_prefix = "gz-plugin-main",
32+
urls = ["https://github.com/gazebosim/gz-plugin/archive/refs/heads/main.tar.gz"],
33+
)
34+
35+
archive_override(
36+
module_name = "gz-utils",
37+
strip_prefix = "gz-utils-main",
38+
urls = ["https://github.com/gazebosim/gz-utils/archive/refs/heads/main.tar.gz"],
39+
)

examples/lux_core_engine/LuxCoreEngineMeshFactory.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,27 @@ LuxCoreEngineMeshFactory::Create(const MeshDescriptor &_desc,
4444

4545
struct Coordinate
4646
{
47-
float x, y;
47+
float x{}, y{};
4848

4949
Coordinate(float x, float y) : x(x), y(y) {}
50-
Coordinate() {}
50+
Coordinate() = default;
5151
};
5252

5353
struct Vertex
5454
{
55-
float x, y, z;
55+
float x{}, y{}, z{};
5656

5757
Vertex(float x, float y, float z) : x(x), y(y), z(z) {}
58-
Vertex() {}
58+
Vertex() = default;
5959
};
6060

6161
struct VertexTriangle
6262
{
63-
unsigned int v1, v2, v3;
63+
unsigned int v1{}, v2{}, v3{};
6464

6565
VertexTriangle(unsigned int v1, unsigned int v2, unsigned int v3)
6666
: v1(v1), v2(v2), v3(v3) {}
67-
VertexTriangle() {}
67+
VertexTriangle() = default;
6868
};
6969

7070
if (_desc.meshName == "unit_box")

0 commit comments

Comments
 (0)