將xtion pro的depthimage轉換為LaserScan
阿新 • • 發佈:2018-03-04
ubuntu-14 ubun apt cat com bash log sla ins
參考:
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
將xtion pro的depthimage轉換為LaserScan