change to multithreaded executor
This commit is contained in:
@@ -220,8 +220,9 @@ def main(args=None):
|
|||||||
rclpy.init(args=args)
|
rclpy.init(args=args)
|
||||||
|
|
||||||
api_listener = ApiListener()
|
api_listener = ApiListener()
|
||||||
|
multithreaded_executor = rclpy.executors.MultiThreadedExecutor()
|
||||||
rclpy.spin(api_listener)
|
multithreaded_executor.add_node(api_listener)
|
||||||
|
multithreaded_executor.spin()
|
||||||
|
|
||||||
api_listener.destroy_node()
|
api_listener.destroy_node()
|
||||||
rclpy.shutdown()
|
rclpy.shutdown()
|
||||||
|
|||||||
Reference in New Issue
Block a user