Draft: Break geometry_msgs dependency in tf2 #732
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a fairly big, fairly messy PR. It isn't expected that this be merged, nor that the changes here are the correct way to implement this.
This PR implements more of #726 and completely removes the dependency
tf2
has ongeometry_msgs
. Some implementation notes:As far as I can tell, "just copying the headers from geometry_msgs" isn't enough in the current
rolling
- there's dependencies on rclcpp, too. That's somewhat neither here nor there, in any case.The old dependency chain was something like
tf2_geometry_msgs
->tf2_ros
->tf2
->geometry_msgs
. The new dependency chain is (roughly)In general,
tf2_geometry_msgs
is responsible for doing conversions - I did a bunch of renames oftf2_ros::toMsg
totf2::toMsg
, but this is likely wrong from an API breakage point of view - it would have been cleaner just to rename the namespace. On the plus side, a bunch of duplicated conversion functions are now gone. Of note:doTransform
and the implementation ofconvert
designed for ROS msgs had to move there, as well.Due to a few places in
tf2_ros
taking an interface rather than a real type, I had to introduce a new interfaceBufferCoreROSConversionsInterface
, which re-adds the ROS types toBufferCoreInterface
. In doing so I had to use virtual inheritance, sorry about that.tf2_py
now depends ontf2_ros
as that's whereBufferCoreROSConversionsInterface
lives.Various libraries like
tf2_bullet
could likely depend ontf2_geometry_msgs
instead oftf2_ros
, at runtime.I've broken several tests, due to dependencies on setTransform or msg types. Most of these shouldn't be hard to fix. I think
tf2_eigen
broke due to a needless change to the dependencies, easily fixed. In general, I'm not worried about the tests - I don't think this PR as is will be merged, no point in fixing tests nobody will run.Currently there's some needless changes to the CMakeList.txt file, this isn't needed any more, except to shim logging, which I'll do internally.