Robotics StackExchange | Archived questions

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

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

Asked by Raja1969 on 2019-11-19 23:39:48 UTC

Comments

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

Asked by gvdhoorn on 2019-11-20 03:12:04 UTC

Answers