How to display laser scan data from Kinect
Hi everyone,
can someone help me with printing out laser scan data? for example scan->ranges[i]
void Process_Scan(const sensor_msgs::LaserScan::ConstPtr& scan){
for(unsigned int i = 0; scan->ranges.size(); i++){
}
}
Ok, I'm not sure why you are facing this problem... anyway haven't you tried this line?
occasionally there is 0 and I was hoping it would detect obstacles in front of the kinect sensor. Correct me if I am wrong Arwen.
You can visualize your laser scan data using RVIZ but just by looking at the data you can't tell whether it contains the information you want.
also Arwen, I was hoping that I can use this for measure distance to obstacle but the datas are strange for distance detection.
I don't fully understand your problem. The laser scan data are in the polar coordinate system, if you are not familiar with that you can look it up in the internet and the data stored in the ranges array are distance in meters. Can you add a screenshot of your RVIZ screen displaying laser data?
okay, i will do that