rviz to view octomap from velodyne data in static position [closed]
Hello everyone and thanks in advance for your help.
I want to use rviz to visualize the octomap generated by velodyne data. But the velodyne is not going to be moving , it's in a fixed position so I do not need a SLAM.
I have been working with velodyne before but not with octomap.
I've installed ros-hydro-octomap, ros-hydro-octomap-mapping, ros-hydro-octomap-rviz-plugins, ros-hydro-octovis.
I generate the PointCloud2 messages, with topic /velodyne_points and frame_id=velodyne using: roslaunch velodyne_pointcloud 32e_points.launch pcap:=$(pwd)/file.pcap
Then I convert the pointcloud to octomap using: roslaunch octomap_server octomap_mapping.launch But I have modified this launch file using frame_id=velodyne and remap from cloud_in to the topic /velodyne_points
Then I do rostopic echo occupied_cells_vis_array and I see the published data, so in some way it is working.
Then I try to visualize the octomap in rviz doing: rosrun rviz rviz (sometime I test adding -f velodyne because it is the frame_id ) And I put a Marker array with topic /occupied_cells_vis but I can't see anything . I only can see, the pointcloud2 in topic /velodyne_points with the same rviz.
Is it because octomap requires data from /tf or /tf_static topic, and I am not publishing anything on these?
The position of Velodyne is static, so how can I put static position in /tf ?
did you try Fixed frame as "velodyne" in rviz options ?
To view octomaps in RViz, I would recommend to use the octomap_rviz_plugins package (`ros-hydro-octomap-rviz-plugins`), it's much more efficient than the voxel array.
Thanks for your soon reply. ros-hydro-octomap-rviz-plugins was installed and the fixed frame was "velodyne". I solved the problem changing the topic in rviz to /occupied_cells_vis_array including _array. All the tutorials and forums said that I should NOT put _array in the topic subscribed by rviz...
What I meant with my comment is to use the octomap RViz plugin (OccupancyGrid), not the marker array as display (add a new display plugin in RViz for this).