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

Fix tf2 compatibility of tf python implementation #134

Closed
wants to merge 21 commits into from

Conversation

roehling
Copy link
Contributor

@roehling roehling commented Nov 25, 2016

The Python code is completely replaced by forwarding calls to tf2_ros. This makes tf fully compatible with tf2, in particular it adds the missing support for static transformations.

A few API calls are no longer supported in the tf2 Python implementation. Most notably, the current pull request does not implement chain(), frameExists(), and getFrameStrings(). I believe those methods are rarely used and therefore expendable.

The lookupTwist() and getLatestCommonTime() implementations rely on ros/geometry2#192

The original implementation is not fully compatible with tf2, e.g. it
does not subscribe to /static_tf and thusly cannot support the new
static transformations introduced by tf2.

Similar to the C++ code, the Python implementation forwards all calls to
the tf2 Python implementation now, ensuring that all implementation
details of tf2 are properly hidden and the tf library will remain
compatible.
@roehling
Copy link
Contributor Author

Addresses #117

roehling added a commit to fkie-forks/geometry2 that referenced this pull request Nov 28, 2016
getLatestCommonTime() is needed to implement the TF API.
See ros/geometry#134
tfoote pushed a commit to ros/geometry2 that referenced this pull request Jan 5, 2017
getLatestCommonTime() is needed to implement the TF API.
See ros/geometry#134
tf/package.xml Outdated
<export>
<roswtf plugin="tf.tfwtf" />
<!-- <roswtf plugin="tf.tfwtf" /> -->
Copy link
Member

Choose a reason for hiding this comment

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

Does tfwtf not work anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tfwtf is written for tf1 (e.g. it explicitly subscribes to /tf), so IMHO this functionality should be implemented by tf2 instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should still work though, since the implementation details remain compatible enough for now.

@@ -78,10 +83,10 @@ def elapsed_time_within_epsilon(t, delta, epsilon):
epsilon = 0.1

# Check for dedicated thread exception, existing frames
self.assertRaises(tf.Exception, lambda: t.waitForTransform("PARENT", "THISFRAME", rospy.Time(), timeout))
###self.assertRaises(tf.Exception, lambda: t.waitForTransform("PARENT", "THISFRAME", rospy.Time(), timeout))
Copy link
Member

Choose a reason for hiding this comment

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

Why are these asserts commented out?

@tfoote
Copy link
Member

tfoote commented Jan 25, 2017

@ros-pull-request-builder retest this please

@roehling
Copy link
Contributor Author

Apparently, the failed check is caused by the unit tests of tf_conversions. A few functions have been marked deprecated, and the resulting compiler warnings make Jenkins declare the build unstable.

@roehling
Copy link
Contributor Author

roehling commented Mar 1, 2017

Is there anything else you need me to fix before this can get merged?

@tfoote
Copy link
Member

tfoote commented Mar 1, 2017

Now that tf2 has been released with the upstream changes, it needs a version dependency. Other than that I've just been starved for maintenance time.

@roehling
Copy link
Contributor Author

roehling commented Mar 3, 2017

I took the liberty to fix the unstable build, even though it took me a bit longer than I care to admit ;-)

@tfoote
Copy link
Member

tfoote commented Mar 3, 2017

Great, thanks for the contributions! I will shoot to merge and release this after we get the pending sync out.

@tfoote tfoote mentioned this pull request Jul 13, 2017
@tfoote
Copy link
Member

tfoote commented Jul 14, 2017

rebased and merged in #149

@tfoote tfoote closed this Jul 14, 2017
tfoote added a commit that referenced this pull request Jul 14, 2017
Fixes #136 with #134 for tf_echo and view_frames.
@roehling roehling deleted the tf2_compat branch October 5, 2017 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants