ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

By this related question and its answer:

The error what(): Node has already been added to an executor. should only occur if you add your node to an rclcpp::Executor and/or pass it to rclcpp::spin more than once

You have both rclcpp::spin and rclcpp::spin_until_future_complete in your code here.

There is a possibility for a race condition too, based on:

  • https://github.com/ros2/rclcpp/issues/206

This thread there is quite helpful in recognizing the problem too, you should read it