Officially merged as sensor_msgs/Range with RVIZ Plugin: http://wiki.ros.org/rviz/DisplayTypes...
Old answer:
Hi, in order to display sonars in RVIZ, you could modify the nxt_rviz_plugin on your own or use the one we've already modified. Our repository is (https://github.com/cwru-robotics/smart_wheelchair) and the relevant package is range_rviz_plugin. An example view of this plugin is available here on my youtube.
If you download the range_rviz_plugin and then rosmake range_rviz_plugin
, it will be available in RVIZ under "Plugins -> Manage" and then make sure it's selected. It should then be available in the normal way "Add" -> "New Display", etc.
The way we've designed the plugin to work, you should publish sensor_msgs/Range messages on a common topic for each division you care about. For instance, I read all of my sonars in serial order to minimize read errors and publish each of these on /sonars. The way I tell the sonars apart is through the transform frame_ids, and I rely on tf to transform the range data for my other nodes. I have 6 sonars, so I set Buffer Length to 6 so that each of my sonars is always visible.
I would recommend you publish your sonars on one topic and then at least one other topic for your IR rangers.