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

-

parent 4e47cfa5
No related merge requests found
......@@ -21,19 +21,16 @@ Ultrasonic::~Ultrasonic()
void Ultrasonic::onInit()
{
int dist = getDistance();
NODELET_INFO("Ultrasonic::onInit -- START");
ussData = nh_.advertise<ussDataMsg>("ussData", 1);
main = boost::thread(
[this]()
{
int counter = 0;
ros::Rate rate{1};
while (ros::ok())
{
ussDataMsg msg;
msg.distance = counter++;
msg.distance = getDistance();
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