Skip to content
Snippets Groups Projects
Commit 331ac22c authored by Hoop77's avatar Hoop77
Browse files

-

parent a147950a
No related merge requests found
......@@ -26,17 +26,12 @@ void Ultrasonic::onInit()
main = boost::thread(
[this]()
{
ros::Rate rate{1};
while (ros::ok())
for (;;)
{
ussDataMsg msg;
auto distance = getDistance();
msg.distance = distance;
std::cout << "\n------------------------\n"
<< "distance: " << distance
<< "\n------------------------\n\n";
ussData.publish(msg);
rate.sleep();
}
});
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment