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

Cannot create IKSolvers if compiled with clang - fine with gcc #99

Open
wxmerkt opened this issue Oct 31, 2022 · 2 comments
Open

Cannot create IKSolvers if compiled with clang - fine with gcc #99

wxmerkt opened this issue Oct 31, 2022 · 2 comments
Labels
bug Something isn't working ROS1

Comments

@wxmerkt
Copy link

wxmerkt commented Oct 31, 2022

Hi,
Many thanks for putting such a great package together! I am currently exploring it and have noticed a curious issue: If I compile the package with clang-10, I cannot load the IKSolver plugins (controllers fail by pluginlib not being able to create ForwardDynamicsSolver 'as no factory exists for it'). If I compile the package using gcc-9, the examples launch fine and work as intended. Other packages using pluginlib (e.g., ROS-Control and some of our custom packages) work fine and do not exhibit this behaviour of failing to load classes.

Software versions

  • Commit: a115bfd9987d56061912ea4916cf65d2e5b7761b
  • OS: Ubuntu 20.04
  • ROS version: ROS1 Noetic
  • Robot: This can be reproduced with the examples.launch in the cartesian_controllers_examples package

To Reproduce

  1. Compile the workspace with clang-10 and run the examples. It will show:
[ERROR] [1667228721.508541562]: MultiLibraryClassLoader: Could not create object of class type cartesian_controller_base::ForwardDynamicsSolver as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()
  1. To circumvent, by placing set(CMAKE_CXX_COMPILER "g++") in the CMakeLists and recompiling (or setting it to the catkin config --cmake-args), it works as intended

Given that other packages using pluginlib do not exhibit this issue, is there something in the implementation that may get compiled incorrectly (or optimised out / stripped?) by clang?

@stefanscherzinger
Copy link
Contributor

Thanks @wxmerkt for your feedback and for spotting this issue! That's interesting. I'm not sure what happens there, but I'll try to reproduce this and start debugging.

@stefanscherzinger
Copy link
Contributor

@wxmerkt

I looked into it shortly a while ago. I can reproduce this robustly, see also #104. Unfortunately, I won't find the time to debug this further anytime soon. My current hope is that this issue is either not too relevant for you, or you might have the time to debug this yourself. As always, PRs are highly welcome ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ROS1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants