rviz to view octomap from velodyne data in static position [closed]

asked 2014-06-26 12:02:04 -0500

marilia15 gravatar image

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 ?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by marilia15
close date 2014-07-01 05:33:09.395604

Comments

did you try Fixed frame as "velodyne" in rviz options ?

bvbdort gravatar image bvbdort  ( 2014-06-26 14:48:00 -0500 )edit
2

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.

AHornung gravatar image AHornung  ( 2014-06-27 03:42:43 -0500 )edit

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...

marilia15 gravatar image marilia15  ( 2014-06-27 04:03:13 -0500 )edit
1

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).

AHornung gravatar image AHornung  ( 2014-06-27 04:27:06 -0500 )edit