-
Notifications
You must be signed in to change notification settings - Fork 23
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
[trac_ik_python]: Add suport for ROS 2 #5
base: ros2
Are you sure you want to change the base?
Conversation
Thanks for opening this PR! I have some minimal progress in #4 that I can fold into this too, do you mind if I push commits to this branch? About the actual problem you're facing, I should have some time to investigate into this over the next couple of days. I will report back once I understand how SWIG actually works. I suspect the problem is something to do with the |
Well, I experimented a little bit and it seems that the include: "%include <trac_ik/trac_ik.hpp>" in trac_ik_wrap.i already confuses swig. If I comment this line I can get the package compile but of course, the wrapper is incomplete. |
I wonder whether it's because I didn't export things correctly on the |
Ok so I have tried some various things and it seems that the TRAC_IK namespace may be a problem (https://stackoverflow.com/questions/15778870/swig-namespace-error-not-a-valid-base-class) a namespace with the same name as the class may create problems. |
Apologies for the lack of activity here. NamespacingWasn't it always like this though? As in, even in the ROS 1 package, the namespace was still like this no? I'm not sure what would cause a regression here. 😕 Visibility controlYes, the visibility control macros were introduced because ROS 2 treats the Windows platform as a first class citizen, so I wanted this package to be cross-platform. Do you mind checking if this recommendation is actionable and/or relevant for the swig stuff happening in this package? https://sourceforge.net/p/swig/mailman/message/35356996/ I will also be looking at it over the weekend hopefully, so don't feel pressed! |
trac_ik_python bindings:
I now stumble upon a SWIG error:
This warning: "trac_ik/trac_ik_python/swig/trac_ik_wrap.i:298: Warning 303: %extend defined for an undeclared class TRAC_IK::TRAC_IK."
probably leads to the cascade of errors I got:
"build/trac_ik_python/CMakeFiles/_trac_ik_wrap.dir/trac_ik_wrapPYTHON_wrap.c:13463:24: error: ‘temp’ was not declared in this scope
13463 | TRAC_IK_PUBLIC * temp;" ...
My understanding is that SWIG does not find the TRAC_IK class, maybe due to a namespace problem?
I tried with a very basic trac_ik_wrap.i with just the include to expose the class and got the same error.