ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

how do i get rviz to recognize my plugin?

asked 2017-04-24 13:51:53 -0500

Rich von Lehe gravatar image

Taken from my question here:

I am missing something as I struggle to get the tutorial rviz plugin to show up within rviz. I have the source for the visualization_tutorials. Within that git repo, there is the rviz_plugin_tutorials. I can successfully build this within a ROS workspace, with the output showing up in rviz_workspace/devel/lib as

I have read that rviz uses pluginlib to load plugins that have the appropriate plugin_description.xml and use the PLUGINLIB_EXPORT_CLASS macro appropriately.

I don't understand how this mechanism is supposed to work. After building the plugin, all you have are the library (.so file) and the package and plugin .xml files. How is running 'rosrun rviz rviz' supposed to allow rviz to find this new library and plugin description file? That's my fundamental misunderstanding. I don't see the tutorial plugin when I run rviz and running rospack doesn't show the tutorial plugin:

honeywell@UGV-Laptop-1:~/rviz_workspace$ rospack plugins --attrib=plugin rviz rviz /opt/ros/kinetic/share/rviz/plugin_description.xml honeywell@UGV-Laptop-1:~/rviz_workspace$

Thanks for any help

EDIT: rviz is running from /opt/ros/kinetic/bin/rviz. Am I supposed to copy my plugin_description.xml and somewhere other than where the workspace has them?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-04-24 15:17:24 -0500

Rich von Lehe gravatar image

updated 2017-04-25 03:47:54 -0500

gvdhoorn gravatar image

Answered my own question at the stackoverflow link. It was a rookie mistake.

From SO:

Rookie mistakes being made here by me. I did two things to solve my problem, then realized only one was needed.

1) Installed rviz source and built it. After doing this and performing 'rosrun rviz rviz' the problem still remained. No new plugin.

2) Realized I had not sourced devel/setup.bash for this workspace. Doing this and then running rviz produced the desired results.

I went back and removed rviz from src and removed the devel folder and it all still worked, so it seems it's not necessary to work with rviz built from source.

edit flag offensive delete link more


I've edited your question to include the text from your answer over at SO. This way future readers don't need to site-hop to understand what the problem (and the solution) was.

gvdhoorn gravatar image gvdhoorn  ( 2017-04-25 03:48:34 -0500 )edit

Thanks for reporting what your eventual solution was btw, much appreciated.

gvdhoorn gravatar image gvdhoorn  ( 2017-04-25 03:48:51 -0500 )edit

Question Tools

1 follower


Asked: 2017-04-24 13:51:53 -0500

Seen: 2,863 times

Last updated: Apr 25 '17