fixposition / fixposition_driver

ROS Driver for Fixposition Vision-RTK 2 Visual Inertial GNSS Positioning Sensor
MIT License
40 stars 35 forks source link

Fix include paths for ROS2 headers #37

Closed kgreenek closed 10 months ago

kgreenek commented 10 months ago

This is a minor fix. I noticed a couple of include paths for ROS2 headers are using .h instead of .hpp, so it was failing to compile for me.

fixposition-support commented 10 months ago

Hi @kgreenek can you tell us which version of ROS2 are you using. Because your change seems to not work on ROS2 Foxy at least. (Works on Humble though)

kgreenek commented 10 months ago

Oh interesting, good thing for CI! I am using Humble.

I see that the tf2_eigen.h header is deprecated as of Humble, but it is still present -- it triggers a deprecation warning when compiling.

For more context, I'm building with bazel using these rules: https://github.com/mvukov/rules_ros2

I found out the bazel target for tf2_eigen does not include the deprecated .h file, which is why it didn't work for me: (https://github.com/mvukov/rules_ros2/blob/main/repositories/geometry2.BUILD.bazel#L139).

I see two ways I can fix this:

  1. Update rules_ros2 to also include the deprecated .h header.
  2. Update fixposition_driver to check for the existence of the .hpp header.

The benefit of 2 is you won't cause folks to hit the deprecation warning when building.

I went ahead and updated my PR to do approach 2. But if you prefer I do 1 instead, I am happy to do that.

fixposition-support commented 10 months ago

@kgreenek Thanks a lot for the contribution!