Rosanswers logo

just a quick question, does the scan (http://www.ros.org/doc/api/sensor_msgs/html/msg/LaserScan.html) topic's ranges array hold 360 values each representing a degree in a circle for the microsoft kinect?

For example, I've realized that index 180 (or 179?) is directly in front of the camera, does that make the next index 1 degree to the left/right?

One more explanation for clarity, sorry i'm having trouble explaining this in a manner i feel is clear, the kinect is vertex A, do depth scan ranges[180] and ranges[181] make a 1 degree angle at vertex A?

Thanks for any help!

Originally posted by Rydel on ROS Answers with karma: 600 on 2012-07-18

Post score: 2

Original comments

Comment by Rydel on 2012-07-18:
also is there a simple way to overlap the /scan data array onto the rgb data array? I guess I would just need to know what row the /scan topic is using but i'm not sure where to find that.

Comment by Felix Endres on 2012-07-19:
Are you talking about the depth image, a laser scanner or the kinect-transformed-to-laserscan?

Comment by Rydel on 2012-07-22:
sorry, im talking about the kinect-to-laserscan, a topic called /scan, the one the navigation stack uses to build 2-d maps on the turtlebot; http://www.ros.org/doc/api/sensor_msgs/html/msg/LaserScan.html


1 Answer 1


Rosanswers logo

The values you are looking for are:

float32 angle_min        # start angle of the scan [rad]
float32 angle_max        # end angle of the scan [rad]
float32 angle_increment  # angular distance between measurements [rad]

The i-th range corresponds to angle: angle_min + i * angle_increment. Two consecutive ranges are always angle_increment apart. You should read those out for the kinect specifics, but I doubt that they are full 360 deg as that wouldn't make sense.

Originally posted by dornhege with karma: 31395 on 2012-07-23

This answer was ACCEPTED on the original site

Post score: 4

Original comments

Comment by Rydel on 2012-07-23:
thanks for the info!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.