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

sleep_duration of can_transform takes too much time #531

Closed
KennyRotella opened this issue Apr 9, 2022 · 1 comment
Closed

sleep_duration of can_transform takes too much time #531

KennyRotella opened this issue Apr 9, 2022 · 1 comment

Comments

@KennyRotella
Copy link

static const double CAN_TRANSFORM_POLLING_SCALE = 0.01;

Hello, I want to wait for a transform using 120 seconds of timeout, but right after executing the bag it takes 12 secs to find first transform, is there any method to reduce this period of sleep?

const ros::Duration sleep_duration = timeout * CAN_TRANSFORM_POLLING_SCALE;

@tfoote
Copy link
Member

tfoote commented Apr 19, 2022

If you're sleeping 12 seconds that sounds like the system is working as expected. That's already 10 cycles of polling. And it polls before sleeping.

If you want want to try to optimize the extra ~1% polling latency you can work around this by calling the wait with a shorter duration multiple times.

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

No branches or pull requests

2 participants