You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rclnodejs has no support for spin once (that I'm aware of) like in rclcpp and rclpy. In #561 I had to resort to using setTimeout instead in the unit test to wait for the event loop to finish once. At a minimum, spin once should help improve unit tests within rclnodejs and make them more reliable.
The text was updated successfully, but these errors were encountered:
Adds spinOnce support to rclnodejs. Unlike spin which runs in a separate thread, spinOnce will run synchronously and block the caller until the event loop has finished or times-out. Ideally, this should result in more predictable execution of unit tests that rely on the event loop. spinOnce cannot be used if already spinning and will throw error if attempted.
Usage:
let node = rclnodejs.createNode('my_node');
rclnodejs.spinOnce(node);
Fix#562
rclnodejs has no support for spin once (that I'm aware of) like in rclcpp and rclpy. In #561 I had to resort to using setTimeout instead in the unit test to wait for the event loop to finish once. At a minimum, spin once should help improve unit tests within rclnodejs and make them more reliable.
The text was updated successfully, but these errors were encountered: