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

rviz doesn't show custom plugin

asked 2014-05-10 00:40:40 -0500

Hansg91 gravatar image

Hey,

I created a plugin to show a mesh in rviz (basically an adaptation of the Polygon display). I had previously changed the source of the Polygon display to accept my message and display it as a mesh, this works fine. Then I wanted to export this plugin to my own package, however rviz doesn't seem to recognize it.

According to the tutorial, common problems are :

-Not having a plugin_description.xml (I have this located in the same package as the new plugin)

-Not exporting it in a package.xml file (I export it as follows:

<export>
    <rviz plugin="${prefix}/plugin_description.xml"/>
</export>

-Not properly referencing the library file from plugin_description.xml (I reference the path as

<library path="lib/librviz_plugin">

I reference the class as:

<class name="mesh_tools/Mesh" type="mesh::MeshDisplay" base_class_type="rviz::Display">

Which is inside the mesh_tools package. The class is called mesh::MeshDisplay and as is done for rviz::Polygon display, it has rviz::Display as base class. When I make everything, I do indeed get a devel/lib/librviz_plugin.so. The plugin_description.xml is not copied to the devel folder however. If I do catkin_make_isolated --install it will get copied, but rviz still can't see the display.

What can I do to debug this further? By the way, I am on Indigo with Ubuntu 14.04.

Best regards, Hans

edit retag flag offensive close merge delete

Comments

What is the output of rospack plugins --attrib=plugin rviz?

gvdhoorn gravatar image gvdhoorn  ( 2014-07-24 05:53:33 -0500 )edit

Just the rviz plugins and the rviz tutorial, not my plugin.

Hansg91 gravatar image Hansg91  ( 2014-08-01 10:09:03 -0500 )edit

Ok, do you have a run & build depend in your manifest on rviz? For me, rospack only shows my pkg when querying for rviz plugins if I declare a dependency on the rviz pkg.

gvdhoorn gravatar image gvdhoorn  ( 2014-08-05 04:48:53 -0500 )edit

Aha, I wasn't aware I needed the run dependency on rviz, that was indeed the issue. If you add it as an answer, I can approve it. Thanks!

Hansg91 gravatar image Hansg91  ( 2014-08-06 07:06:47 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2014-08-06 07:26:50 -0500

gvdhoorn gravatar image

Turns out the OP was missing a run_depend on package rviz, which caused the plugin not to show up (neither in RViz itself, nor in the output of rospack plugins).


Aha, I wasn't aware I needed the run dependency on rviz, that was indeed the issue

I'd say it kind-of makes sense for a plugin for RViz to have a run dependency on it :)

edit flag offensive delete link more

Comments

And it probably does make sense ;) oh well, lesson learned.

Hansg91 gravatar image Hansg91  ( 2014-08-06 08:41:39 -0500 )edit

As a final note: the requirement for the dependency on RViz is actually documented on the pluginlibwiki page:

Important Note: In order for the above export command to work properly, the providing package must depend directly on the package containing the plugin interface.

gvdhoorn gravatar image gvdhoorn  ( 2014-08-19 08:28:44 -0500 )edit

Perhaps it is worth noting there that it should be a run dependency? I had a build_depend on rviz, but that didn't cut it.

Hansg91 gravatar image Hansg91  ( 2014-08-19 14:56:41 -0500 )edit

The page shows an example manifest, with both a run and build depend. So I think that is already covered. I just kept my quote small.

gvdhoorn gravatar image gvdhoorn  ( 2014-08-19 16:20:15 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2014-05-10 00:40:40 -0500

Seen: 2,762 times

Last updated: Aug 06 '14