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

tf2_ros/Buffer::canTransform: timout smaller than 10ms are not possible #281

Closed
cwecht opened this issue Feb 5, 2018 · 1 comment
Closed

Comments

@cwecht
Copy link
Contributor

cwecht commented Feb 5, 2018

Currently, Buffer::canTransform's timeout is implemented by polling with a cycle of 0.01ms. Therefore shorter timeouts than 0.01ms are not possible.

I would like to suggest that, if time_out < 0.01ms, the polling-cycle should be adapted.

At least, if not changed, this behavior should be documented anywhere...

@tfoote
Copy link
Member

tfoote commented Feb 6, 2018

Yeah, that is a magic number that should be cleaned up. It might make sense to actually pick the sleep period in relation to the timeout in general, something like 100th of the timeout. The rate of polling needs to be traded off against performance. At the low end it will end up saturating at the minimum sleep period. And at the high end it would cause ~100 calls per timeout consistently.

seanyen pushed a commit to ms-iot/geometry2 that referenced this issue Dec 25, 2020
… (ros#330)

* Clear callback from transformable_callbacks_ when callback is done or not needed

Co-authored-by: marting87 <martinganeff@gmail.com>
Co-authored-by: Matthijs den Toom <mdentoom@lely.com>
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
seanyen pushed a commit to ms-iot/geometry2 that referenced this issue Mar 22, 2021
* Make BufferCore callback handle maintenance internal.

That is, there is really no reason for external users to know
about TranformableCallbackHandle at all.  Instead, hide all of
the implementation detail about the handles within BufferCore
itself.  This gets simplifies the API, and allows us to ensure
that cleanup happens properly.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>

Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants