参考:
http://www.cnblogs.com/cj2014/p/4007165.html
http://www.cnblogs.com/huicanlin/p/5442479.html
http://answers.ros.org/question/62990/add-depth-image-to-laser-scan-in-a-launch-file/
http://answers.ros.org/question/190377/how-to-setup-xtion-pro-live-ubuntu-1404-openni12/
http://wiki.ros.org/depthimage_to_laserscan
1.安装ROS的openni包
sudo apt-get install ros-<rosdistro>-openni2-camera
sudo apt-get install ros-<rosdistro>-openni2-launch
2.安装ROS的depthimage_to_laserscan包
cd ~/catkin_ws/src/
git clone https://github.com/ros-perception/depthimage_to_laserscan.git #克隆失败,可以手动去github上下载
进入depthimage_to_laserscan/cfg/Depth.cfg文件,将output_frame_id的取值改写成laser
cd ~/catkin_ws/src
catkin_make
3.运行
roslaunch openni2_launch openni2.launch
source ~/catkin_ws/devel/setup.bash
rosrun depthimage_to_laserscan depthimage_to_laserscan image:=/camera/depth/image_raw