Skip to content

Workaround for #1785 - #1794

Closed
gleichdick wants to merge 1 commit into
moveit:melodic-develfrom
gleichdick:melodic-devel
Closed

gleichdick wants to merge 1 commit into
moveit:melodic-develfrom
gleichdick:melodic-devel

Conversation

@gleichdick

Copy link
Copy Markdown
Contributor

Description

Reordered tf2 header includes, workaround for #1785. Needs ros/geometry2#431 applied to geometry2 package

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

Reorder tf2 includes, workaround for moveit#1785.
tf2_eigen.h and tf2_geometry_msgs.h have to be included before convert.h
so that tf2::convert picks the non-templated fromMsg overloads instead of a forward declared template.
@v4hn

v4hn commented Dec 2, 2019

Copy link
Copy Markdown
Contributor

Does this patch require the geometry2 pull-request or is it a workaround for it?

I'd support only the latter one.

@gleichdick

Copy link
Copy Markdown
Contributor Author

To compile moveit with latest geometry2 melodic-devel branch, both packages need to reorder their headers (as I did in both PRs). The reason is a templated declaration (not definition) of fromMsg() / toMsg(), so tf2::convert picks the templated declaration instead of the correct overload (see ros/geometry2#340 for details). By reordering the overload is defined before the template declaration.
This PR should not affect compiling with the latest packaged geometry2 version, where ros/geometry2#367 is not applied.
This is oviously not bullet-proof, but the tf2 api has to be changed for a proper solution.

@rhaschke rhaschke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should not rely on a specific ordering of include headers.
If there is a bug in tf2, it should be fixed there. Hopefully @kejxu, the original author of ros/geometry2#367, can help.

@kejxu

kejxu commented Dec 2, 2019 •

Copy link
Copy Markdown

We should not rely on a specific ordering of include headers.
If there is a bug in tf2, it should be fixed there. Hopefully @kejxu, the original author of ros/geometry2#367, can help.

thanks much for the redirection; however, would really appreciate it if there could be more information. What exactly is the bug? Does ros/geometry2#367 cause any build break in tf2 by itself?

@kejxu

kejxu commented Dec 2, 2019 •

Copy link
Copy Markdown

read through ros/geometry2#430, ros/geometry2#431, and #1785. @gleichdick, thanks a lot for the amount of time and effort invested in this issue!

Agree on the conclusion that the root cause is around the use of C++ templates (#1785 (comment)), and a proper fix (instead of workarounds) will be to correct those usages altogether. The objective of ros/geometry2#367 was to fix the MSVC build with a small yet precise change, apologies for introducing build breaks in its downstream project (moveit).

Would hope that @gleichdick could helped on ros/geometry2#430 to get the current changes merged into tf2.

@gleichdick

Copy link
Copy Markdown
Contributor Author

So, I proposed a solution in ros/geometry2#433, any comments are welcome 😄

@rhaschke

Copy link
Copy Markdown
Contributor

Closing here. Should be fixed via ros/geometry2#430 or ros/geometry2#433.

@rhaschke rhaschke closed this Jan 23, 2020
sjahr added a commit to sjahr/moveit that referenced this pull request Jun 21, 2024
* Require vel/accel limits for TOTG

* Comment improvements

Co-authored-by: Sebastian Jahr <[email protected]>

Co-authored-by: Sebastian Jahr <[email protected]>
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.

4 participants