Skip to content

Commit

Permalink
Merge from gz-rendering8
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed May 30, 2024
2 parents e986a34 + f3d3073 commit 4f60007
Show file tree
Hide file tree
Showing 42 changed files with 552 additions and 107 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/package_xml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Validate package.xml

on:
pull_request:

jobs:
package-xml:
runs-on: ubuntu-latest
name: Validate package.xml
steps:
- uses: gazebo-tooling/action-gz-ci/validate_package_xml@jammy
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ set(GZ_RENDERING_ENGINE_INSTALL_DIR
if(NOT MSVC)
#--------------------------------------
# Find CUDA
# Module is being removed in CMake and needs a non trivial
# migration https://cmake.org/cmake/help/latest/policy/CMP0146.html
if(POLICY CMP0146)
cmake_policy(SET CMP0146 OLD)
endif()
find_package(CUDA)

#--------------------------------------
Expand Down
67 changes: 67 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,73 @@

### Gazebo Rendering 8.X

### Gazebo Rendering 8.1.1 (2024-04-10)

1. Use relative install paths for plugin shared libraries and media files
* [Pull request #984](https://github.com/gazebosim/gz-rendering/pull/984)

1. Handle null mesh pointers in examples
* [Pull request #982](https://github.com/gazebosim/gz-rendering/pull/982)

### Gazebo Rendering 8.1.0 (2024-03-14)

1. Fix setting normal map when not all submeshes have texcoords (ogre2)
* [Pull request #976](https://github.com/gazebosim/gz-rendering/pull/976)

1. Update ogre2 symbol visibility macro in private classes
* [Pull request #972](https://github.com/gazebosim/gz-rendering/pull/972)

1. Improve Ogre2DepthCamera performance
* [Pull request #971](https://github.com/gazebosim/gz-rendering/pull/971)
* [Pull request #965](https://github.com/gazebosim/gz-rendering/pull/965)

1. Fix repeatedly loading engine when calling sceneFromFirstEngine
* [Pull request #961](https://github.com/gazebosim/gz-rendering/pull/961)

1. Improve Ogre2GpuRays performance
* [Pull request #955](https://github.com/gazebosim/gz-rendering/pull/955)
* [Pull request #973](https://github.com/gazebosim/gz-rendering/pull/973)

1. Correctly set position-independent code
* [Pull request #950](https://github.com/gazebosim/gz-rendering/pull/950)

1. Remove todo in gpu ray test
* [Pull request #949](https://github.com/gazebosim/gz-rendering/pull/949)

1. Update CI badges to point to release branch job
* [Pull request #948](https://github.com/gazebosim/gz-rendering/pull/948)
* [Pull request #947](https://github.com/gazebosim/gz-rendering/pull/947)

1. Set projector emissive texture
* [Pull request #946](https://github.com/gazebosim/gz-rendering/pull/946)

1. Add minor comments to BaseGizmoVisual
* [Pull request #881](https://github.com/gazebosim/gz-rendering/pull/881)

1. Update examples to use metal as default graphics API on mac
* [Pull request #937](https://github.com/gazebosim/gz-rendering/pull/937)

1. Extend ogre 1.x custom shaders support
* [Pull request #908](https://github.com/gazebosim/gz-rendering/pull/908)

1. Support skybox in wide angle cam view
* [Pull request #901](https://github.com/gazebosim/gz-rendering/pull/901)

1. Minor fix for projector visibility flags
* [Pull request #920](https://github.com/gazebosim/gz-rendering/pull/920)

1. Fix use of srgb format for texture map data
* [Pull request #931](https://github.com/gazebosim/gz-rendering/pull/931)

1. Infrastructure
* [Pull request #925](https://github.com/gazebosim/gz-rendering/pull/925)
* [Pull request #939](https://github.com/gazebosim/gz-rendering/pull/939)
* [Pull request #940](https://github.com/gazebosim/gz-rendering/pull/940)
* [Pull request #967](https://github.com/gazebosim/gz-rendering/pull/967)

1. Fix float comparison warnings in test
* [Pull request #929](https://github.com/gazebosim/gz-rendering/pull/929)

### Gazebo Rendering 8.0.0 (2023-09-29)

1. Remove gazebo scene viewer example
Expand Down
2 changes: 1 addition & 1 deletion doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ if (DOXYGEN_FOUND)
COMMENT "Generating API documentation with Doxygen" VERBATIM)

install(FILES ${CMAKE_BINARY_DIR}/doc/${PROJECT_NAME_LOWER}.tag.xml
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/gz/${PROJECT_NAME_LOWER}_${PROJECT_VERSION_MINOR})
DESTINATION share/gz/${PROJECT_NAME_LOWER}_${PROJECT_VERSION_MINOR})
endif()
6 changes: 6 additions & 0 deletions examples/actor_animation/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ void buildScene(ScenePtr _scene, std::vector<VisualPtr> &_visuals,
common::MeshManager *meshManager = common::MeshManager::Instance();
descriptor.mesh = meshManager->Load(descriptor.meshName);
//! [load mesh]
if (!descriptor.mesh)
{
gzerr << "Failed to load mesh: " << descriptor.meshName << std::endl;
// Do not launch example if actor mesh is not found.
return;
}

// add bvh animation
//! [add animation]
Expand Down
27 changes: 18 additions & 9 deletions examples/boundingbox_camera/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,26 @@ VisualPtr createDuck(ScenePtr _scene,
n_ducks++;

// create a mesh
VisualPtr mesh = _scene->CreateVisual(
"duck" + std::to_string(n_ducks));
mesh->SetLocalPosition(_position);
mesh->SetLocalRotation(_rotation);
VisualPtr mesh;
MeshDescriptor descriptor;
descriptor.meshName = common::joinPaths(RESOURCE_PATH, "duck.dae");
common::MeshManager *meshManager = common::MeshManager::Instance();
descriptor.mesh = meshManager->Load(descriptor.meshName);
MeshPtr meshGeom = _scene->CreateMesh(descriptor);
mesh->AddGeometry(meshGeom);
mesh->SetMaterial(_material);
mesh->SetUserData("label", 5);
if (descriptor.mesh)
{
mesh = _scene->CreateVisual(
"duck" + std::to_string(n_ducks));
mesh->SetLocalPosition(_position);
mesh->SetLocalRotation(_rotation);
MeshPtr meshGeom = _scene->CreateMesh(descriptor);
mesh->AddGeometry(meshGeom);
mesh->SetMaterial(_material);
mesh->SetUserData("label", 5);
}
else
{
gzerr << "Failed load mesh: " << descriptor.meshName << std::endl;
}

return mesh;
}
Expand Down Expand Up @@ -168,7 +176,8 @@ void buildScene(ScenePtr _scene, BoundingBoxType _type)

// create a mesh
auto duck = createDuck(_scene, math::Vector3d(5, 0, 0), skyBlue);
root->AddChild(duck);
if (duck)
root->AddChild(duck);

// create a sphere1
auto sphere1 = createSphere(_scene, math::Vector3d(3, -1.5, 0), green);
Expand Down
21 changes: 14 additions & 7 deletions examples/depth_camera/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,24 @@ void buildScene(ScenePtr _scene)
root->AddChild(plane);

// create a mesh
VisualPtr mesh = _scene->CreateVisual();
mesh->SetLocalPosition(3, 0, 0);
mesh->SetLocalRotation(1.5708, 0, 2.0);
MeshDescriptor descriptor;
descriptor.meshName = common::joinPaths(RESOURCE_PATH, "duck.dae");
common::MeshManager *meshManager = common::MeshManager::Instance();
descriptor.mesh = meshManager->Load(descriptor.meshName);
MeshPtr meshGeom = _scene->CreateMesh(descriptor);
mesh->AddGeometry(meshGeom);
mesh->SetUserData("label", 5);
root->AddChild(mesh);
if (descriptor.mesh)
{
VisualPtr mesh = _scene->CreateVisual();
mesh->SetLocalPosition(3, 0, 0);
mesh->SetLocalRotation(1.5708, 0, 2.0);
MeshPtr meshGeom = _scene->CreateMesh(descriptor);
mesh->AddGeometry(meshGeom);
mesh->SetUserData("label", 5);
root->AddChild(mesh);
}
else
{
gzerr << "Failed load mesh: " << descriptor.meshName << std::endl;
}

// create a box
VisualPtr box = _scene->CreateVisual("box");
Expand Down
23 changes: 15 additions & 8 deletions examples/global_illumination/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,25 @@ void buildScene(ScenePtr _scene)
matPBR->SetEnvironmentMap(environmentMap);

// create mesh for PBR
VisualPtr meshPBR = _scene->CreateVisual("pump");
meshPBR->SetLocalPosition(2, 0.0, -0.3);
meshPBR->SetLocalRotation(0, 0, 0);
MeshDescriptor descriptorPBR;
descriptorPBR.meshName = common::joinPaths(RESOURCE_PATH, "pump.dae");
common::MeshManager *meshManager = common::MeshManager::Instance();
descriptorPBR.mesh = meshManager->Load(descriptorPBR.meshName);
MeshPtr meshPBRGeom = _scene->CreateMesh(descriptorPBR);
meshPBRGeom->SetMaterial(matPBR);
meshPBR->AddGeometry(meshPBRGeom);
meshPBR->SetStatic(true);
root->AddChild(meshPBR);
if (descriptorPBR.mesh)
{
VisualPtr meshPBR = _scene->CreateVisual("pump");
meshPBR->SetLocalPosition(2, 0.0, -0.3);
meshPBR->SetLocalRotation(0, 0, 0);
MeshPtr meshPBRGeom = _scene->CreateMesh(descriptorPBR);
meshPBRGeom->SetMaterial(matPBR);
meshPBR->AddGeometry(meshPBRGeom);
meshPBR->SetStatic(true);
root->AddChild(meshPBR);
}
else
{
gzerr << "Failed load mesh: " << descriptorPBR.meshName << std::endl;
}

// create green material
MaterialPtr green = _scene->CreateMaterial();
Expand Down
24 changes: 15 additions & 9 deletions examples/lux_core_engine/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,25 @@ void buildScene(ScenePtr _scene)
box2->SetMaterial(boxMaterial2);

// Duck Scene
MaterialPtr matte = _scene->CreateMaterial();
matte->SetDiffuse(1.0, 0.0, 0.0);

VisualPtr mesh = _scene->CreateVisual();
MeshDescriptor descriptor;
descriptor.meshName = "media/duck.dae";
common::MeshManager *meshManager = common::MeshManager::Instance();
descriptor.mesh = meshManager->Load(descriptor.meshName);
MeshPtr meshGeom = _scene->CreateMesh(descriptor);
mesh->AddGeometry(meshGeom);
mesh->SetLocalRotation(GZ_PI / 2, 0, -GZ_PI / 4);
mesh->SetLocalPosition(-0.25, -1.25, 1.25);
mesh->SetMaterial(matte);
if (descriptor.mesh)
{
VisualPtr mesh = _scene->CreateVisual();
MeshPtr meshGeom = _scene->CreateMesh(descriptor);
mesh->AddGeometry(meshGeom);
mesh->SetLocalRotation(GZ_PI / 2, 0, -GZ_PI / 4);
mesh->SetLocalPosition(-0.25, -1.25, 1.25);
MaterialPtr matte = _scene->CreateMaterial();
matte->SetDiffuse(1.0, 0.0, 0.0);
mesh->SetMaterial(matte);
}
else
{
gzerr << "Failed load mesh: " << descriptor.meshName << std::endl;
}
}

//////////////////////////////////////////////////
Expand Down
38 changes: 26 additions & 12 deletions examples/mesh_viewer/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,41 @@ void buildScene(ScenePtr _scene)
root->AddChild(light0);

//! [create a mesh]
VisualPtr mesh = _scene->CreateVisual();
mesh->SetLocalPosition(3, 0, 0);
mesh->SetLocalRotation(1.5708, 0, 2.0);
MeshDescriptor descriptor;
descriptor.meshName = common::joinPaths(RESOURCE_PATH, "duck.dae");
common::MeshManager *meshManager = common::MeshManager::Instance();
descriptor.mesh = meshManager->Load(descriptor.meshName);
MeshPtr meshGeom = _scene->CreateMesh(descriptor);
mesh->AddGeometry(meshGeom);
root->AddChild(mesh);
if (descriptor.mesh)
{
VisualPtr mesh = _scene->CreateVisual();
mesh->SetLocalPosition(3, 0, 0);
mesh->SetLocalRotation(1.5708, 0, 2.0);
MeshPtr meshGeom = _scene->CreateMesh(descriptor);
mesh->AddGeometry(meshGeom);
root->AddChild(mesh);
}
else
{
gzerr << "Failed load mesh: " << descriptor.meshName << std::endl;
}
//! [create a mesh]

// create a pbr glb mesh
mesh = _scene->CreateVisual();
mesh->SetLocalPosition(3, 2, 0);
mesh->SetLocalRotation(0, 0, 0);
descriptor.meshName = common::joinPaths(RESOURCE_PATH, "AmbulanceStretcher.glb");
descriptor.mesh = meshManager->Load(descriptor.meshName);
meshGeom = _scene->CreateMesh(descriptor);
mesh->AddGeometry(meshGeom);
root->AddChild(mesh);
if (descriptor.mesh)
{
VisualPtr mesh = _scene->CreateVisual();
mesh->SetLocalPosition(3, 2, 0);
mesh->SetLocalRotation(0, 0, 0);
MeshPtr meshGeom = _scene->CreateMesh(descriptor);
mesh->AddGeometry(meshGeom);
root->AddChild(mesh);
}
else
{
gzerr << "Failed load mesh: " << descriptor.meshName << std::endl;
}

// create gray material
MaterialPtr gray = _scene->CreateMaterial();
Expand Down
21 changes: 14 additions & 7 deletions examples/ogre2_demo/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,24 @@ void buildScene(ScenePtr _scene)
matPBR->SetEnvironmentMap(environmentMap);

// create mesh for PBR
VisualPtr meshPBR = _scene->CreateVisual("pump");
meshPBR->SetLocalPosition(2, 0.0, -0.3);
meshPBR->SetLocalRotation(0, 0, 0);
MeshDescriptor descriptorPBR;
descriptorPBR.meshName = common::joinPaths(RESOURCE_PATH, "pump.dae");
common::MeshManager *meshManager = common::MeshManager::Instance();
descriptorPBR.mesh = meshManager->Load(descriptorPBR.meshName);
MeshPtr meshPBRGeom = _scene->CreateMesh(descriptorPBR);
meshPBRGeom->SetMaterial(matPBR);
meshPBR->AddGeometry(meshPBRGeom);
root->AddChild(meshPBR);
if (descriptorPBR.mesh)
{
VisualPtr meshPBR = _scene->CreateVisual("pump");
meshPBR->SetLocalPosition(2, 0.0, -0.3);
meshPBR->SetLocalRotation(0, 0, 0);
MeshPtr meshPBRGeom = _scene->CreateMesh(descriptorPBR);
meshPBRGeom->SetMaterial(matPBR);
meshPBR->AddGeometry(meshPBRGeom);
root->AddChild(meshPBR);
}
else
{
gzerr << "Failed load mesh: " << descriptorPBR.meshName << std::endl;
}

// create green material
MaterialPtr green = _scene->CreateMaterial();
Expand Down
19 changes: 13 additions & 6 deletions examples/particles_demo/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,23 @@ void buildScene(ScenePtr _scene)
root->AddChild(light0);

//! [create a mesh]
VisualPtr mesh = _scene->CreateVisual();
mesh->SetLocalPosition(3, 0, 0);
mesh->SetLocalRotation(1.5708, 0, 2.0);
MeshDescriptor descriptor;
descriptor.meshName = common::joinPaths(RESOURCE_PATH, "duck.dae");
common::MeshManager *meshManager = common::MeshManager::Instance();
descriptor.mesh = meshManager->Load(descriptor.meshName);
MeshPtr meshGeom = _scene->CreateMesh(descriptor);
mesh->AddGeometry(meshGeom);
root->AddChild(mesh);
if (descriptor.mesh)
{
VisualPtr mesh = _scene->CreateVisual();
mesh->SetLocalPosition(3, 0, 0);
mesh->SetLocalRotation(1.5708, 0, 2.0);
MeshPtr meshGeom = _scene->CreateMesh(descriptor);
mesh->AddGeometry(meshGeom);
root->AddChild(mesh);
}
else
{
gzerr << "Failed load mesh: " << descriptor.meshName << std::endl;
}
//! [create a mesh]

// create gray material
Expand Down
Loading

0 comments on commit 4f60007

Please sign in to comment.