Giter VIP home page Giter VIP logo

Comments (9)

naveenoid avatar naveenoid commented on August 15, 2024

I will work on it. After this afternoon.

from mex-wholebodymodel.

DanielePucci avatar DanielePucci commented on August 15, 2024

Hi guys, this is of fundamental importance. We are currently mounting the inverse kinematics in Simulink, and we need dynamic quantities evaluated at the desired configurations. On one hand, some simulink blocks (e.g. jacobians) cannot be evaluated in other points than the state, since they do not take it as input @jeljaik. On the other hand, this bug forbids tests of an mex-wholebody model implementation.

May we try to address it ASAP?

from mex-wholebodymodel.

naveenoid avatar naveenoid commented on August 15, 2024

Just to understand better : The fix using reshape( ) in the relevant wbm_ wrappers is insufficient? Or is it incorrect?

from mex-wholebodymodel.

traversaro avatar traversaro commented on August 15, 2024

As far I can see, reshape is simply mapping the n x n matrix to a n^2 double vector using a column-major ordering (so you get a vector similar to how the matrix is actually displayed in memory:

>> A = [1,2;3,4]   

A =

     1     2
     3     4

>> reshape(A,[],1)

ans =

     1
     3
     2
     4

However, the data in the wbi::Rotationis stored using the classical C-Style row major ordering, i.e. in memory the data is stored as :

double mat[2][2];
mat[0][0] = 1.0;
mat[0][1] = 2.0;
mat[1][0] = 3.0;
mat[1][1] = 4.0;

double * p_mat = mat;
assert(p_mat[0] == 1.0);
assert(p_mat[1] == 2.0);
assert(p_mat[2] == 3.0);
assert(p_mat[3] == 4.0);

See https://en.wikipedia.org/wiki/Row-major_order .

from mex-wholebodymodel.

naveenoid avatar naveenoid commented on August 15, 2024

Please check da6ceda

All tests are passing. ( @traversaro, @DanielePucci , @gabrielenava)

from mex-wholebodymodel.

traversaro avatar traversaro commented on August 15, 2024

@naveenoid I guess da6ceda solve the first point of the issue, but not the second ( Change all the code that is assuming the wrong behavior). @gabrielenava

from mex-wholebodymodel.

naveenoid avatar naveenoid commented on August 15, 2024

yes thats right. I can check the @gabrielenava code if one of you gives me a quick overview. I can help maintain it from now on.

from mex-wholebodymodel.

gabrielenava avatar gabrielenava commented on August 15, 2024

I fixed the original and the joint space balancing controller. I don't think there are other functions that assume the wrong behaviour. I also tested the balancing and it seems that everything is working fine.

from mex-wholebodymodel.

naveenoid avatar naveenoid commented on August 15, 2024

I am closing this for now since its completely addresses.

from mex-wholebodymodel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.