Skip to content

Conversation

@nickbianco
Copy link
Member

@nickbianco nickbianco commented Jan 10, 2026

Brief summary of changes

Finalized the implementation of MeyerFregly2016Force, a Force element equivalent to the contact model available in the Neuromusculoskeletal Modeling (NMSM) Pipeline. This model will enable generating simulations in the NMSM pipeline that are more tightly integrated into the OpenSim API and hopefully improve performance.

In addition, the experimental classes. AckermannVanDenBogert2010Force and EspositoMiller2018Force has been removed, as they are not used in any Moco examples, advertised in the documentations, and there no plans to support these classes going forward. This means that the files StationPlaneContactForce.h/.cpp have been removed, and the implementation of MeyerFregly2016Force has been moved under OpenSim/Simulation/Model.

A side effect of removing StationPlaneContactForce.h/.cpp is that the include structures of many files in Moco had to be update, since StationPlaneContactForce include osimSimulation, which was then included via osimMoco. These changes reflect more of a "include what you use" style.

Testing I've completed

Updated the testing for MuscleFregly2016Force in testMocoContact.cpp.

Looking for feedback on...

CHANGELOG.md (choose one)

  • updated.

This change is Reviewable

@nickbianco nickbianco changed the title Add MeyerFregly2016Force Add MeyerFregly2016Force Jan 10, 2026
@nickbianco nickbianco force-pushed the meyer_fregly_2016_force branch from 302085a to e9352c5 Compare January 10, 2026 20:33
Copy link
Contributor

@adamkewley adamkewley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, I can't speak to the maths etc. though (as usual).

My comments about visualization are just musings. The core development team (incl. myself) should really think deeply about the interaction between visualization and modelling. My concrete interest (with OpenSim Creator and now OPynSim) is to ensure that the opensim-core API has the possibility to do interesting things moving forward.

That isn't to say these ideas are already available: a lot of the ideas I mention etc. aren't actually implemented in OSC yet, it's just that there's certain design patterns in OpenSim that I believe will make providing robust visualization harder later on. OSC does provide point-force visualization, though (but not the tooltips that say which frames each point-force is attached to, which would be useful).

@adamkewley reviewed 26 files and all commit messages, and made 3 comments.
Reviewable status: 26 of 27 files reviewed, 2 unresolved discussions (waiting on @nickbianco).


OpenSim/Simulation/Model/MeyerFregly2016Force.h line 96 at r1 (raw file):

//=============================================================================
    OpenSim_DECLARE_PROPERTY(stiffness, double,
            "Spring stiffness in N/m (default: 1e4).");

Dont you mean model.force_units / model.length_units?

(I'm joking: I'm personally of the opinion that OpenSim and Simbody should just stick to SI units for everything)


OpenSim/Simulation/Model/MeyerFregly2016Force.h line 168 at r1 (raw file):

    // CONSTANTS
    constexpr static SimTK::Real klow = 1e-1;

These can probably just be in the cpp file? No need for other compilation units to know it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants