Objective
Bloggers originally wanted to generate maps of the generated laser data and the map-building tools in ros, and searched GitHub to find that this work has been written and packaged by Daniel, and can only be built using laser data without the mileage data to build the map, but write the process, mark. prepare for the Ros,openni to refer to the previous article ~ Install Hector_slam, the simplest way is directly apt-get
sudo apt-get install Ros-indigo-hector-slam
Of course you can download the source code from GitHub and compile it: Hector_slam GitHub. There is also a link to the Ros Wiki on the website. Download hector_slam_example: Download address, after compiling, Remember to add this file to the Ros package
Ros_package_path=/home/cxz/projects/hector_slam_example: $ROS _package_path
Of course the path is changed to your own path. Install the dependency packages:
ROSDEP Install hector_slam_example then is loved roslaunch:
Roslaunch hector_slam_example hector_openni.launch Results
You just need to move the camera to build the map, of course, the method used to generate the simulated Aurora is Depthimage_to_laserscan is not the blogger mentioned in the previous article Pointcloud_to_laserscan, The method of the code is faster but requires the camera to be relatively stable, and as far as possible horizontal placement, we'd better fix it and then to generate maps.
No picture, no truth ~
PS: This method does not use the mileage meter to correct the laser data, so the error will be relatively large, and stability is not strong, can be used as a test method, but the real use of robots or other data to be fused to be more accurate.
There will be more accurate map construction in the back.