Giter Site home page Giter Site logo

Comments (4)

pariterre avatar pariterre commented on August 29, 2024

Dear @jfslin

  1. The short answer is a "segment" in biorbd is translated into N-Degrees-of-freedom bodies into rbdl. Meaning that you always get as many Bodies as you have degrees of freedom. I therefore suspect you have segments that declares more than one translations or rotations. To get the "segment" value, you simply take the last one for that particular segment. For instance, if your model has 3 segments (all of them declaring 2 rotations), then the AM of the second segment is the 4th row (second being the values for the 1st segment and last being the values for the last segment). This is a bit confusing, but there is no easy workaround for this as sometimes you would need intermediate values.

  2. There is no internal way to do that, but you can of course recompute the AM to be evaluated anywhere you want using the parallel axis theorem.

Cheers!

from biorbd.

jfslin avatar jfslin commented on August 29, 2024

@pariterre Thank you for the quick response!

  1. Ah:
mdl = ik.model
mdl.nbQ()
Out[3]: 47

There, that's the 47. Okay. So "segment" in this case is referring to joints/reference frames etc., while nbSegments() gives me the number of rigid bodies that makes up my model.

  1. Thanks for including the bit about the parallel axis theorem. I was wondering if that was sufficient. So to recap, I should run CalcSegmentsAngularMomentum, keep only the vectors that are at the end of the body's "chain" for the cases of concentric joints, then use CoMbySegment and the segment masses to move all the individual AMs to the contact point in question via parallel axis theorem.

Perfect. I will get on that. Thank you.

from biorbd.

pariterre avatar pariterre commented on August 29, 2024

Yup, sounds good, the only thing about 2) is that you probably willl have to rotate the AM after transporting, unless you want it aligned with the global reference frame!

from biorbd.

jfslin avatar jfslin commented on August 29, 2024

Noted. Thanks a lot for your help.

from biorbd.

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.