Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IgnFindOGRE2: support for the ogre-next package on Ubuntu Jammy #224

Merged
merged 10 commits into from
Apr 11, 2022

Conversation

j-rivero
Copy link
Contributor

@j-rivero j-rivero commented Apr 4, 2022

🎉 New feature

Closes #208

To review please remember to enable the GUI option to skip white-spaces as detailed in https://cloudfour.com/thinks/quick-tip-how-to-hide-whitespace-changes-in-git-diffs/

Summary

Provides support to find OGRE2 now known as OGRE-Next where the code comes from the work done in Debian/Ubuntu (starting from Jammy) to package it with the name of OGRE-Next.

Workaround was in place for ign-rendering coded in gazebosim/gz-rendering#577 (although some libraries are missing for the correct linking). This PR implements the support to find that OGRE-Next installations on UNIX systems using the same call to FindIgnOGRE2 module.

The PR adds a new CMake input parameter to FindIgnOGRE2 module named IGN_OGRE2_PROJECT_NAME with default to OGRE2 that should keep the same behavior. The implementation idea is to keep using the same code for both flavors (OGRE2 and OGRE-Next) by creating new variables to deal with the difference

The output of the module are exactly the same variable names and components than before.

For a future implementation, we could probably apply some simple heuristics to auto-detect the the value of IGN_OGRE2_PROJECT_NAME.

The PR can autodetect which one of the package names is being used in the system OGRE2/OGRE-Next by iterating trying to find them one by one.

Test it

You can use the example available in this repository to check for output on the different Ubuntu distributions. On jammy remember to use -DIGN_OGRE2_PROJECT_NAME=OGRE-Next when calling CMake.

For a full working ign-gazebo on Jammy I would recommend to use this branch with ign-rendering branch gazebosim/gz-rendering#605 (reverts previous workaround) using a colcon workspace inside a rocker run. On jammy remember to use --cmake-args -DIGN_OGRE2_PROJECT_NAME=OGRE-Next when calling CMake.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@j-rivero j-rivero requested review from mxgrey and adlarkin as code owners April 4, 2022 19:25
@github-actions github-actions bot added Gazebo 1️1️ Dependency of Gazebo classic version 11 🌱 garden Ignition Garden 🏯 fortress Ignition Fortress 🏰 citadel Ignition Citadel labels Apr 4, 2022
@j-rivero j-rivero marked this pull request as draft April 4, 2022 19:29
@j-rivero j-rivero marked this pull request as ready for review April 4, 2022 19:33
cmake/FindIgnOGRE2.cmake Outdated Show resolved Hide resolved
Copy link
Contributor

@mjcarroll mjcarroll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave it a look over and looks good, still need to test it.

cmake/FindIgnOGRE2.cmake Show resolved Hide resolved
cmake/FindIgnOGRE2.cmake Show resolved Hide resolved
Co-authored-by: Michael Carroll <[email protected]>
@chapulina
Copy link
Contributor

For a full working ign-gazebo on Jammy I would recommend to use this branch with ign-rendering branch jrivero/6_revert_ogrenext_workaround

Are you planning to open an ign-rendering PR for this? Does this PR work with ign-rendering's current main?

@j-rivero
Copy link
Contributor Author

j-rivero commented Apr 8, 2022

While working on getting out-of-the-box support for ign-rendering I ended up implementing the autodetection of OGRE2/OGRE-Next in this module 4e7f535. First it tries to locate the software under OGRE2 name and if it fails under OGRE-Next name. This in combination with gazebosim/gz-rendering#605 (which run the detection twice if failed to locate PlanarReflections) produces the following:

Focal

-- Looking for OGRE using the name: OGRE2
--   + component HlmsPbs: found
--   + component HlmsUnlit: found
--   + component Overlay: found
--   ! component PlanarReflections: not found!
--   ! OGRE2 not found
-- Looking for OGRE using the name: OGRE-Next
--   ! OGRE-Next not found                              
-- Looking for IgnOGRE2 - not found

-- IgnOGRE2 was not found with PlanarReflections. Try looking without this component:
-- Looking for OGRE using the name: OGRE2
--   + component HlmsPbs: found
--   + component HlmsUnlit: found
--   + component Overlay: found
-- Looking for IgnOGRE2 - found

Jammy

-- Looking for OGRE using the name: OGRE2
--   ! OGRE2 not found                                  
-- Looking for OGRE using the name: OGRE-Next
--   + component HlmsPbs: found
--   + component HlmsUnlit: found
--   + component Overlay: found
--   + component PlanarReflections: found
-- Looking for IgnOGRE2 - found

I have updated the summary of the PR for testing instructions. To review please remember to enable the GUI option to skip white-spaces as detailed in https://cloudfour.com/thinks/quick-tip-how-to-hide-whitespace-changes-in-git-diffs/

@chapulina chapulina self-requested a review April 8, 2022 19:39
@j-rivero j-rivero merged commit 6269ae9 into ign-cmake2 Apr 11, 2022
@j-rivero j-rivero deleted the ogre_next_jammy_support branch April 11, 2022 17:26
j-rivero added a commit that referenced this pull request Apr 11, 2022
Provides support to find OGRE2 now known as OGRE-Next where the code comes from the work done in Debian/Ubuntu (starting from Jammy) to package it with the name of OGRE-Next.
@osrf-triage
Copy link

This pull request has been mentioned on Gazebo Community. There might be relevant details there:

https://community.gazebosim.org/t/new-releases-2022-04-27-fortress-citadel/1389/1

harshmahesheka pushed a commit to harshmahesheka/ign-cmake that referenced this pull request May 24, 2022
…bosim#224)

Provides support to find OGRE2 now known as OGRE-Next where the code comes from the work done in Debian/Ubuntu (starting from Jammy) to package it with the name of OGRE-Next.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel 🏯 fortress Ignition Fortress 🌱 garden Ignition Garden Gazebo 1️1️ Dependency of Gazebo classic version 11
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IgnOGRE2 support for ogre-next in Ubuntu Jammy
4 participants