Skip to content

Commit 6f9b081

Browse files
authored
Merge pull request #19 from cyhasuka/patch-1
Update demo.cpp to reduce CPU usage
2 parents 9b3186d + 23fb11b commit 6f9b081

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/demo.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,8 @@ int main(int argc, char**argv) {
6464
pub_non_ground = pnh.advertise<sensor_msgs::PointCloud2>("nonground", 100, true);
6565

6666
ros::Subscriber sub_cloud = nh.subscribe(cloud_topic, 100, callbackCloud);
67-
68-
69-
while (ros::ok())
70-
{
71-
ros::spinOnce();
72-
}
67+
68+
ros::spin();
7369

7470
return 0;
7571
}

0 commit comments

Comments
 (0)