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

Some functions are not compatible with CasADi #10

Open
ziyonghan opened this issue Aug 1, 2024 · 3 comments
Open

Some functions are not compatible with CasADi #10

ziyonghan opened this issue Aug 1, 2024 · 3 comments

Comments

@ziyonghan
Copy link

Hi, Dr.Pat

Recent days, I try to use CasADi's symbolic framework to generate code, and I find that some functions like pluho and CMM are not compatible because the skew function goto the CasADi's inside same name function.

The function ID add some code to solve compatible problem at line 59.

How to solve the compatible problem in these functions?

Best,
Han

@ziyonghan
Copy link
Author

I have solved this problem temporarily, but I don't know if it is the best solution.

I comment out the skew function in GenericMatrixCommon.m, hope it helps.

Best,
Han

@pwensing
Copy link
Member

pwensing commented Aug 2, 2024

Hello Han,

Excellent.

One of my students faced a similar issue -- the patch fix they used was to re-name all instances of skew with a duplicate function named skew2. I don't love the name change to skew2 and so have not adopted that solution on main, but you can find it here: https://github.com/ROAM-Lab-ND/spatial_v2_extended/tree/CasADiConflictFree

I suspect the best option might be to reconfigure spatial_v2 as an importable package (similar to casadi) so that users can import functions of their choosing. This would require some directory rework, and also likely additional imports in each function, but I think it would avoid the collision you are facing. If you have any feedback on that path, I'd be happy to hear it / consider it.

@ziyonghan
Copy link
Author

Hi Dr.Pat,

My temporary solution may affect the nlp solving function of CasADi, which is what I want to try in the future.

However, it should be stated that if we want the spatial_v2 library to have better versatility on various robots, the skew function conflict problem needs to be solved.

Based on my limited knowledge, both package and class will be able to solve this function conflict problem, but this is a complex project that requires your professional knowledge to design the directory structure of the spatial_v2 library. However, if it can be done, it will indeed make this library more universal, extensible and compatible with other libraries.

Best,
Han

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

No branches or pull requests

2 participants