ros-visualization / rqt_reconfigure

http://wiki.ros.org/rqt_reconfigure
Other
23 stars 50 forks source link

Fixed executor conflict #126

Closed Bitterisland6 closed 1 year ago

Bitterisland6 commented 1 year ago

Rqt spawns a multi threaded executor, and provides all open plugins in a single node which is spun inside it. But in the rqt_reconfigure plugin when calling service, there was added waiting for the end of the call with spin_until_future_complete. This method was giving the control of the rqt to the default rclpy executor. This issue caused problems like:

To fix this issue it's enough to wait for the service request without the spin_until_future_complete method. One solution is to use python events and add_done_callback method from the future object returned by call_async method. The waiting is done with event wait function and provided timeout, and can be interrupted by setting the event flag in the callback specified in the add_done_callback.

quarkytale commented 1 year ago

CI:

quarkytale commented 1 year ago

I'm not sure if overriding the rclpy method is the best way to go here, is there any other method that could serve this purpose, implementing spin_once_until_future_complete https://github.com/ros2/rclpy/blob/rolling/rclpy/rclpy/executors.py#L332 perhaps? (Looking into it)

MarcoMagriDev commented 1 year ago

Any update on this? Are you planning to backport to humble?

quarkytale commented 1 year ago

CI:

bjsowa commented 12 months ago

@quarkytale Could you please backport it to humble and iron?

clalancette commented 11 months ago

@mergifyio backport iron humble

mergify[bot] commented 11 months ago

backport iron humble

✅ Backports have been created

* [#135 Fixed executor conflict (backport #126)](https://github.com/ros-visualization/rqt_reconfigure/pull/135) has been created for branch `iron` * [#136 Fixed executor conflict (backport #126)](https://github.com/ros-visualization/rqt_reconfigure/pull/136) has been created for branch `humble`