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

Update ompl_interface with latest version of OMPL #2994

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

MarqRazz
Copy link
Contributor

@MarqRazz MarqRazz commented Sep 9, 2024

Description

I'm working on debugging some issues and require building MoveIt2 and OMPL from source. This PR updates the package moveit_planners_ompl to work with the latest changes made in OMPL and it's more modern approach to exporting/linking the library but will require building it from source until a new release is made (I am working on getting it released and will keep this PR updated with the status).

I was also having issues with OMPL but that package was recently updated to properly work with Colcon. Here is a link to the issue.

Big thanks to @JafarAbdi and @mamoll for helping me debug some of these issues and getting this updated! 🥇

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

Copy link

@Ryanf55 Ryanf55 left a comment

Choose a reason for hiding this comment

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

LGTM.

moveit_planners/ompl/ompl_interface/CMakeLists.txt Outdated Show resolved Hide resolved
@JafarAbdi
Copy link
Member

@@ -12,3 +12,7 @@ repositories:
type: git
url: https://github.com/moveit/moveit_resources.git
version: ros2
ompl:
Copy link
Member

Choose a reason for hiding this comment

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

Should we wait till the new ompl version is released?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess the ompl crew would be willing to release although they still have at least one unresolved regression lying around.

But I'm not sure it's so difficult to support both ompl cmake interfaces here for now. We do that in MoveIt.

Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like incurring a source build of OMPL is probably not ideal for build times, so I'd prefer waiting for that new release to be available via binaries before merging this PR.

moveit_planners/ompl/ompl_interface/CMakeLists.txt Outdated Show resolved Hide resolved
@@ -12,3 +12,7 @@ repositories:
type: git
url: https://github.com/moveit/moveit_resources.git
version: ros2
ompl:
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess the ompl crew would be willing to release although they still have at least one unresolved regression lying around.

But I'm not sure it's so difficult to support both ompl cmake interfaces here for now. We do that in MoveIt.

@MarqRazz
Copy link
Contributor Author

Would be good to see if lines https://github.com/moveit/moveit2/pull/2994/files#diff-18741df7cbb95f9292a57457e88318346213653f65f3932a5a03a1eaf7b2655bR27-R30 are still needed

According to OMPL's build documentation OMPL_LIBRARY_DIRS does not exist any more and the environment variables are not recommended any more so I removed it. If someone with a Mac could test this PR out that would be great!
image

@Ryanf55
Copy link

Ryanf55 commented Sep 10, 2024

Would be good to see if lines https://github.com/moveit/moveit2/pull/2994/files#diff-18741df7cbb95f9292a57457e88318346213653f65f3932a5a03a1eaf7b2655bR27-R30 are still needed

According to OMPL's build documentation OMPL_LIBRARY_DIRS does not exist any more and the environment variables are not recommended any more so I removed it. If someone with a Mac could test this PR out that would be great! image

To support the previous CMake module behavior, the following variables are defined. These are for backwards compatability, but not recommended anymore.

It was my intent to preserve them for backwards compatability, but the reality on ompl main is they only exist for consuming ompl through submodule, not find_package. This was an oversight/mistake on my part, and I only realized it yesterday. OMPL did not change its major version, so there should not be ABI breaks. I have recognized the downstream impact this is having is larger than it should be. If MoveIT has build failures for something that worked previously, I am in the wrong. Please let me know if you have a minimum reproducible example and I will do my best to bring those variables back in find_package.

@Ryanf55
Copy link

Ryanf55 commented Sep 10, 2024

This PR should get us closer to fixing the accidental breakage of the old variables in find_package. https://github.com/ompl/ompl/pull/1182/files#diff-148715d6ea0c0ea0a346af3f6bd610d010d490eca35ac6a9b408748f7ca9e3f4R10

We need to then add this back into the export, along with the other variables.

Copy link

mergify bot commented Oct 13, 2024

This pull request is in conflict. Could you fix it @MarqRazz?

moveit2.repos Outdated Show resolved Hide resolved
@MarqRazz
Copy link
Contributor Author

Thanks for keeping this moving @sjahr!

@sjahr
Copy link
Contributor

sjahr commented Oct 14, 2024

@MarqRazz I'd just merge it now, since there aren't any CI failures related to the PR. Any concerns?

@MarqRazz
Copy link
Contributor Author

MarqRazz commented Oct 14, 2024

Nope, I was just waiting for the 👍

Actually we need to release OMPL for this change to work right. I have not tested this against the latest release to ROS2.

@mamoll I would be happy to help get the OMPL release to ROS updated. Is there anything I can help with? @JafarAbdi also said he was will to help maintain the release.

@sjahr
Copy link
Contributor

sjahr commented Oct 14, 2024

Ok, I'll wait for now 👍 Let me know when it's ready

@sjahr sjahr self-requested a review October 14, 2024 14:30
@sjahr
Copy link
Contributor

sjahr commented Nov 20, 2024

@MarqRazz @mamoll @JafarAbdi Any updates?

@MarqRazz
Copy link
Contributor Author

Thanks for keeping this up to date @sjahr! I have reached out the the ompl-release repo and Mark Moll and we are working on adding additional maintainers.

Copy link
Member

@JafarAbdi JafarAbdi left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.66%. Comparing base (9e0b4dd) to head (255575c).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2994      +/-   ##
==========================================
- Coverage   45.67%   45.66%   -0.01%     
==========================================
  Files         714      714              
  Lines       62295    62295              
  Branches     7530     7530              
==========================================
- Hits        28445    28438       -7     
- Misses      33684    33690       +6     
- Partials      166      167       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sea-bass
Copy link
Contributor

Wait... @MarqRazz I just read the original issue and now that OMPL 1.6.0 is out for Jazzy, the source build can be removed and this should work, yeah?

@MarqRazz
Copy link
Contributor Author

OMPL 1.6 has been released since Jan. 7th 2023 and is currently the latest release of the library (this is the same version that is available in Humble). The breaking change this PR is attempting to fix was merged into OMPL on Oct. 2023.

I poked around in the ompl-release repo for Jazzy and I'm not sure which upstream OMPL commit these rebases were made on
image
but it does not include OMPL#1067 according to my testing because the changes in this PR fail to build against the latest binaries of OMPL in Jazzy.

--- stderr: moveit_planners_ompl                                                                                   
CMake Error at ompl_interface/CMakeLists.txt:43 (target_link_libraries):
  Target "moveit_ompl_interface" links to:

    ompl::ompl

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

FYI we do have a PR open to make a 1.7 release of OMPL but it is taking a little time to ensure that everything is ready to cut a new version. I am also proposing a new versioning approach that bumps the source version after cutting a release so there is less confusion which version is released vs source. If anyone has thoughts here about version numbering please come chime in on the conversation!

@sea-bass
Copy link
Contributor

sea-bass commented Jan 12, 2025

Gotcha. My preference would be to then release the OMPL 1.7.0 binaries and then update this PR to use those binaries.

But if you/others would prefer to bring in the latest version sooner and do the source build for now, my preference isn't strong. Just note that we wouldn't be able to cut a new release of MoveIt until the OMPL binaries were in, hence my hesitation.

Edit: anyway, the tutorials images check I think is failing, but it should go green after this PR makes it to main.

@MarqRazz
Copy link
Contributor Author

Gotcha. My preference would be to then release the OMPL 1.7.0 binaries and then update this PR to use those binaries.

👍 Mine too which is why I have been holding off on this PR. I was also only planning on releasing OMPL 1.7 to Rolling/Jazzy and leaving everything else on 1.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants