IK real time from markers#4248
Open
Seeeeeyo wants to merge 3 commits into
Open
Conversation
aymanhab
reviewed
Mar 3, 2026
| #include <OpenSim/Simulation/Model/OffsetFrame.h> | ||
| #include <OpenSim/Simulation/Model/PhysicalOffsetFrame.h> | ||
| #include <OpenSim/Simulation/Model/StationDefinedFrame.h> | ||
|
|
Member
There was a problem hiding this comment.
Was it the intention to remove this unrelated header from here?
aymanhab
reviewed
Mar 3, 2026
aymanhab
left a comment
Member
There was a problem hiding this comment.
Would be good to merge branch main into this branch to avoid downstream complications or unintended diffs. Thank you
@aymanhab made 1 comment.
Reviewable status: 0 of 8 files reviewed, 1 unresolved discussion (waiting on Seeeeeyo).
aymanhab
reviewed
Mar 3, 2026
aymanhab
left a comment
Member
There was a problem hiding this comment.
@aymanhab resolved 1 discussion.
Reviewable status: 0 of 8 files reviewed, all discussions resolved.
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.
Hi,
Brief summary of changes
This PR adds support for real-time inverse kinematics from streaming marker data, by introducing a marker reference that can be fed live data and wiring the IK solver to use it when present.
BufferedMarkersReference(new): AMarkersReferencesubclass that buffers marker data so clients can push frames viaputValues(time, dataRow)and the IK solver can consume them viagetNextValuesAndTime(values)andhasNext(), mirroring the pattern used byBufferedOrientationsReference. It can be constructed from aTimeSeriesTable(e.g. from a TRC) or used empty and filled at runtime.InverseKinematicsSolver: When the solver’s marker reference is aBufferedMarkersReferenceandhasNext()is true, it uses the streaming path (time advanced from the buffer viagetNextValuesAndTime); otherwise it keeps the existing behavior (getValuesAtTime). This applies both when_advanceTimeFromReferenceis true (e.g. fortrack()) and in the non-advancing path.MarkersReferenceand related headers/bindings are updated so the new class and streaming usage are correctly declared and exposed.BufferedMarkersReferenceis added to the Simulation library and CMake; Python/SWIG bindings are updated so the new class is available from the API.Existing IK usage (e.g. from a
TimeSeriesTableor file-basedMarkersReference) is unchanged; the new behavior is only used when aBufferedMarkersReferenceis supplied and has data in its buffer.Testing I've completed
Looking for feedback on...
BufferedMarkersReference(e.g.putValues/getNextValuesAndTime/hasNextand constructor overloads).CHANGELOG.md (choose one)
This change is