Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The example creates two nodes:MinimalTimer and test_node, but spins only one of them rclcpp::spin(minimal_timer);. rclcpp::spin() adds a node to an executor. The executor calls callbacks, like the parameter service callbacks. test_node must be added to an executor so the parameter service callbacks can send a response.

See the manual composition demo for an example.

rclcpp::executors::SingleThreadedExecutor exec;