Comments (10)
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.
from pinocchio.
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.
Hi @LIUHAITAO-CH, I think the problem might be coming from the variable
end_frame
. Could you check its value? and also check what valuelen(model.joints)
has. If you use themodel.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 togetJointJacobian
.
Hello @fabinsch ,
the picture is my urdf file
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.
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.getJointId
、 model.getFrameId
、 pin.getJointJacobian
and pin.getFrameJacobian
,could we use pin.computeFrameJacobian(model, data, q)
from pinocchio.
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.
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
-
Joint7_jacobian = pin.getJointJacobian(model, data, Joint7, pin.LOCAL)
means the jacobian matrix of joint7 versus joint 0 (base)? pin.WORLD means what? -
should
updateFramePlacements(model,datata)
appear withcomputeJointJacobians(model,data,q)
?and During the control, they have to refresh every control cycle, right?
thank you very much
from pinocchio.
thank you for your reply @fabinsch
I think that i can get
getJointJacobian
getFrameJacobian
bycomputeJointJacobians
,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
,withoutpin.getFrameJacobian
end_jacobian_ = pin.computeFrameJacobian(model, data, q_random, end_frame, pin.LOCAL)and i have a question
Joint7_jacobian = pin.getJointJacobian(model, data, Joint7, pin.LOCAL)
means the jacobian matrix of joint7 versus joint 0 (base)? pin.WORLD means what?- should
updateFramePlacements(model,datata)
appear withcomputeJointJacobians(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.
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.
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)
- Compatibility with older Boost versions on Windows HOT 4
- `getJointJacobian` works weirdly for independent robots HOT 1
- Call non-static member function isNormalized() in static function integrate_impl() HOT 4
- computecollisions() missing from ros humble installation HOT 7
- VS Tools installation bug HOT 1
- Parent frame of GeometryObject changes after calling BuildReducedModel HOT 7
- ImportError: cannot import name 'casadi' from 'pinocchio' HOT 2
- Create model with uncertainty (unkown paramters that can be updated online)
- Incomplete Function Auto-Completion and highlight in VSCode after Installing Pinocchio via Conda HOT 10
- Add arm64 macOS wheels to releases HOT 4
- Possible unnecessary computation in computeMinverse HOT 5
- Linux ROS CI issue HOT 3
- Seek for COM Matrix HOT 1
- Generalized velocity of the floating base HOT 7
- Activate ROS CI
- AttributeError: module 'pinocchio' has no attribute 'buildModelFromUrdf' HOT 1
- How to model robot with float-base HOT 1
- Fix cmake export files to allow cross-compilation with sysroot HOT 3
- Wrong inertia properties extracted from data class using python interface. 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 pinocchio.