Skip to content
Snippets Groups Projects
Commit 4e4d3712 authored by Hoop77's avatar Hoop77
Browse files

-

parent dd1027c2
Branches
No related merge requests found
...@@ -30,7 +30,11 @@ void Ultrasonic::onInit() ...@@ -30,7 +30,11 @@ void Ultrasonic::onInit()
while (ros::ok()) while (ros::ok())
{ {
ussDataMsg msg; ussDataMsg msg;
msg.distance = getDistance(); auto distance = getDistance();
msg.distance = distance;
std::cout << "\n------------------------\n"
<< "distance: " << distance
<< "\n------------------------\n\n";
ussData.publish(msg); ussData.publish(msg);
rate.sleep(); 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