Skip to content

Finalize tf2 migration #1497

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

Merged
merged 12 commits into from
May 5, 2020
Merged

Conversation

rhaschke
Copy link
Contributor

@rhaschke rhaschke commented Apr 27, 2020

This is the only blocker for the upcoming Noetic release (cf. #1498).
I started the migration process as follows:

  • Update InteractiveMarkerDisplay (8995e37)
  • Replace deprecated getTFClient() with getTF2BufferPtr()
    • in TfFrameProperty (03a732f)
    • in TfDisplay
    • in InteractiveMarker
    • in LaserScanDisplay
  • Use (already migrated) MessageFilterDisplay for all remaining displays:
    • GridCellsDisplay, which manually reimplements the logic of a MessageFilterDisplay
    • EffortDisplay, which uses MessageFilterJointState, a custom re-imlementation of tf::MessageFilter
  • Adapt FrameManager and VisualizationManager to use tf2_ros::Buffer.
  • Remove all tf1-related, already deprecated functions.

Any help is highly appreciated, @jschleicher or @simonschmeisser?

@rhaschke rhaschke mentioned this pull request Apr 27, 2020
8 tasks
@simonschmeisser
Copy link
Contributor

I tried a bit but found no easy translation for tf->getLatestCommonTime this is all deprecated and/or private in tf2

I managed to port LaserScanDisplay easily, so here is a PR rhaschke#2

@rhaschke rhaschke changed the title WIP: Finalize tf2 migration Finalize tf2 migration May 2, 2020
@rhaschke
Copy link
Contributor Author

rhaschke commented May 2, 2020

I think I finished the migration. An open question is how to handle tf_prefix. I removed it, but probably we should keep it in RobotModelDisplay and EffortDisplay. Opinions?

@simonschmeisser
Copy link
Contributor

Great job Robert! I'll look over it tomorrow.

I know that the XACROs in ROS-I contain a prefix parameter for the purpose of multi-robot systems. But I would expect this to work without an additional prefix in RobotModelDisplay? Maybe @gavanderhoorn knows more?

@guihomework
Copy link

I hope I got what is meant in the open question. We use this tf_prefix in ROS-I in the RobotModel display.

https://github.com/ubi-agni/agni_robots/blob/kinetic-devel/agni_description/config/tactile_display_both_fixed.rviz#L215

this is in order to have a specific display on a specific prefix that contains TF that are not moving (for fixing the posture of our robot hand for nice display), while still using the same urdf model as for the "moving" robot.

@rhaschke rhaschke force-pushed the tf2-migration branch 2 times, most recently from f8a0288 to be83d8f Compare May 3, 2020 09:43
@gavanderhoorn
Copy link
Contributor

I know that the XACROs in ROS-I contain a prefix parameter for the purpose of multi-robot systems. But I would expect this to work without an additional prefix in RobotModelDisplay? Maybe @gavanderhoorn knows more?

The $prefix you are referring to is only present at the xacro level. It's a standard approach to avoid link/joint/etc clashes when combining multiple xacro macros with others.

tf_prefix does make it easier to work with such xacros, but in the end these are not really related.

@gavanderhoorn
Copy link
Contributor

As to the removal of tf_prefix from all of these displays: I'm not very happy about it, but it is true that tf_prefix has been deprecated for quite some time now.

But it's a bit strange to deprecate something and then not provide an upgrade path or alternative. Many of the paragraphs / wiki pages about the deprecation of tf_prefix end with sentences such as (this one from here):

The development time for these tools unfortunately has not been found yet.

rhaschke added 8 commits May 3, 2020 14:35
Inherit from standard MessageFilterDisplay, but skip the tf2::MessageFilter (no need to transform between frames).
Remove redundant loop in EffortVisual::setMessage(), replacing this function with setEffort().
... deriving from MessageFilterDisplay
* fix package.xml, CMakeLists.txt
* remove tf includes, use tf2 data types
@rhaschke rhaschke force-pushed the tf2-migration branch 2 times, most recently from 31e9954 to 6cb5df4 Compare May 3, 2020 12:40
@rhaschke
Copy link
Contributor Author

rhaschke commented May 3, 2020

I will keep tf_prefix, but not relying on tf1.

@rhaschke rhaschke merged commit 489e2aa into ros-visualization:noetic-devel May 5, 2020
@rhaschke rhaschke deleted the tf2-migration branch May 5, 2020 08:45
rhaschke added a commit that referenced this pull request Feb 12, 2022
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