Skip to content

Visualization

AnaBatinovic edited this page Mar 19, 2021 · 4 revisions

During an unknown area exploration, the frontier-based planner publishes data on a number of topics. The ROS package RViz is used in order to visualize map, voxels (free and occupied) and paths. The visualizer is launched in tmuxinator sessions in window rviz as:

rosrun rviz rviz -d ~/uav_ws/src/uav_frontier_exploration_3d/rviz/cartographer_and_frontier.rviz

In the sidebar you can add different displays. By default the UAV_NAMESPACE is set to "red" (as explained in the instruction guide), in the RViz you can visualize output topics:

  • /red/best_frontier_maker, type: Marker, colour: pink
  • /red/occupied_cells_vis_array, type: MarkerArray, colour: blue
  • /red/free_cells_vis_array, type: MarkerArray, colour: green
  • /red/frontier_cells_vis_array, type: MarkerArray, colour: red
  • /red/octomap_binary, type: Octomap

If you have installed the octomap plugin as described in the installation instructions, you should be able to visuaulize mentioned topics. Furthermore, add another display of type TF to display the coordinate frame of the robot relative to the map frame. This indicates the position of the robot. You can subscribe a display of type Marker or MarkerArray to your path topic to get information about the planning process.

In the figure below you can see house environment in both Gazebo simulator and RViz. Frontier points are marked red, candidates (clustered points) are yellow while the best frontier voxel is marked pink. The UAV planned a path (green) to the best frontier voxel (target point). OctoMap of the environment (/red/octomap_binary) is updated in each iteration.

Alternatively you can add the displays by selecting Add->By Topic and then choose the correct topic.

If you want to display in RViz already generated OctoMap from octomap folder run roscore and in the another terminal type:

cd octomap/ && rosrun octomap_server octomap_server_node octomap.binvox.bt

Run rviz:

rosrun rviz rviz

Set fixed frame to map.

Add the display by selecting Add->By display type->octomap_rviz_plugins->OccupancyGrid and choose /octomap_binary topic.

Clone this wiki locally