0
$\begingroup$

Rosanswers logo

Not sure if this should be posted here or on the github issue, but I would like to know if there are any ways to achieve the spin_some behaviour of rclcpp in rclpy? If not, then I would gladly attempt to submit a PR to implement the behaviour if needed.


Originally posted by DreamEquation on ROS Answers with karma: 13 on 2019-12-17

Post score: 1


Original comments

Comment by MCornelis on 2019-12-18:
Currently some work is planned/being discussed to refactor how the executor works in ROS2 for the Foxy release. Discussion can be found here: https://discourse.ros.org/t/singlethreadedexecutor-creates-a-high-cpu-overhead-in-ros-2/10077/21 . The focus will be on rclcpp, but if changes are made in rcl this could also require some rework of rclpy (I'm not very familiar with the rclpy implementation, but one can assume). So a bit of a heads-up w.r.t. possible API changes coming up (you may have to rebase with master a couple of times for the duration of the PR).

If you are really interested in working with the executor (be it in rclcpp or rclpy) you could voice this on discourse (pretty sure the core ROS2 guys will appreciate the offer/help).

If you just want the spin_some functionality in rclpy, then creating a PR for it is of course also fine ^^ , just thought I'd let you know about the plans for Foxy.

Comment by DreamEquation on 2019-12-18:
thanks for the heads-up!

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It doesn't look like it's implemented in rclpy. I recommend filing an issue on github and then going after that PR you mention.

rclcpp spin_some recently changed to only check for work once, so make sure to replicate that in your PR.


Originally posted by johnconn with karma: 553 on 2019-12-17

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.