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
chapulina authored Nov 8, 2021
2 parents 7fdfee6 + b1d2ac8 commit 58a7cc4
Show file tree
Hide file tree
Showing 95 changed files with 1,206 additions and 196 deletions.
29 changes: 10 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
#============================================================================
# Initialize the project
#============================================================================
project(ignition-rendering6 VERSION 6.0.0)
project(ignition-rendering7 VERSION 7.0.0)

#============================================================================
# Find ignition-cmake
Expand All @@ -15,7 +15,7 @@ set(IGN_CMAKE_VER ${ignition-cmake2_VERSION_MAJOR})
#============================================================================
# Set up the project
#============================================================================
ign_configure_project(VERSION_SUFFIX pre2)
ign_configure_project(VERSION_SUFFIX pre1)

#============================================================================
# Set project-specific options
Expand Down Expand Up @@ -62,30 +62,21 @@ endif()

#--------------------------------------
# Find OGRE
list(APPEND ign_ogre_components "RTShaderSystem" "Terrain" "Overlay")
list(APPEND ign_ogre_components "RTShaderSystem" "Terrain" "Overlay" "Paging")

# Ogre versions greater than 1.9 are not officialy supported.
ign_find_package(IgnOGRE VERSION 1.9.0
COMPONENTS ${ign_ogre_components}
REQUIRED_BY ogre
PRIVATE_FOR ogre)

# Ogre versions greater than 1.9.x are not officialy supported.
# Display a warning for the users on this setup unless they provide
# 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)
if (${OGRE_VERSION} VERSION_GREATER_EQUAL 1.10.0)
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
ign_find_package(IgnOGRE VERSION 1.9.0
COMPONENTS ${ign_ogre_components}
REQUIRED_BY ogre
PRIVATE_FOR ogre)
endif()
endif()

Expand Down
67 changes: 43 additions & 24 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
## Ignition Rendering

### Ignition Rendering 7.X

### Ignition Rendering 7.0.0 (202X-XX-XX)

### Ignition Rendering 6.X

### Ignition Rendering 6.0.0 (20XX-XX-XX)
### Ignition Rendering 6.0.1 (2021-10-01)

1. Disable using selection buffer for ray queries
* [Pull request #447](https://github.com/ignitionrobotics/ign-rendering/pull/447)

### Ignition Rendering 6.0.0 (2021-09-30)

1. Avoid configure warning when checking ogre-1.10
* [Pull request #411](https://github.com/ignitionrobotics/ign-rendering/pull/411)
* [Pull request #413](https://github.com/ignitionrobotics/ign-rendering/pull/413)

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

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

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)
* [Pull request #409](https://github.com/ignitionrobotics/ign-rendering/pull/409)

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

1. Add SetSize API for LidarVisual and markers
* [Pull request #392](https://github.com/ignitionrobotics/ign-rendering/pull/392)
Expand All @@ -23,36 +41,36 @@

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

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. New visuals
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. Center of mass visual
* [Pull request #345](https://github.com/ignitionrobotics/ign-rendering/pull/345)

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

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)
* [Pull request #443](https://github.com/ignitionrobotics/ign-rendering/pull/443)

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)

Expand All @@ -61,9 +79,7 @@

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)
* [Pull request #361](https://github.com/ignitionrobotics/ign-rendering/pull/361)

1. Visualize wireframes
* [Pull request #314](https://github.com/ignitionrobotics/ign-rendering/pull/314)
Expand All @@ -74,13 +90,16 @@
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)
* [Pull request #436](https://github.com/ignitionrobotics/ign-rendering/pull/436)
* [Pull request #426](https://github.com/ignitionrobotics/ign-rendering/pull/426)
* [Pull request #440](https://github.com/ignitionrobotics/ign-rendering/pull/440)

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)
1. Documentation updates
* [Pull request #425](https://github.com/ignitionrobotics/ign-rendering/pull/425)
* [Pull request #431](https://github.com/ignitionrobotics/ign-rendering/pull/431)

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

### Ignition Rendering 5.X

Expand Down
2 changes: 1 addition & 1 deletion examples/actor_animation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-actor-animation)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-rendering7 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down
2 changes: 1 addition & 1 deletion examples/camera_tracking/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-camera-tracking)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-rendering7 REQUIRED)

find_package(GLUT REQUIRED)
include_directories(SYSTEM ${GLUT_INCLUDE_DIRS})
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_scene_viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-custom-scene-viewer)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-rendering7 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_shaders/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include_directories(SYSTEM
${PROJECT_BINARY_DIR}
)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-rendering7 REQUIRED)

find_package(GLUT REQUIRED)
include_directories(SYSTEM ${GLUT_INCLUDE_DIRS})
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_shaders_uniforms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include_directories(SYSTEM
${PROJECT_BINARY_DIR}
)

find_package(ignition-rendering6)
find_package(ignition-rendering7)

set(TARGET_THIRD_PARTY_DEPENDS "")

Expand Down
2 changes: 1 addition & 1 deletion examples/gazebo_scene_viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-gazebo-scene-viewer)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-rendering7 REQUIRED)
find_package(gazebo REQUIRED)

include_directories(SYSTEM ${GAZEBO_INCLUDE_DIRS})
Expand Down
2 changes: 1 addition & 1 deletion examples/heightmap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-heightmap)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-rendering7 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
set(IGN_PLUGIN_VER 1)
set(IGN_COMMON_VER 3)

find_package(ignition-rendering6 REQUIRED)
find_package(ignition-rendering7 REQUIRED)
find_package(ignition-plugin1 REQUIRED COMPONENTS all)

add_library(HelloWorldPlugin SHARED HelloWorldPlugin.cc)
Expand Down
2 changes: 1 addition & 1 deletion examples/lidar_visual/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-lidar_visual)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-rendering7 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down
2 changes: 1 addition & 1 deletion examples/mesh_viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-mesh-viewer)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-rendering7 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down
2 changes: 1 addition & 1 deletion examples/mouse_picking/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-mouse-picking)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-rendering7 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down
2 changes: 1 addition & 1 deletion examples/ogre2_demo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(ignition-rendering-ogre2-demo)

find_package(ignition-rendering6)
find_package(ignition-rendering7)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down
2 changes: 1 addition & 1 deletion examples/particles_demo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-particles-demo)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-rendering7 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down
2 changes: 1 addition & 1 deletion examples/particles_demo/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ int main(int _argc, char** _argv)

// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string ogreEngineName("ogre");
std::string ogreEngineName("ogre2");
if (_argc > 1)
{
ogreEngineName = _argv[1];
Expand Down
2 changes: 1 addition & 1 deletion examples/render_pass/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-render-pass)

find_package(ignition-rendering6)
find_package(ignition-rendering7)

find_package(GLUT REQUIRED)
include_directories(SYSTEM ${GLUT_INCLUDE_DIRS})
Expand Down
2 changes: 1 addition & 1 deletion examples/segmentation_camera/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-segmentation-camera)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-rendering7 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down
51 changes: 35 additions & 16 deletions examples/segmentation_camera/GlutWindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ void motionCB(int _x, int _y)
void handleMouse()
{
std::lock_guard<std::mutex> lock(g_mouseMutex);
// only ogre supports ray query for now so use
// ogre camera located at camera index = 0.

ir::CameraPtr rayCamera = g_camera;
if (!g_rayQuery)
{
Expand All @@ -152,23 +151,44 @@ void handleMouse()
if (g_mouse.buttonDirty)
{
g_mouse.buttonDirty = false;

// TODO: enable for segmentation cameras
#if 0
// test mouse picking
if (g_mouse.button == GLUT_LEFT_BUTTON && g_mouse.state == GLUT_DOWN)
{
// Get visual using Selection Buffer from Camera
ir::VisualPtr visual;
ignition::math::Vector2i mousePos(g_mouse.x, g_mouse.y);
visual = rayCamera->VisualAt(mousePos);
if (visual)
{
std::cout << "Selected visual at position: ";
std::cout << g_mouse.x << " " << g_mouse.y << ": ";
std::cout << visual->Name() << "\n";
}
else
{
std::cout << "No visual found at position: ";
std::cout << g_mouse.x << " " << g_mouse.y << std::endl;
}
}
#endif

// camera orbit
double nx =
2.0 * g_mouse.x / static_cast<double>(rayCamera->ImageWidth()) - 1.0;
double ny = 1.0 -
2.0 * g_mouse.y / static_cast<double>(rayCamera->ImageHeight());
g_rayQuery->SetFromCamera(rayCamera, ignition::math::Vector2d(nx, ny));
g_target = g_rayQuery->ClosestPoint();
if (!g_target)
{
// set point to be 10m away if no intersection found
g_target.point = g_rayQuery->Origin() + g_rayQuery->Direction() * 10;
return;
}

// TODO(anyone) figure out why this code is causing a crash
// g_rayQuery->SetFromCamera(rayCamera, ignition::math::Vector2d(nx, ny));
// g_target = g_rayQuery->ClosestPoint();
// if (!g_target)
// {
// // set point to be 10m away if no intersection found
// g_target.point = g_rayQuery->Origin() + g_rayQuery->Direction() * 10;
// return;
// }

// TODO(anyone) get mouse wheel scroll zoom to work (currently isn't
// working)
// mouse wheel scroll zoom
if ((g_mouse.button == 3 || g_mouse.button == 4) &&
g_mouse.state == GLUT_UP)
Expand Down Expand Up @@ -203,8 +223,7 @@ void handleMouse()
g_viewControl.SetTarget(g_target.point);
g_viewControl.Orbit(drag);
}
// TODO(anyone) get right mouse button zoom to work. Seems to crash when
// used with the RayQuery

// right mouse button zoom
else if (g_mouse.button == GLUT_RIGHT_BUTTON && g_mouse.state == GLUT_DOWN)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_demo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-simple-demo)

find_package(ignition-rendering6)
find_package(ignition-rendering7)

find_package(GLUT REQUIRED)
include_directories(SYSTEM ${GLUT_INCLUDE_DIRS})
Expand Down
Loading

0 comments on commit 58a7cc4

Please sign in to comment.