Ask Your Question
0

Created rviz plugins don't show up on rviz plugin selector

asked 2021-08-20 05:41:43 -0500

katsostak gravatar image

updated 2022-05-01 13:15:19 -0500

lucasw gravatar image

I want to write a plugin for rviz. As a first step in this process, I tried to follow the tutorial below in order to have a base level plugin to work on in order to develop my own.

http://docs.ros.org/en/melodic/api/rv... (note that this link is listed on http://wiki.ros.org/rviz_plugin_tutor...)

However, I can't get any of these tutorials to work, I have tried other laptops with their ubuntu partition and it still doesn't work. I have also used the following plugin packages, and while no error was printed on the console, the plugin name would not show up on the selector on rviz, only the teleop plugin would show up (but I think this is a built in feature).

https://github.com/ros-visualization/...

Info: I am using ROS Melodic on Ubuntu 18.04.5 LTS (Bionic Beaver). The files I have used are exclusively the ones in the links above. I can provide additional information if necessary.

edit retag flag offensive close merge delete

Comments

Just to check: did you source /path/to/your/catkin_ws/devel/setup.bash after building your workspace?

Without that, any plugins built from source in your Catkin workspace will not be picked up.

gvdhoorn gravatar image gvdhoorn  ( 2021-08-22 02:02:34 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2021-08-22 09:16:47 -0500

Mike Scheutzow gravatar image

The tutorial you linked appears to be for an older version of ros, so some of it is out of date, and the important setup.bash step is not even mentioned.

You should download the git source code, build it, and see it work before you try to create something custom. Also, make sure you do not have the tutorial apt package installed from the ros repository, because it will be difficult to tell which code you are actually executing. For me, the following created a working demo on melodic:

# it is ok if purge wants to also remove pkg ros-melodic-desktop
sudo apt purge ros-melodic-rviz-plugin-tutorials
mkdir -p ~/catkin_ws_plugin/src
cd ~/catkin_ws_plugin/src
git clone https://github.com/ros-visualization/visualization_tutorials
cd visualization_tutorials
git checkout -b melodic 0.10.5
cd ../..
catkin_make
source devel/setup.bash
rosrun rviz rviz
edit flag offensive delete link more

Comments

Thank you for your answer, could you be a bit more specific as to what your working demo looks like after running this? If you look at the plugin_descriptoon.xml file in rviz_plugin_tutorials/src you will notice that three plugins (Teleop, Imu, PlantFlag) should show up on the "Add New panel" panel, do Teleop, Imu, and plantflag show up for you after running that? If not how do I get them to show up?

On another note, Changing the description of the Teleop plugin does change its description on the plugin selector, so I think that only the Teleop plugin out of the three shows up but I don't know what is causing this

katsostak gravatar image katsostak  ( 2021-08-23 03:59:28 -0500 )edit

rviz appears to have 3 different styles of plugin, and this demo shows each of them. One is accessed using the "Add" button at the bottom of the "Displays" panel on the left, one is added by menu item Panel | Add New Panel, and the last is added by the blue plus symbol at the right end of the toolbar.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-08-23 07:50:20 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2021-08-20 05:41:43 -0500

Seen: 106 times

Last updated: Aug 22 '21