Giter Site home page Giter Site logo

pin.getJointJacobian about pinocchio HOT 10 CLOSED

LIUHAITAO-CH avatar LIUHAITAO-CH commented on June 18, 2024
pin.getJointJacobian

from pinocchio.

Comments (10)

fabinsch avatar fabinsch commented on June 18, 2024 1

In Pinocchio fixed joints are treated as frames. As stated in the docs.

Remark: In the URDF format, a joint of type fixed can be defined. However, a fixed joint is not really a joint because it cannot move. For efficiency reasons, it is therefore treated as operational frame of the model.

In your case you should use the functions getFrameId and getFrameJacobian if you want the Jacobian at what is called fr3_joint8 in your model.

from pinocchio.

LIUHAITAO-CH avatar LIUHAITAO-CH commented on June 18, 2024

image

from pinocchio.

fabinsch avatar fabinsch commented on June 18, 2024

Hi @LIUHAITAO-CH,
I think the problem might be coming from the variable end_frame. Could you check its value? and also check what value len(model.joints) has. If you use the model.getJointId and you provide a name of a joint that does not exist in the model, the function does not throw an error but the id you obtain is not correct and could like to an error later in your call to getJointJacobian.

from pinocchio.

LIUHAITAO-CH avatar LIUHAITAO-CH commented on June 18, 2024

Hi @LIUHAITAO-CH, I think the problem might be coming from the variable end_frame. Could you check its value? and also check what value len(model.joints) has. If you use the model.getJointId and you provide a name of a joint that does not exist in the model, the function does not throw an error but the id you obtain is not correct and could like to an error later in your call to getJointJacobian.

Hello @fabinsch ,
the picture is my urdf file
image

I think what you said is right .the result of end_frame = model.getJointId("fr3_joint8") is 8;but the fr3_joint8 is fixed joint.
I replaced fr3_joint8 with fr3_joint7,the result is ok.
thanks,and could you tell me the why?

from pinocchio.

LIUHAITAO-CH avatar LIUHAITAO-CH commented on June 18, 2024

ok, @fabinsch ,thanks your advices,i understand what you said,
but I have an new question:

Did they all use pin.computeJointJacobians(model, data, q) with model.getJointIdmodel.getFrameIdpin.getJointJacobianand pin.getFrameJacobian ,could we use pin.computeFrameJacobian(model, data, q)

from pinocchio.

fabinsch avatar fabinsch commented on June 18, 2024

Yes, you can choose the way that is better for your application. Please have a look at the docstrings of these functions:

pin.getFrameJacobian?
Docstring:
getFrameJacobian( (Model)model, (Data)data, (int)frame_id, (ReferenceFrame)reference_frame) -> numpy.ndarray :
    Computes the Jacobian of the frame given by its ID either in the local or the world frames.
    The columns of the Jacobian are expressed in the LOCAL frame coordinates system.
    In other words, the velocity of the frame vF expressed in the local coordinate is given by J*v,where v is the joint velocity.
    computeJointJacobians(model,data,q) and updateFramePlacements(model,data) must have been called first.
Type:      function

You can use this if you need more than just the Jacobian of the end-effector. Remember to call updateFramePlacements as stated here.

If you only need the Jacobian of the end-effector, it might be better to use

pin.computeFrameJacobian?
Docstring:
computeFrameJacobian( (Model)model, (Data)data, (numpy.ndarray)q, (int)frame_id, (ReferenceFrame)reference_frame) -> numpy.ndarray :
    Computes the Jacobian of the frame given by its frame_id in the coordinate system given by reference_frame.
    

computeFrameJacobian( (Model)model, (Data)data, (numpy.ndarray)q, (int)frame_id) -> numpy.ndarray :
    Computes the Jacobian of the frame given by its frame_id.
    The columns of the Jacobian are expressed in the coordinates system of the Frame itself.
    In other words, the velocity of the frame vF expressed in the local coordinate is given by J*v,where v is the joint velocity.
Type:      function

from pinocchio.

LIUHAITAO-CH avatar LIUHAITAO-CH commented on June 18, 2024

thank you for your reply @fabinsch

I think that i can get getJointJacobian getFrameJacobian by computeJointJacobians ,
pin.computeJointJacobians(model, data, q_random)
Joint7_jacobian = pin.getJointJacobian(model, data, Joint7, pin.LOCAL)
end_jacobian = pin.getFrameJacobian(model, data, end_frame, pin.LOCAL)

and i can directly get frame jacobian by computeFrameJacobian,without pin.getFrameJacobian
end_jacobian_ = pin.computeFrameJacobian(model, data, q_random, end_frame, pin.LOCAL)

and i have a question

  1. Joint7_jacobian = pin.getJointJacobian(model, data, Joint7, pin.LOCAL)means the jacobian matrix of joint7 versus joint 0 (base)? pin.WORLD means what?

  2. should updateFramePlacements(model,datata)appear with computeJointJacobians(model,data,q)?and During the control, they have to refresh every control cycle, right?

thank you very much

from pinocchio.

LIUHAITAO-CH avatar LIUHAITAO-CH commented on June 18, 2024

thank you for your reply @fabinsch

I think that i can get getJointJacobian getFrameJacobian by computeJointJacobians , pin.computeJointJacobians(model, data, q_random) Joint7_jacobian = pin.getJointJacobian(model, data, Joint7, pin.LOCAL) end_jacobian = pin.getFrameJacobian(model, data, end_frame, pin.LOCAL)

and i can directly get frame jacobian by computeFrameJacobian,without pin.getFrameJacobian end_jacobian_ = pin.computeFrameJacobian(model, data, q_random, end_frame, pin.LOCAL)

and i have a question

  1. Joint7_jacobian = pin.getJointJacobian(model, data, Joint7, pin.LOCAL)means the jacobian matrix of joint7 versus joint 0 (base)? pin.WORLD means what?
  2. should updateFramePlacements(model,datata)appear with computeJointJacobians(model,data,q)?and During the control, they have to refresh every control cycle, right?

thank you very much

@fabinsch hello,can you help me answer this question? thsnks

from pinocchio.

stephane-caron avatar stephane-caron commented on June 18, 2024

Hi @LIUHAITAO-CH,

I noticed that you have bumped this thread. While we appreciate your interest in this discussion, bumping threads puts pressure on fellow Pinocchio users who are answering on their free time.

Instead, consider asking only one question at a time, and when asking, show that you have done your research. For instance, when you ask:

pin.WORLD means what?

Add some quotes from the parts of the Pinocchio documentation where you have searched, and then only, ask for clarifications if anything is unclear. This approach is more constructive and will help you get better feedback.

In the same spirit, make sure you open a separate discussion for each new single question.

from pinocchio.

LIUHAITAO-CH avatar LIUHAITAO-CH commented on June 18, 2024

Hi @LIUHAITAO-CH,

I noticed that you have bumped this thread. While we appreciate your interest in this discussion, bumping threads puts pressure on fellow Pinocchio users who are answering on their free time.

Instead, consider asking only one question at a time, and when asking, show that you have done your research. For instance, when you ask:

pin.WORLD means what?

Add some quotes from the parts of the Pinocchio documentation where you have searched, and then only, ask for clarifications if anything is unclear. This approach is more constructive and will help you get better feedback.

In the same spirit, make sure you open a separate discussion for each new single question.

ok,thanks,i try

from pinocchio.

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.