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

using Casadi #3690

Open
tommasoandina1 opened this issue May 8, 2024 · 1 comment
Open

using Casadi #3690

tommasoandina1 opened this issue May 8, 2024 · 1 comment

Comments

@tommasoandina1
Copy link

Hi everyone,

I'm attempting to utilize the CasADi library for simulating robots, but I'm encountering numerous values that don't seem to make sense. For example, here's a segment of my code:

[[(((@135H_0)+(@139H_4))+(@145H_8)), (((@135H_1)+(@139H_5))+(@145H_9)), (((@135H_2)+(@139H_6))+(@145H_10)), (((@445H_0)+(@449H_4))+(@455H_8)), (((@445H_1)+(@449H_5))+(@455H_9)), (((@445H_2)+(@449H_6))+(@455H_10))]

I'm struggling to comprehend its meaning. My objective is to calculate the mean error of a desired vector compared to a vector I need to compute using the CasADi library. However, in the second vector, I'm obtaining numerous values like the ones above.

Could someone offer assistance?

Thanks.

@jaeandersson
Copy link
Member

It looks like a 3-by-2 matrix where each element is sum of three different symbolic expressions.

The "@..."etc variables define shared subexpressions, i.e. expressions that appear more than once in the printout. They should have been defined earlier in their printout. So for example if you have an expression like:

A = SOME_VERY_LONG_EXPRESSION

And then do say "A + A" it will be displayed as

@1 = SOME_VERY_LONG_EXPRESSION; [@1 + @1]

Instead of

[SOME_VERY_LONG_EXPRESSION + SOME_VERY_LONG_EXPRESSION]

When the expressions are deep, the difference between the two can grow exponentially.

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