Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 1516

Subscriber callback function

$
0
0
I have made a subscriber to pioneer/laser/scan for the scan values of laser on P3AT. When I run the subscriber, it just doesn't stop. It keeps on running. I want only a single value of the scan i.e. the ranges[] array. And also the value of any index in ranges[] array fluctuates ranges[i] - .2 to ranges[i] + .2 How to get only a single array ranges[] when subscribing to the scan? P.S. I am using these lines of code and obstaclesCallBack is my function for printing the scan values. ros::NodeHandle laser_n; ros::Subscriber sub = laser_n.subscribe("pioneer/laser/scan", 1000, obstaclesCallback);

Viewing all articles
Browse latest Browse all 1516

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>