Skip to content

Creating MoveIt Plugins tutorial: fix namespace collision#492

Merged
rhaschke merged 2 commits intomoveit:masterfrom
JeroenDM:master
Jun 1, 2020
Merged

Creating MoveIt Plugins tutorial: fix namespace collision#492
rhaschke merged 2 commits intomoveit:masterfrom
JeroenDM:master

Conversation

@JeroenDM
Copy link
Copy Markdown
Contributor

@JeroenDM JeroenDM commented Jun 1, 2020

Description

When running the lerp_example.launch, I get the following warning:

ros.rosconsole_bridge.class_loader.impl: SEVERE WARNING!!! A namespace collision has occured with plugin factory for class lerp_interface::LERPPlannerManager. New factory will OVERWRITE existing one. This situation occurs when libraries containing plugins are directly linked against an executable (the one running right now generating this message). Please separate plugins out into their own library or just don't link against the library and use either class_loader::ClassLoader/MultiLibraryClassLoader to open.

I removed the linking of the example with the lerp plugin library, and removed lerp_planner_manager.cpp from the main library as it was compiled two times.

In addition the example contained an unused include statement.

#include <lerp_interface/lerp_planning_context.h>

I think these fixes also make it easier to understand the idea behind plugins. Not having to link it at compile time is the whole point of the plugin infrastructure, as far as I understand it at least.

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • While waiting for someone to review your request, please consider reviewing another open pull request to support the maintainers

@welcome
Copy link
Copy Markdown

welcome Bot commented Jun 1, 2020

Thanks for helping in improving MoveIt and open source robotics!

@JeroenDM
Copy link
Copy Markdown
Contributor Author

JeroenDM commented Jun 1, 2020

Also, I'm sorry for the ugly fix commit. I can fix it and force push to clean it up.
Edit: done.

Copy link
Copy Markdown
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. Thanks for the cleanup!

Copy link
Copy Markdown
Contributor

@ommmid ommmid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, planning_context does not need to be included in the example. Thanks for catching that.

@rhaschke rhaschke merged commit 553e536 into moveit:master Jun 1, 2020
@welcome
Copy link
Copy Markdown

welcome Bot commented Jun 1, 2020

Congrats on getting your first MoveIt pull request merged and improving open source robotics!

@rhaschke
Copy link
Copy Markdown
Contributor

rhaschke commented Jun 1, 2020

Just noticed that this was in the plugins example. What a shame!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants