ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Which rate should we call spinOnce()

asked 2021-11-07 20:35:30 -0500

CroCo gravatar image

I'm using Qt GUI and a timer in a slot to call spinOnce() periodically. I would like to ask at which rate should I call this function spinOnce()?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-11-08 01:35:48 -0500

gvdhoorn gravatar image

I'm using Qt GUI and a timer in a slot to call spinOnce() periodically. I would like to ask at which rate should I call this function spinOnce()?

At a minimum at the lowest rate you expect messages to come in / events to be scheduled -- if you care about delays.

Ideally at a much higher rate, as delaying processing the event queue (ie: calling spinOnce()) will introduce artificial delays in your event processing.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-11-07 20:35:30 -0500

Seen: 75 times

Last updated: Nov 08 '21