0
$\begingroup$

Rosanswers logo

I have a custom robot and have a URDF model of it set up in rviz. I have several Sonars and Sharp IR sensors mounted on it. I'm working my way toward using the navigation tools, how do I show my sensor readings in Rviz? Or am I heading in the wrong direction?


Originally posted by ringo42 on ROS Answers with karma: 55 on 2011-06-06

Post score: 1


Original comments

Comment by Chad Rockey on 2011-06-07:
So I've requested a new plugin in RVIZ! https://code.ros.org/trac/ros-pkg/ticket/4996 Hopefully this will be resolved soon. :)

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

Officially merged as sensor_msgs/Range with RVIZ Plugin: http://wiki.ros.org/rviz/DisplayTypes/Range


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.


Originally posted by Chad Rockey with karma: 4541 on 2011-06-06

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by Kartik Paigwar on 2018-06-14:
The github link is not active, can you repost the link please

Comment by Chad Rockey on 2018-06-14:
I updated the answer, but look here: http://wiki.ros.org/rviz/DisplayTypes/Range

$\endgroup$
0
$\begingroup$

Rosanswers logo

The NXT stack contains a plugin to display sonar messages in rviz. The sonar readings get displayed as a cone. See this page for more details.


Originally posted by Wim with karma: 2915 on 2011-06-06

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

I have just now committed a "Range" display to rviz. It is currently in trunk. In a few days we'll probably have a debian in ros-unstable, and when Electric releases, this should be included.

Thanks to Chad Rockey and Melonee Wise for the range display code.


Originally posted by hersh with karma: 1351 on 2011-07-15

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.