##master-page:HomepageReadPageTemplate ##master-date:Unknown-Date #format wiki #language en ... '''source''' : https://github.com/OctoMap/octomap_mapping Go trough this pdf once to get an understanding of octomap with ros [[http://www2.informatik.uni-freiburg.de/~hornunga/pub/hornung13roscon.pdf|octomap_ros tutorial]] == If you have a pcd file == 1.you need to remap the output topic cloud_pcd to cloud_in because octomap package subscribes to cloud_in
2.create a launch folder in pcl_ros and create a file named pcd_to_pcl.launch, copy the following code to your launch file. {{{ }}} 2.Run the launch file {{{ roslaunch pcl_ros pcd_to_pcl.launch }}} 3.start your octomap node as below {{{ rosrun octomap_server octomap_tracking_server_node }}} 4.start rviz and add the topic: /occupied_cells_vis_array to visualize octomap cells {{{ rosrun rviz rviz }}} 5.save octotree {{{ rosrun octomap_server octomap_saver -f mapfile.ot }}} 6.Install octovis to visualize the ot or bt file {{{ sudo apt-get install ros-indigo-octovis }}} 7. to visualize your saved ot or bt file {{{ octovis yourfilename }}} 8.for distance transform in 3D with octomap need to install dynamic-edt-3d, a seperate package {{{ sudo apt-get install ros-indigo-dynamic-edt-3d }}} 9.Worst part is in my version it doesnot have config file to link the libraries and it is only there as debian, so i only can install with apt-get. Package is not available for build from source [[https://groups.google.com/forum/#!topic/octomap/LHU9PxuyihM| issue link]] {{{ set(DYNAMICEDT3D_LIBRARIES "/opt/ros/indigo/lib/libdynamicedt3d.so") include_directories( include ${catkin_INCLUDE_DIRS} ${PCL_INCLUDE_DIRS} ${OCTOMAP_INCLUDE_DIRS} ${DYNAMICEDT3D_LIBRARIES} ) }}} if you check the above box, i have added DYNAMICEDT3D_LIBRARIES variable to the path of the library in the CMakeLists.txt 10. for changing the resolution, change the octo_mapping.launch file {{{ }}} {{{ roslaunch octomap_server octomap_mapping.launch }}}