Comments (5)
This looks weird.
Failing to reproduce since my Eigen installation is not happy with using casadi::SX
as template argument for Quaternion.
Can you report back what these print:
casadi::uout() << sum << std::endl;
casadi::uout() << grad << std::endl;
casadi::uout() << quat_casadi << std::endl;
from casadi.
Sorry for the confusion.
I realized that I was using some private implementation defined in other third party library (https://github.com/stack-of-tasks/pinocchio/blob/pinocchio3-preview/src/autodiff/casadi/math/quaternion.hpp).
Since this issue is not reproducible, I will close the issue.
Just for my education purpose, if I see no viable conversion from 'casadi::Matrix<casadi::SXElem>' to 'bool' if (t > Scalar(0))
kind of issue, do I have two options - (1) reimplement the expression with SX
or (2) use custom Callback
? Or is there any other workaround?
from casadi.
I'm still interested in seeing those outputs; it's still a bug of some sort. Flow control like this is not supported. You could specialize to use if_else
with SX instead.
from casadi.
Thanks!
Here is the output
sum
@1=1, @2=2, @3=(@2*quat_1), @4=(@3*quat_1), @5=(@2*quat_2), @6=(@5*quat_2), @7=(@1-(@4+@6)), @8=(@2*quat_0), @9=(@8*quat_0), @10=(@1-(@9+@6)), @11=(@1-(@9+@4)), @12=(@7+(@10+@11)), @13=(0<@12), @14=(@5*quat_1), @15=(@8*quat_3), @16=(@14+@15), @17=(@14-@15), @18=0.5, @19=sqrt((@12+@1)), @20=(@18/@19), @21=(@7<@10), @22=((@21&&(@10<@11))||(@7<@11)), @23=(@5*quat_0), @24=(@3*quat_3), @25=(@23+@24), @26=(@23-@24), @27=sqrt((((@11-@7)-@10)+@1)), @28=(@18/@27), @29=(@3*quat_0), @30=(@5*quat_3), @31=(@29-@30), @32=(@29+@30), @33=sqrt((((@10-@11)-@7)+@1)), @34=(@18/@33), @35=sqrt((((@7-@10)-@11)+@1)), @36=(@18/@35), (((((@13?((@16-@17)*@20):0)+((!@13)?((@22?((@25+@26)*@28):0)+((!@22)?((@21?((@31+@32)*@34):0)+((!@21)?(@18*@35):0)):0)):0))+((@13?((@25-@26)*@20):0)+((!@13)?((@22?((@17+@16)*@28):0)+((!@22)?((@21?(@18*@33):0)+((!@21)?((@32+@31)*@36):0)):0)):0)))+((@13?((@32-@31)*@20):0)+((!@13)?((@22?(@18*@27):0)+((!@22)?((@21?((@16+@17)*@34):0)+((!@21)?((@26+@25)*@36):0)):0)):0)))+((@13?(@18*@19):0)+((!@13)?((@22?((@32-@31)*@28):0)+((!@22)?((@21?((@25-@26)*@34):0)+((!@21)?((@16-@17)*@36):0)):0)):0)))
grad
@1=2, @2=(@1*quat_1), @3=1, @4=(@2*quat_1), @5=(@1*quat_2), @6=(@5*quat_2), @7=(@3-(@4+@6)), @8=(@1*quat_0), @9=(@8*quat_0), @10=(@3-(@9+@6)), @11=(@7<@10), @12=(@3-(@9+@4)), @13=((@11&&(@10<@12))||(@7<@12)), @14=(@7+(@10+@12)), @15=(0<@14), @16=(!@15), @17=0.5, @18=sqrt((((@12-@7)-@10)+@3)), @19=(@17/@18), @20=sqrt((@14+@3)), @21=(@17/@20), @22=(!@11), @23=(!@13), @24=(!@15), @25=sqrt((((@7-@10)-@12)+@3)), @26=(@17/@25), @27=(!@13), @28=(!@15), @29=sqrt((((@10-@12)-@7)+@3)), @30=(@17/@29), @31=((((@13?(@16?@19:0):0)+(@15?@21:0))+(@22?(@23?(@24?@26:0):0):0))+(@11?(@27?(@28?@30:0):0):0)), @32=((((@13?(@16?(-@19):0):0)+(@15?(-@21):0))+(@22?(@23?(@24?@26:0):0):0))+(@11?(@27?(@28?@30:0):0):0)), @33=(@31+@32), @34=(!@13), @35=(!@11), @36=(!@13), @37=(!@15), @38=((((@11?(@34?(@16?(-@30):0):0):0)+(@35?(@36?(@37?@26:0):0):0))+(@15?(-@21):0))+(@13?(@28?@19:0):0)), @39=((((@11?(@34?(@16?@30:0):0):0)+(@35?(@36?(@37?@26:0):0):0))+(@15?@21:0))+(@13?(@28?@19:0):0)), @40=(@38+@39), @41=(@5*quat_0), @42=(@2*quat_3), @43=(@41+@42), @44=(@41-@42), @45=(@5*quat_1), @46=(@8*quat_3), @47=(@45+@46), @48=(@45-@46), @49=(@2*quat_0), @50=(@5*quat_3), @51=(@49-@50), @52=(@49+@50), @53=(((@23?(@24?@17:0):0)-((@30/@29)*(((@34?(@16?(@43-@44):0):0)+(@36?(@37?(@47+@48):0):0))+(@27?(@28?(@51+@52):0):0))))/(@29+@29)), @54=(!@11), @55=((((!@11)?(@27?(@28?@17:0):0):0)-((@26/@25)*(((@54?(@34?(@16?(@47-@48):0):0):0)+(@35?(@36?(@37?(@44+@43):0):0):0))+(@22?(@23?(@24?(@52+@51):0):0):0))))/(@25+@25)), @56=(((@37?@17:0)-((@19/@18)*(((@16?(@52-@51):0)+(@24?(@48+@47):0))+(@28?(@43+@44):0))))/(@18+@18)), @57=((@17-((@21/@20)*(((@52-@51)+(@43-@44))+(@47-@48))))/(@20+@20)), @58=((((@11?(-@53):0)-@55)+(@13?@56:0))+(@15?@57:0)), @59=((((@11?@53:0)-@55)+(@13?(-@56):0))+(@15?@57:0)), @60=(@58+@59), @61=((((@54?(@34?(@16?@26:0):0):0)+(@11?(@36?(@37?@30:0):0):0))+(@13?(@24?@19:0):0))+(@15?@21:0)), @62=((((@54?(@34?(@16?(-@26):0):0):0)+(@11?(@36?(@37?@30:0):0):0))+(@13?(@24?@19:0):0))+(@15?(-@21):0)), @63=(@61-@62), @64=(@62+@61), @65=(((@55+(@11?(-@53):0))+(@13?(-@56):0))+(@15?@57:0)), @66=(@58+@65), @67=(@39-@38), @68=(@31-@32), @69=(@59+@65), [((((@2*@33)+(@5*@40))-(@8*@60))+(@1*((quat_3*@63)-(quat_0*@60)))), (((@5*@64)-(@2*@66))+(@1*(((quat_0*@33)+(quat_3*@67))-(quat_1*@66)))), ((@1*((((quat_3*@68)+(quat_0*@40))+(quat_1*@64))-(quat_2*@69)))-(@5*@69)), (((@5*@68)+(@2*@67))+(@8*@63))]
quat_casadi
[quat_0, quat_1, quat_2, quat_3]
from casadi.
I see, it must be #1878
from casadi.
Related Issues (20)
- compact dense sparsity patterns HOT 3
- Symmetric jacobian with MX
- pseudo MX optimizations HOT 1
- Add inlining MX call to SXFunction HOT 1
- undefined symbol: _ZN6casadi10differenceERKSt6vectorINS_2MXESaIS1_EES5_ HOT 11
- Performance difference between CasADi 3.5.5 and 3.6.4 HOT 4
- jtimes corner case
- Build Model error C2065: 'mxIsChar_is_not_supported_in_Simulink_Coder'
- Performance Degradation with Multithreading in Parametric Trajectory Optimization HOT 2
- MATLAB Coder meets CasADi codegen - macos - MEX, dylib, path error
- Fix fatrop printing
- undefined reference to `casadi::difference` when building in windows/mingw HOT 1
- Graceful failure when trying to load a co-simulation only FMU
- Using rootfinder object inside optimization fails HOT 2
- (Installation help) Python casadi, module not found _casadi on Ubuntu
- timer reset missing?
- missing .so file HOT 5
- Fix numpy compat
- interface with HiGHS
- unable to specify generation directory with Function.generate HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from casadi.