Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rqt cannot find plugin after changing ROS_PACKAGE_PATH #90

Closed
bit-pirate opened this issue Nov 5, 2013 · 15 comments
Closed

rqt cannot find plugin after changing ROS_PACKAGE_PATH #90

bit-pirate opened this issue Nov 5, 2013 · 15 comments
Labels

Comments

@bit-pirate
Copy link

For no obvious reason the rqt plugin I'm using (i.e. rqt_capabilities) suddenly stopped working with this error:

qt_gui_main() found no plugin matching "rqt_capabilities"

Removing the rqt gui config as described in this answer solved this issue.

Is this supposed to happen?

@dirk-thomas
Copy link
Contributor

Did you changed the location where the rqt_capabilities package was located (e.g. switching from debs to a source checkout or moving a source package)?

@wjwwood
Copy link
Member

wjwwood commented Nov 5, 2013

You ran rqt in an environment with rqt_capabilities and then again in one without it, so the cache of rqt expected to find rqt_capabilities but couldn't.

At least that's my theory.

@bit-pirate
Copy link
Author

@dirk-thomas No.

@wjwwood I would say no, but I'm not 100% sure. I also couldn't reproduce the error following your description. Btw, I'm always using rosrun rqt_capabilities rqt_capabilities. So, I'm unable to run that plugin in an environment without it anyway.

@dirk-thomas
Copy link
Contributor

Is the problem still there when you invoke it with --force-discover? (Please also post the version numbers of qt_gui_core and rqt.)

@bit-pirate
Copy link
Author

I'll try this, once I run into this bug again. I currently don't know how to reproduce this.

@bit-pirate
Copy link
Author

Is the problem still there when you invoke it with --force-discover?

No. This fixes it.

Please also post the version numbers of qt_gui_core and rqt.

qt_gui_core: 0.2.18-0precise-20131015-2036-+0000
rqt: not installed (ros-hydro-rqt)
rqt_gui: 0.2.18-0precise-20131015-2036-+0000

@dirk-thomas
Copy link
Contributor

rqt (since a very recent version) caches the list and location of found plugins. It does that to improve the start-up time significantly. That means for 24h it reuses the previous discovery. If you add packages in the meantime rqt will not recrawl the filesystem and therefore not find them (until the cache expires or you invoke the program with the --force-discover option).

Can you please clarify what you did to run into the issue? You descriptions says that it was working before and suddenly stopped working. Did you do anything in between like source a different environment, change ROS_PACKAGE_PATH, add/remove/move packages?

@bit-pirate
Copy link
Author

Can you please clarify what you did to run into the issue? You descriptions says that it was working before and suddenly stopped working. Did you do anything in between like source a different environment, change ROS_PACKAGE_PATH, add/remove/move packages?

That was it! I'm using multiple workspaces. Switching between them can cause the mentioned error, if the cache has been initialised in workspace, which does not contain the plugin you are trying to load.

Maybe a quick fix would be showing a warning/info, which suggests to try --force-discover, when this error pops up?

@markpitchless
Copy link

I tend to use multiple workspaces as well, I was constantly getting the problem. A warning would be a good idea. Also a config option that turns off the cache so rqt always discovers on startup would be nice.

@DorianScholz
Copy link
Member

Well, the config option that turns off the cache is there: --force-discover
For making the multiple workspace scenario work better, I would suggest making the plugin cache dependent on the current ROS_PACKAGE_PATH.
So the cache file should contain a dictionary of plugin caches, one for each set of paths.

@markpitchless
Copy link

I was thinking something in ~/.rviz/config so I don't have to add --force-discover on every invocation.
Although I can just alias rqt='rqt --force-discover' to get that.

@DorianScholz
Copy link
Member

I've made a working example of using different plugin manager caches depending on the current ROS_PACKAGE_PATH in the branch "plugin_cache_prefix":
ros-visualization/qt_gui_core@231cfb1
0a0c180

It works for me, please test and comment.

@dirk-thomas
Copy link
Contributor

+1 please create pull requests for those two branches. I will merge and release likely today since this is a pretty nasty bug.

@dirk-thomas
Copy link
Contributor

@bit-pirate @markpitchless Can you please try the latest version from the git repos for qt_gui_core and rqt and confirm that they fix the issue for you when you switch between different environments?

@dirk-thomas
Copy link
Contributor

Closing the ticket since it is assumed that the latest changes fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants