Trying to run rclpy.spin() in thread produces "generator already executing"

asked 2019-11-19 22:43:03 -0500

Raja1969 gravatar image

Hi , I am using ros2 runtime & rclpy API for creating nodes.

I have a use case where the node is publishing to some topic and subscribing to another topic .

Publishing depends on the receivied msg on the callback and some logic is checked based on that I am publishing to the earlier said topic I want to run rclpy.spin() in python thread so that it won't be blocking ,but when I do that I am getting "generator already executing" error

Please help me what should I do for this

edit retag flag offensive close merge delete

Comments

I doubt people here will be able to help you without seeing your code.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-20 02:12:04 -0500 )edit