Skip to content

Commit fcb75e1

Browse files
authored
get rid of deprecated rclcpp::spin_some() (#1567)
Signed-off-by: Alejandro Hernandez Cordero <[email protected]>
1 parent 8b6eed5 commit fcb75e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rviz2/test/tools/send_lots_of_points_node.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ int main(int argc, char ** argv)
6363
msg.points.resize(width * length);
6464
msg.header.frame_id = "world";
6565

66+
rclcpp::executors::SingleThreadedExecutor executor;
67+
executor.add_node(node);
68+
6669
int count = 0;
6770
while (rclcpp::ok() ) {
6871
width++;
@@ -90,7 +93,7 @@ int main(int argc, char ** argv)
9093

9194
pub->publish(msg);
9295

93-
rclcpp::spin_some(node);
96+
executor.spin_some();
9497
loop_rate.sleep();
9598
if (moving) {
9699
++count;

0 commit comments

Comments
 (0)