prepare for Ros and Openni2 look at my last blog download source code, Pointcloud_to_laserscan:https://github.com/ros-perception/pointcloud_ To_laserscan compiled source code open source Launch the following Sample_node.launch file (of course, roslaunch. /sample_node.launch)
Process
Use Rviz to view execution results
Rosrun Rviz Rviz
Laser data
Point Cloud Data
Using Rqt_graph to see the node communication status of Ros
Rosrun Rqt_graph Rqt_graph
My pointcloud2 is a subscription from the/camera/depth/points theme, you can modify the launch file remap statements according to their own situation Ps:export Ros_package_path=/home/orb_slam: $ROS _package_path This statement adds the ROS source package to the Ros path the next step is to use the laser data to build the map, and then it will be online, so please wait ~ ~ (my laser data theme is/camera/scan)
You can also download the code directly from my GitHub, the launch file has been changed to fit my own computer:
Pointcloud_to_laserscan