-
Notifications
You must be signed in to change notification settings - Fork 41
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
Get joint torques #124
Comments
That sounds like a bug
The commands are meant to go through JointForceCmd, so I think
I'd assume yes, but I'd like to hear @azeey 's opinion. In any case, I think we should update that component's documentation to make it clearer if that's storing the resulting force or the commanded force. |
hmm, I didn't know that we needed
Yes, I think the convention now is |
I just realized that the comment in #143 (comment) may be more appropriate here, hence I am cross-linking it here. |
Responding here to #143 (comment) Thanks for the clarification @traversaro. In Gazebo-classic,
Yes, I've been testing that same expression for the last few days and it seems to work. I was planning to create a PR with that as the value returned by When it comes to ign-gazebo and its components though, there's still a question about what |
I agree fully on this, and it does not look a change of behavior for the downstream users since the Something to keep in mind is that, AFAIK with my small experience with its API, bullet does not provide |
If Bullet exposes the 6D force/torque transmitted over a joint, |
Crosslinking a relevant comment to close this issue: #143 (comment) |
Hi, is there any news on this issue? I am trying to figure out how to populate the joint efforts in the |
Closing now that #283 has been implemented. Please feel free to reopen if there are any unresolved issues. |
I am trying to extract joint torques in something comparable to the
UpdateSim
call of the Physics system (that is called in theUpdate
phase, not thePostUpdate
). I will store the torques either in the JointForce component or a custom one, it's not clear if the existing component is supposed to store the Cmd or the net torque after removing the loss due to e.g. friction.Beyond these
ign-gazebo
preliminaries, it seems thatign-physics
already has the following APIs:https://github.com/ignitionrobotics/ign-physics/blob/8750521a331290918b0b7e3c3a59dbdfc69d0496/include/ignition/physics/Joint.hh#L62-L68
https://github.com/ignitionrobotics/ign-physics/blob/8750521a331290918b0b7e3c3a59dbdfc69d0496/include/ignition/physics/detail/Joint.hh#L55-L61
Implemented for DART here:
https://github.com/ignitionrobotics/ign-physics/blob/8750521a331290918b0b7e3c3a59dbdfc69d0496/dartsim/src/JointFeatures.cc#L53-L57
That method, however, called in something similar to the
UpdateSim
phase, always returns 0. I delved into the stack and I found out that in order to trigger DART to populate the data that can be gathered byJoint::getForce
, the methodSkeleton::computeInverseDynamics
should be called in the parent's model dartsim/dart#569.I modified DART's call as follows:
And the joint forces are finally different than 0. I enabled the damping / spring / external forces by default so that they are considered in the ID and the returned values are more accurate and take into consideration modelled actuation losses.
With this being said, there are a few comments I'd like to ask feedback:
JointForce
component suitable to hold this value?Related resources:
The text was updated successfully, but these errors were encountered: