Skip to content

Commit

Permalink
Merge branch 'main' into matias-rayQueryFix
Browse files Browse the repository at this point in the history
  • Loading branch information
iche033 authored Oct 9, 2021
2 parents 2b9fdaa + 084516a commit 7fdfee6
Show file tree
Hide file tree
Showing 136 changed files with 12,628 additions and 166 deletions.
1 change: 1 addition & 0 deletions .github/ci/packages.apt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ libglew-dev
libignition-cmake2-dev
libignition-common4-dev
libignition-math6-dev
libignition-math6-eigen3-dev
libignition-plugin-dev
libogre-1.9-dev
libogre-2.2-dev
Expand Down
30 changes: 22 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,28 @@ project(ignition-rendering6 VERSION 6.0.0)
# Find ignition-cmake
#============================================================================
# If you get an error at this line, you need to install ignition-cmake
find_package(ignition-cmake2 2.3 REQUIRED)
find_package(ignition-cmake2 2.8.0 REQUIRED)
set(IGN_CMAKE_VER ${ignition-cmake2_VERSION_MAJOR})

#============================================================================
# Set up the project
#============================================================================
ign_configure_project(VERSION_SUFFIX pre1)
ign_configure_project(VERSION_SUFFIX pre2)

#============================================================================
# Set project-specific options
#============================================================================

option(USE_UNOFFICAL_OGRE_VERSIONS "Accept unsupported Ogre versions in the build" OFF)
set(CMAKE_CXX_STANDARD 14)
option(USE_UNOFFICIAL_OGRE_VERSIONS "Accept unsupported Ogre versions in the build" OFF)

#============================================================================
# Search for project-specific dependencies
#============================================================================

#--------------------------------------
# Find ignition-math
ign_find_package(ignition-math6 REQUIRED VERSION 6.6)
ign_find_package(ignition-math6 REQUIRED COMPONENTS eigen3 VERSION 6.9)
set(IGN_MATH_VER ${ignition-math6_VERSION_MAJOR})

#--------------------------------------
Expand Down Expand Up @@ -65,15 +66,19 @@ list(APPEND ign_ogre_components "RTShaderSystem" "Terrain" "Overlay")

# Ogre versions greater than 1.9 are not officialy supported.
# Display a warning for the users on this setup unless they provide
# USE_UNOFFICAL_OGRE_VERSIONS flag
if (NOT USE_UNOFFICAL_OGRE_VERSIONS)
ign_find_package(IgnOGRE VERSION 1.10
COMPONENTS ${ign_ogre_components})
# USE_UNOFFICIAL_OGRE_VERSIONS flag
if (NOT USE_UNOFFICIAL_OGRE_VERSIONS)
# Only for checking the ogre version
ign_find_package(IgnOGRE VERSION 1.10 QUIET)

if (OGRE_FOUND)
IGN_BUILD_WARNING("Ogre 1.x versions greater than 1.9 are not officially supported."
"The software might compile and even work but support from upstream"
"could be reduced to accepting patches for newer versions")
ign_find_package(IgnOGRE VERSION 1.10
COMPONENTS ${ign_ogre_components}
REQUIRED_BY ogre
PRIVATE_FOR ogre)
else()
# If ogre 1.10 or greater was not found, then proceed to look for 1.9.x
# versions which are offically supported
Expand Down Expand Up @@ -153,9 +158,18 @@ if (HAVE_OGRE2)
list(APPEND RENDERING_COMPONENTS ogre2)
endif()

configure_file("${PROJECT_SOURCE_DIR}/cppcheck.suppress.in"
${PROJECT_BINARY_DIR}/cppcheck.suppress)

ign_configure_build(QUIT_IF_BUILD_ERRORS
COMPONENTS ${RENDERING_COMPONENTS})

if (HAVE_OGRE2)
# Must be done after ign_configure_build or else Terra
# won't see IGN_ADD_fPIC_TO_LIBRARIES
add_subdirectory(ogre2/src/terrain/Terra)
endif()

#============================================================================
# Create package information
#============================================================================
Expand Down
99 changes: 98 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,84 @@

### Ignition Rendering 6.0.0 (20XX-XX-XX)

1. Update test config to run ogre 1.x tests in ign-rendering6 on macOS
* [Pull request #407](https://github.com/ignitionrobotics/ign-rendering/pull/407)
* [Pull request #409](https://github.com/ignitionrobotics/ign-rendering/pull/409)

1. Check if key exists in gpu lidar's user data
* [Pull request #396](https://github.com/ignitionrobotics/ign-rendering/pull/396)

1. Clone visuals and geometries
* [Pull request #397](https://github.com/ignitionrobotics/ign-rendering/pull/397)

1. Add SetSize API for LidarVisual and markers
* [Pull request #392](https://github.com/ignitionrobotics/ign-rendering/pull/392)

1. Add Ogre2Heightmap functionality
* [Pull request #386](https://github.com/ignitionrobotics/ign-rendering/pull/386)
* [Pull request #416](https://github.com/ignitionrobotics/ign-rendering/pull/416)

1. Prevent default-constructed variants from holding a type
* [Pull request #371](https://github.com/ignitionrobotics/ign-rendering/pull/371)

1. Temporarily set number of camera pass count per flush to 0 in ogre2 to prevent downstream build failures
* [Pull request #367](https://github.com/ignitionrobotics/ign-rendering/pull/367)

1. Joint visual
* [Pull request #366](https://github.com/ignitionrobotics/ign-rendering/pull/366)
* [Pull request #387](https://github.com/ignitionrobotics/ign-rendering/pull/387)

1. Fixing camera projection type test
* [Pull request #361](https://github.com/ignitionrobotics/ign-rendering/pull/361)

1. UserData methods moved from Visual to Node
* [Pull request #358](https://github.com/ignitionrobotics/ign-rendering/pull/358)

1. Replace renderOneFrame for per-workspace update calls
* [Pull request #353](https://github.com/ignitionrobotics/ign-rendering/pull/353)

1. Center of mass visual
* [Pull request #345](https://github.com/ignitionrobotics/ign-rendering/pull/345)

1. Segmentation Camera
* [Pull request #329](https://github.com/ignitionrobotics/ign-rendering/pull/329)
* [Pull request #419](https://github.com/ignitionrobotics/ign-rendering/pull/419)

1. Stub bounding box camera APIs
* [Pull request #420](https://github.com/ignitionrobotics/ign-rendering/pull/420)

1. Inertia visual
* [Pull request #326](https://github.com/ignitionrobotics/ign-rendering/pull/326)

1. Changed calculation for range clipping
* [Pull request #325](https://github.com/ignitionrobotics/ign-rendering/pull/325)

1. Destroy material when a mesh is deleted
* [Pull request #324](https://github.com/ignitionrobotics/ign-rendering/pull/324)

1. Add orthographic view controller
* [Pull request #322](https://github.com/ignitionrobotics/ign-rendering/pull/322)

1. Port codecov to new configuration
* [Pull request #318](https://github.com/ignitionrobotics/ign-rendering/pull/318)

1. Visualize wireframes
* [Pull request #314](https://github.com/ignitionrobotics/ign-rendering/pull/314)

1. Add environment map tutorial
* [Pull request #295](https://github.com/ignitionrobotics/ign-rendering/pull/295)

1. From Ogre 2.1 to Ogre 2.2
* [Pull request #272](https://github.com/ignitionrobotics/ign-rendering/pull/272)
* [Pull request #393](https://github.com/ignitionrobotics/ign-rendering/pull/393)

1. All changes merged forward from ign-rendering5
* [Pull request #310](https://github.com/ignitionrobotics/ign-rendering/pull/310)
* [Pull request #331](https://github.com/ignitionrobotics/ign-rendering/pull/331)
* [Pull request #350](https://github.com/ignitionrobotics/ign-rendering/pull/350)
* [Pull request #401](https://github.com/ignitionrobotics/ign-rendering/pull/401)
* [Pull request #406](https://github.com/ignitionrobotics/ign-rendering/pull/406)

### Ignition Rendering 5.X

### Ignition Rendering 5.X.X (20XX-XX-XX)
Expand Down Expand Up @@ -139,6 +217,25 @@

### Ignition Rendering 4.X

### Ignition Rendering 4.9.0 (2021-09-15)

1. Output warning message if a mesh with zero submeshes is created
* [Pull request #391](https://github.com/ignitionrobotics/ign-rendering/pull/391)

1. Fix particle effect randomness
* [Pull request #388](https://github.com/ignitionrobotics/ign-rendering/pull/388)

1. Fix single ray gpu lidar
* [Pull request #384](https://github.com/ignitionrobotics/ign-rendering/pull/384)

1. Use selection buffer in ray queries (ogre2)
* [Pull request #378](https://github.com/ignitionrobotics/ign-rendering/pull/378)
* [Pull request #383](https://github.com/ignitionrobotics/ign-rendering/pull/383)

1. All changes merged forward from ign-rendering3
* [Pull request #382](https://github.com/ignitionrobotics/ign-rendering/pull/382)
* [Pull request #398](https://github.com/ignitionrobotics/ign-rendering/pull/398)

### Ignition Rendering 4.8.0 (2021-06-18)

1. relax gaussian test tolerance
Expand Down Expand Up @@ -371,7 +468,7 @@
### Ignition Rendering 3.X.X (2021-XX-XX)

1. CMake warning on Ogre versions that are not officially supported.
To disable the new warning, it is enough to enable the cmake option USE_UNOFFICAL_OGRE_VERSIONS
To disable the new warning, it is enough to enable the cmake option USE_UNOFFICIAL_OGRE_VERSIONS
* [Pull request 376](https://github.com/ignitionrobotics/ign-rendering/pull/376)

### Ignition Rendering 3.5.0 (2021-05-25)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ of libraries designed to rapidly develop robot applications.

# Features

* Support for rendering engines including OGRE and OptiX
* Support for rendering engines including OGRE and OptiX (experimental)
* Plugin-based architecture. Mulitple rendering engine plugins can be loaded at run time.
* Object-oriented scene management.

Expand Down
1 change: 1 addition & 0 deletions cppcheck.suppress.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*:*/Terra/*.h
26 changes: 23 additions & 3 deletions examples/heightmap/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@ void buildScene(ScenePtr _scene)
light0->SetSpecularColor(0.5, 0.5, 0.5);
root->AddChild(light0);

// create point light
PointLightPtr light1 = _scene->CreatePointLight();
light1->SetDiffuseColor(0.8, 0.8, 0.8);
light1->SetSpecularColor(0.2, 0.2, 0.2);
light1->SetLocalPosition(30, -3, 6);
light1->SetAttenuationConstant(0.1);
light1->SetAttenuationLinear(0.001);
light1->SetAttenuationQuadratic(0.0001);
light1->SetAttenuationRange(80);
light1->SetCastShadows(true);
root->AddChild(light1);

//! [create a heightmap]
auto data = std::make_shared<common::ImageHeightmap>();
data->Load(common::joinPaths(RESOURCE_PATH, "heightmap_bowl.png"));
Expand Down Expand Up @@ -170,8 +182,8 @@ void buildScene(ScenePtr _scene)
CameraPtr camera = _scene->CreateCamera("camera");
camera->SetLocalPosition(1.441, 25.787, 17.801);
camera->SetLocalRotation(0.0, 0.588, -1.125);
camera->SetImageWidth(800);
camera->SetImageHeight(600);
camera->SetImageWidth(1600);
camera->SetImageHeight(900);
camera->SetAntiAliasing(2);
camera->SetAspectRatio(1.333);
camera->SetHFOV(IGN_PI / 2);
Expand Down Expand Up @@ -207,7 +219,15 @@ int main(int _argc, char** _argv)
std::vector<std::string> engineNames;
std::vector<CameraPtr> cameras;

engineNames.push_back("ogre");
// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string ogreEngineName("ogre2");
if (_argc > 1)
{
ogreEngineName = _argv[1];
}

engineNames.push_back(ogreEngineName);

for (auto engineName : engineNames)
{
Expand Down
39 changes: 39 additions & 0 deletions examples/segmentation_camera/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-segmentation-camera)
find_package(ignition-rendering6 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
)

find_package(GLUT REQUIRED)
include_directories(SYSTEM ${GLUT_INCLUDE_DIRS})
link_directories(${GLUT_LIBRARY_DIRS})

find_package(OpenGL REQUIRED)
include_directories(SYSTEM ${OpenGL_INCLUDE_DIRS})
link_directories(${OpenGL_LIBRARY_DIRS})

if (NOT APPLE)
find_package(GLEW REQUIRED)
include_directories(SYSTEM ${GLEW_INCLUDE_DIRS})
link_directories(${GLEW_LIBRARY_DIRS})
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")

configure_file (example_config.hh.in ${PROJECT_BINARY_DIR}/example_config.hh)

add_executable(segmentation_camera Main.cc GlutWindow.cc)

target_link_libraries(segmentation_camera
${GLUT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${IGNITION-RENDERING_LIBRARIES}
)

add_custom_command(TARGET segmentation_camera POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/media
$<TARGET_FILE_DIR:segmentation_camera>/media)
Loading

0 comments on commit 7fdfee6

Please sign in to comment.