ros2 / rclpy

rclpy (ROS Client Library for Python)
Apache License 2.0
268 stars 221 forks source link

Add support for spin_until_complete #1268

Open christophebedard opened 2 months ago

christophebedard commented 2 months ago

Part of https://github.com/ros2/rclcpp/pull/2475

Replaces #919

Similar to the rclcpp changes, this adds spin_until_complete(condition, timeout).

This also adds spin_for.

christophebedard commented 2 months ago

I've updated this PR to reflect the decision in https://github.com/ros2/rclcpp/pull/2475#discussion_r1550080593 to not deprecate spin_until_future_complete and not have spin_until_complete accept both a future and a condition.

christophebedard commented 2 months ago

@fujitatomoya could you review this? This reflects the new changes to https://github.com/ros2/rclcpp/pull/2475, which should be final-ish now.

christophebedard commented 2 months ago

Well this may be going in yet another direction (https://github.com/ros2/rclcpp/pull/2475#discussion_r1559540603), so let's wait a bit.

christophebedard commented 2 months ago

Well this may be going in yet another direction (ros2/rclcpp#2475 (comment)), so let's wait a bit.

All good now, this is ready for review.