ROS中的depth image转换到laser scan的包

depthimage_to_laserscan

溪西创客小屋

Overview / Example Scene

RGB

Here is the scene in which the following screenshots were captured.

scene.jpg

DepthImage

Note the sensor_msgs/LaserScan overlayed in color on the sensor_msgs/Image. Red is close to camera, purple is far from camera.

depthimage.png

LaserScan

sensor_msgs/LaserScan projected on top of the sensor_msgs/PointCloud2.

pointcloud.png

Top Down LaserScan

Top down view of the sensor_msgs/LaserScan.

overhead_scan.png

Node

depthimage_to_laserscan

depthimage_to_laserscan  takes a depth image (float encoded meters or preferably uint16 encoded millimeters for OpenNI devices) and generates a 2D laser scan based on the provided parameters. depthimage_to_laserscan uses lazy subscribing and will not subscribe to  image  or  camera_info  until there is a subscriber for  scan .
Subscribed Topics
image  ( sensor_msgs/Image )
  • The input image that must conform to REP 118. This can be floating point or raw uint16 format. For OpenNI devices, uint16 is the native representation and will be more efficient for processing. This is typically/camera/depth/image_raw. If your image is distorted, this topic should be remapped to image_rect. OpenNI cameras typically have little distortion and rectification can be skipped for this application.
camera_info  ( sensor_msgs/CameraInfo )
  • Camera info for the associated image. Does not usually need to be remampped as camera_info will be subscribed to from the same namespace as image.
Published Topics
scan  ( sensor_msgs/LaserScan )
  • The output laser scan. Follows REP 117, and will output range arrays that contain NaNs and +-Infs.
Parameters
~scan_height  ( int , default: 1 pixel)
  • The number of pixels rows to use to generate the laserscan. For each column, the scan will return the minimum value for those pixels centered vertically in the image.
~scan_time  ( double , default: 1/30.0Hz (0.033s))
  • Time between scans (seconds). Typically, 1.0/frame_rate. This value is not easily calculated from consquetive messages, and is thus left to the user to set correctly.
~range_min  ( double , default: 0.45m)
  • The minimum ranges to return in meters. Ranges less than this will be output as -Inf.
~range_max  ( double , default: 10.0m)
  • The maximum ranges to return in meters. Ranges greater than this will be output as +Inf.
~output_frame_id  ( str , default: camera_depth_frame)
  • The frame id of the laser scan. For point clouds coming from an "optical" frame with Z forward, this value should be set to the corresponding frame with X forward and Z up.

Nodelet

Same usage as the Node.

Available as:

depthimage_to_laserscan/DepthImageToLaserScanNodelet



ROS WIKI