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

fix: include order for cpplint #15

Merged
merged 3 commits into from
May 12, 2022
Merged

fix: include order for cpplint #15

merged 3 commits into from
May 12, 2022

Conversation

wep21
Copy link

@wep21 wep21 commented Apr 28, 2022

fix include order to pass cpplint linter test

wep21 added 2 commits April 29, 2022 00:58
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
@wxmerkt
Copy link
Member

wxmerkt commented Apr 28, 2022

Thanks for the PR - I am aware of an issue with octomap on Jammy but haven't had the time to fix it yet. I could get back to this in ~1.5 weeks

@wep21
Copy link
Author

wep21 commented Apr 28, 2022

@clalancette @nuclearsandwich could you also review this? This PR fixes regression test failure on rolling.
@wxmerkt I found out that build with liboctomap-dev was successful, while build with ros-rolling-octomap was failed.
I guess the header path was different. By the way, why do you release the ros2 package of octomap instead of registering rosdep key of liboctomap-dev?

@clalancette
Copy link

@clalancette @nuclearsandwich could you also review this?

This looks generally fine to me, and is inline with what we had to do elsewhere when we updated the version of cpplint in use.

Copy link

@nuclearsandwich nuclearsandwich left a comment

Choose a reason for hiding this comment

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

Personally I'd usually request / recommend that the PR description be edited to describe the cpplint warnings that the change is resolving but as this isn't my project to review I'll abstain from "binding" requests.

As far as the changes themselves I don't feel qualified to evaluate them without more information.

@clalancette
Copy link

By the way, why do you release the ros2 package of octomap instead of registering rosdep key of liboctomap-dev?

I missed this last time. It's a great question; someone in the past must have wanted it when it wasn't available, or too old a version. That said, we really should be relying on the rosdep key if at all possible. I'd be for that change, though we'd have to check what depends on octomap and if they'd be happy to use the rosdep key instead.

@wxmerkt
Copy link
Member

wxmerkt commented May 9, 2022

Hi @wep21 and all,
In the past we had to release octomap into different distros as the liboctomap-dev versions differed across some of the supported operating system combinations (per REP-3 or REP-2000). I don't think this is the case anymore.

From a quick check of available packages, I am in favour of removing ros-rolling-octomap and adding a rosdep key to the respective distribution versions.

@wxmerkt
Copy link
Member

wxmerkt commented May 9, 2022

I looked into the underlying failure more closely and it's due to a common issue with finding OctoMap, as it only sets CMake variables with upper-case OCTOMAP by default:

find_package(octomap REQUIRED) will NOT set up the CMake variables correctly
find_package(OCTOMAP REQUIRED) will.

As thus, the ament-auto-find-and-configure in the modified ROS2 CMakeLists fails. The reason non-rolling releases are fine is that I added patches to those releases to change the libdir from lib/$arch to lib and it incidentally gets configured correctly. Similarly, the reason it works with liboctomap-dev is that the paths incidentally are correct - not that the CMake configures correctly.

My current plan of action - independent from changing the rosdep key - is to modify Octomap's config.cmake to also set the octomap_INCLUDE_DIRS etc. variables with lower-case octomap.

@nuclearsandwich
Copy link

My current plan of action - independent from changing the rosdep key - is to modify Octomap's config.cmake to also set the octomap_INCLUDE_DIRS etc. variables with lower-case octomap.

This would be great @wxmerkt. Please @ me directly if you'd like reviews.

@wxmerkt
Copy link
Member

wxmerkt commented May 11, 2022

This has now been merged upstream (OctoMap/octomap#369), but not yet released (and not sure if/when the [Ubuntu/RHEL/etc.] distro maintainers would make a new release either?).

As a current solution, we can add target_include_directories(... PUBLIC ${OCTOMAP_INCLUDE_DIRECTORIES}) to the ROS2 branch in octomap_ros and octomap_mapping as well.

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
@wep21
Copy link
Author

wep21 commented May 12, 2022

@wxmerkt I added workaround at cfe4783.

@wxmerkt
Copy link
Member

wxmerkt commented May 12, 2022

Thank you very much for the swift fix @wep21, and for the review and feedback @nuclearsandwich @clalancette

@wxmerkt wxmerkt merged commit 6ea7b67 into OctoMap:ros2 May 12, 2022
@wep21 wep21 deleted the fix/rolling branch May 12, 2022 09:06
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.

None yet

4 participants