Fix muscle FLV documentation to match current implementation in engine_util_misc#3305
Open
zchJo wants to merge 1 commit into
Open
Fix muscle FLV documentation to match current implementation in engine_util_misc#3305zchJo wants to merge 1 commit into
zchJo wants to merge 1 commit into
Conversation
…on in `src/engine/engine_util_misc.c`
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
While fitting FLV curve parameters for musculoskeletal modeling, I noticed a discrepancy between the forces computed at runtime by MuJoCo and the reference MATLAB implementation in
doc/_static/FLV.m.In particular, using
FLV.mas the reference for parameter fitting produced curves that differed from the forces computed at runtime by MuJoCo. After comparing the documentation script withmju_muscleGainLengthandmju_muscleBias, the mismatch appears to be stale documentation/assets rather than a simulator bug.Summary
This PR updates the muscle FLV documentation assets so they match the current MuJoCo muscle actuator implementation.
The previous
doc/_static/FLV.mscript still used an older force-length/passive-force curve:0.15bump that is not present inmju_muscleGainLength;mju_muscleBias;musclemodelfigures and thefpmaxXML reference text reflected that older passive curve.The current implementation in
src/engine/engine_util_misc.cuses one quadratic active force-length bump and a passive force curve that is half-quadratic up to(1 + lmax) / 2, then linear beyond that point. MuJoCo Warp/MJX mirrors this logic.Changes
doc/_static/FLV.mto matchmju_muscleGainLengthandmju_muscleBiasinsrc/engine/engine_util_misc.c.doc/images/modeling/musclemodel.pnganddoc/images/modeling/musclemodel_dark.pngwith MATLAB R2024b at the original pixel dimensions.doc/XMLreference.rstsofpmaxis described as a passive force scaling parameter instead of passive force exactly atlmax.Testing
git diff --check.1435x1272pixels.FP(1) = 0,FP((1 + lmax) / 2) = 0.5 * fpmax,FP(lmax) = 1.5 * fpmax.