Unable to view 3D map on rviz [closed]
I am trying to build ROS and octomap on ubuntu 14.04. These are the steps I follow:
- I run
roscore
- I launch
roslaunch openni_launch openni.launch
- I launch
roslaunch octomap_server octomap_mapping.launch
I have made a few changes to these files after referring the previous issues faced by people and I dont know if its correct.
This is my octomap_mapping.launch
file
<launch>
<node pkg="octomap_server" type="octomap_server_node" name="octomap_server">
<param name="resolution" value="0.05" />
<!-- fixed map frame (set to 'map' if SLAM or localization running!)
<param name="frame_id" type="string" value="odom_combined" /> -->
<param name="frame_id" type="string" value="map" />
<!-- maximum range to integrate (speedup!) -->
<param name="sensor_model/max_range" value="5.0" />
<!-- data source to integrate (PointCloud2)
<remap from="cloud_in" to="/narrow_stereo/points_filtered2" /> -->
<remap from="cloud_in" to="/narrow_stereo/points_filtered2" />
</node>
</launch>
This is my octomap_mapping_nodelet.launch
file
<launch>
<node pkg="nodelet" type="nodelet" name="standalone_nodelet" args="manager"/>
<node pkg="nodelet" type="nodelet" name="octomap_server_nodelet" args="load octomap_server/OctomapServerNodelet standalone_nodelet">
<param name="resolution" value="0.05" />
<!-- fixed map frame (set to 'map' if SLAM or localization running!)
<param name="frame_id" type="string" value="odom_combined" /> -->
<param name="frame_id" type="string" value="map" />
<!-- maximum range to integrate (speedup!) -->
<param name="sensor_model/max_range" value="5.0" />
<!-- data source to integrate (PointCloud2) -->
<remap from="octomap_server_nodelet/cloud_in" to="cloud_in" />
<!-- output collision map -->
<remap from="octomap_server_nodelet/collision_map_out" to="collision_map_out"/>
</node>
</launch>
I run
rosrun rviz rviz
I add
MarkerArray
topic and change the topic tooccupied_cells_vis_array
(I also tried changing it tooccupied_cells_vis
but didn't work)I get a fixed frame error: no tf data found. So, I run
rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 map my_frame 100
and the error is resolved but still I don't see any maps.I add
PointCloud2
topic
I still can't visualize any map. Please please help!
It's hard to determine what's going on with the information you provided... Are you sure anything is published to cloud_in topic? And the topic rviz should subscribe is occupied_cells_vis according to this page. Is there any message when you echo this topic?