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

Style fixup in tf2_ros. #325

Merged
merged 1 commit into from
Oct 9, 2020
Merged

Style fixup in tf2_ros. #325

merged 1 commit into from
Oct 9, 2020

Conversation

clalancette
Copy link
Contributor

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

This is a very large PR, but it enables the linters in the tf2_ros package, and then fixes all of the problems that are pointed out. There should be no functional change from this PR.

@clalancette
Copy link
Contributor Author

@ros-pull-request-builder retest this please

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

LGTM
I don't know if it makes more sense to include find_package(ament_lint_auto REQUIRED) and exclude some tests using:

    list(APPEND AMENT_LINT_AUTO_EXCLUDE
      ament_cmake_copyright
    )

and configure the other ones using:

  set(ament_cmake_cppcheck_LANGUAGE c++)
  set(ament_cmake_uncrustify_ADDITIONAL_ARGS LANGUAGE c++)
  ament_lint_auto_find_test_dependencies()

@clalancette
Copy link
Contributor Author

I don't know if it makes more sense to include find_package(ament_lint_auto REQUIRED) and exclude some tests using:

I don't really feel strongly about it either way. Since you approved, I'm assuming you don't either :). So I'm just going to leave it for now, hopefully we can go back to using auto eventually.

Here is CI for this:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@clalancette
Copy link
Contributor Author

All right, CI is green, merging. Thanks again for the review!

@SteveMacenski
Copy link
Contributor

SteveMacenski commented Oct 12, 2020

FYI, it looks like these changes removed an include for tf2_ros Buffer that has resulted in gazebo_ros_plugins and navigation2 to have to update some files to include it on ros2 master builds to be successful. I imagine other people were caught in this as well and may have some issues requiring explicitly including the header.

Anywhere including #include "tf2_ros/transform_listener.h" but not having #include "tf2_ros/buffer.h" will need to update to have the buffer include. It looks like in the PR you changed transform_listener to include buffer core but not buffer itself which it seems some of us were relying on.

Leaving this here for posterity if others track back to this for a fix.

@clalancette
Copy link
Contributor Author

FYI, it looks like these changes removed an include for tf2_ros Buffer that has resulted in gazebo_ros_plugins and navigation2 to have to update some files to include it on ros2 master builds to be successful. I imagine other people were caught in this as well and may have some issues requiring explicitly including the header.

That's unfortunate.

Anywhere including #include "tf2_ros/transform_listener.h" but not having #include "tf2_ros/buffer.h" will need to update to have the buffer include. It looks like in the PR you changed transform_listener to include buffer core but not buffer itself which it seems some of us were relying on.

Yeah, I went through here pretty finely and did "include-what-you-use" on everything. That included removing things that weren't direct dependencies in the header files. Ultimately, the downstream consumers probably shouldn't have been relying on this behavior, but it was hard to tell before. At least it will be clear now. I hope the breakage isn't too widespread.

Leaving this here for posterity if others track back to this for a fix.

Thanks, appreciate you taking the time to track it back here and leave a note.

SteveMacenski pushed a commit to cra-ros-pkg/robot_localization that referenced this pull request Oct 26, 2020
* Include tf2_ros/buffer.h where needed

After some cleanup in ros2/geometry2#325, the header is no longer being transitively included.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Fix deprecated usage of FutureReturnCode

The namespace rclcpp::executors:: was deprecated in Foxy and removed in ros2/rclcpp#1327.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
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.

3 participants