Skip to content

Commit 3bb89b8

Browse files
author
Marius Schnaubelt
committed
Fixed the frequency of the loop. Loop didn't sleep.
1 parent 8ee2baa commit 3bb89b8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

chisel_ros/src/ChiselNode.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,12 @@ int main(int argc, char** argv)
127127
server->SetupMeshPublisher(meshTopic);
128128
server->SetupChunkBoxPublisher(chunkBoxTopic);
129129
ROS_INFO("Beginning to loop.");
130+
131+
ros::Rate loop_rate(100);
132+
130133
while (ros::ok())
131134
{
132-
ros::Rate loop_rate(100);
135+
loop_rate.sleep();
133136
ros::spinOnce();
134137

135138
if(!server->IsPaused() && server->HasNewData())

0 commit comments

Comments
 (0)