-
Notifications
You must be signed in to change notification settings - Fork 229
[WIP]: WaitForTransform Python (#194) #215
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
Conversation
…o be specified Signed-off-by: Hunter L. Allen <[email protected]>
837a859 to
21f36ec
Compare
sloretz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up @allenh1 !
| fut = rclpy.task.Future() | ||
| if self.can_transform_core(target_frame, source_frame, time)[0]: | ||
| # Short cut, the transform is available | ||
| fut.set_result(True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On #194 you wrote:
the result on future doesn't contain any info about the transform. It should probably have that.
Can you please clarify what information you're hoping to propagate up?
I was trying to say it would be nice if fut.result() returned the transform that was being waited for instead of True.
| return fut | ||
|
|
||
| def wait_for_transform(target_frame, source_frame, time, callback): | ||
| return _wait_for_transform_async(target_frame, source_frame, time, callback) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding wait_for_transform(..., callback), with ros2/rclpy#460 merged I think the utility #194 is asking for can be had by making the result on the future returned by wait_for_transform_async() contain the transform data. The interface someone would use is fut = wait_for_transform_async(...); fut.add_done_callback(my_tf_callback).
|
@allenh1 What's the status on this one? Would you like to continue with it? If not, totally fine, but then I'll suggest we close it out. Thanks. |
|
Slipped my mind entirely. I'd be glad to pick back up on it in the very near future, though. |
Welp, this was clearly delusional. I'm going to close this PR and free up the issue so as to not block progress here. Apologies for the delay. |
Split wait_for_transform_async into two functions to allow callback to be specified
Signed-off-by: Hunter L. Allen [email protected]
@sloretz Well aware that there's likely more to be done here, but I'm not sure what so I'm opening this for visibility.
On #194 you wrote:
Can you please clarify what information you're hoping to propagate up?