How to draw planes in Rviz ? I want to build a slam system based on planar features, but I don't know how to visualize planar features.
Rviz can by default visualize polygons (http://docs.ros.org/melodic/api/geometry_msgs/html/msg/PolygonStamped.html) which represent planes. If you want to visualize polygon arrays, you should look at the jsk recognition package (https://github.com/jsk-ros-pkg/jsk_recognition). It provides a message type for polygon arrays and a Rviz plugin for its visulization.