Papers
Topics
Authors
Recent
Search
2000 character limit reached

OpenSimRT: Real-Time Musculoskeletal Simulation

Updated 7 July 2026
  • OpenSimRT is a real-time musculoskeletal simulation framework that integrates inverse kinematics, inverse dynamics, and static optimization through a wearable, ROS-native pipeline.
  • It employs multithreaded ROS nodes to synchronize heterogeneous data from IMUs, pressure insoles, and AR markers, enabling accurate joint and force estimations.
  • The system is validated in both upper- and lower-body trials, demonstrating effective soft real-time performance for applications in rehabilitation and biomechanical analysis.

Searching arXiv for OpenSimRT and closely related real-time musculoskeletal simulation papers. OpenSimRT is a real-time musculoskeletal simulation framework positioned as the numerical core for online biomechanical estimation. In the deployment described in 2025, it provides real-time inverse kinematics, inverse dynamics, and static optimization, with prior support for inertial-measurement-unit-based operation, and is embedded in a wearable-sensor-driven, ROS-native pipeline for full-chain human movement analysis. In that formulation, OpenSimRT is not treated as a standalone end-user application so much as a computational engine whose interfaces, timing, and interoperability are extended through ROS nodes, TF-based transform handling, asynchronous buffering, and Dockerized reproducibility (Klein et al., 26 Jul 2025).

1. Scope and conceptual role

OpenSimRT is presented in the cited work as the component that already supplies the real-time biomechanical estimation backbone: real-time inverse kinematics (IK), inverse dynamics (ID), and static optimization (SO), together with prior support for IMU-based operation. The paper’s motivation is that musculoskeletal simulation is valuable for rehabilitation assessment, prosthesis, exoskeleton design, and human movement analysis, yet is often constrained by costly sensors, laboratory-based setups, computationally demanding processing, and fragmented software toolchains. The contribution therefore centers on making OpenSimRT operable within a broader wearable and robotics middleware ecosystem rather than replacing its internal numerical role (Klein et al., 26 Jul 2025).

A common misunderstanding would be to regard the framework as a new biomechanical solver from scratch. The paper explicitly rejects that interpretation: its main contribution is a ROS-compatible, wearable, full-chain real-time musculoskeletal simulation framework built around and extending OpenSimRT. This distinction is important because it locates the novelty at the middleware, synchronization, deployment, and sensor-integration levels. A plausible implication is that the paper should be read as a systems-integration and deployment case study for OpenSimRT rather than as a reformulation of the underlying musculoskeletal estimation algorithms.

2. ROS-native architecture and computational decomposition

The integrated system is organized around four main computational units: inverse kinematics, external-force estimation, inverse dynamics, and multithreaded static optimization. These units are encapsulated as ROS nodes, with ROS acting as middleware and message broker for time-stamped communication, transform management, modular composition, and visualization. The entire stack is deployed in a Docker container bundling ROS and OpenSimRT for reproducibility (Klein et al., 26 Jul 2025).

Computational unit Primary input Primary role
Inverse kinematics IMUs or fiducial markers Estimate generalized joint angles
External-force estimation Pressure-sensing insoles Estimate normal GRF and COP
Inverse dynamics Kinematics plus synchronized external loads Estimate joint torques
Multithreaded static optimization Synchronized IK and ID outputs Estimate muscle activations and forces

The architecture is expressed primarily as a graph of ROS nodes and TF streams. The major nodes are the IMU driver, AR marker detector, orientation calibrator, model-restricted inverse kinematics, filter, joints mapping, Human State Publisher, insole Python driver, right and left insole filters, wrench buffers, kinematics buffer, Newton–Euler inverse dynamics, and SO muscle-force estimation with a multithread scheduler. The principal communication abstractions are TF transforms for time-stamped coordinate-frame transformations, joint state messages carrying synchronized kinematics and torques, internal custom or common messages augmented with event timestamps for latency tracking, and buffered streams for asynchronous alignment.

The decisive systems abstraction is the ROS TF transform library. TF homogenizes marker-based and IMU-based orientation streams into a common coordinate-frame interface, permitting OpenSimRT’s orientation-driven IK to consume arbitrary time-stamped rigid-body orientation transforms rather than only its original IMU quaternion path. This suggests that the ROS integration is less an auxiliary wrapper than a redefinition of OpenSimRT’s input-output boundary in robotics-compatible terms.

3. Musculoskeletal models, wearable instrumentation, and calibration

For the lower body, the musculoskeletal model belongs to the subject-scaled OpenSim gait2392/gait1992 family. A generic gait2392 model was scaled to the subject using motion-capture markers, a symbolic moment-arm library was generated from the scaled OpenSim model, and a gait1992 URDF was used on the ROS side for visualization, state publishing, and transform broadcasting. For upper-body augmented-reality-marker experiments, the paper used an unscaled simplified model based on mobl2016_v03.osim, reduced to thorax, humerus, and radius with shoulder, elbow, and wrist joints (Klein et al., 26 Jul 2025).

The wearable inputs are heterogeneous. IMUs provide segment orientations at 100 Hz. Pressure insoles provide normal ground reaction force and center of pressure at 100 Hz. Fiducial markers detected from a standard RGB webcam provide an alternative orientation or pose input for upper-body IK. In the proof-of-concept setup, the wearable system used XIMU-3 IMUs streaming over WiFi/UDP at 100 Hz, a Moticon OpenGo v3 insole system with 16 pressure sensors streaming normal force at 100 Hz via Bluetooth to Android then WiFi to the host, and an Acer ACR010 webcam at 640×480 and 30 fps for AR-marker trials. For lower-body walking trials, IMUs were placed on the torso, pelvis, both thighs, both shanks, and both feet, for a total of 8 IMUs. For upper-body AR tests, three markers were placed on thorax, upper arm, and forearm, with three adjacent IMUs for comparison.

A static calibration precedes online operation. For lower-body IMU calibration, subjects stand upright with feet parallel and spaced at pelvis width; for upper-body calibration, they stand upright with arms alongside the torso and palms facing inward. The paper explicitly states that 10 frames are collected and averaged using a quaternion singular value decomposition (SVD)-based algorithm to correct heading offset for either IMUs or AR markers. The calibration equation is not printed, but the described procedure implies estimation of a fixed sensor-to-segment rotational offset. An inferred relation is

$^{G}R_{B,k} \approx \,^{G}R_{S,k}\,(^{B}R_{S})^{-1},$

or equivalently

$^{B}R_{S} \approx (^{G}R_{B}^{\text{cal}})^{-1}\,^{G}R_{S,k},$

followed by quaternion averaging via SVD. Because this expression is not explicitly written in the paper, it should be treated as an inferred formalization of the stated calibration procedure.

4. Online kinematics and external-force estimation

The real-time dataflow begins at sensor acquisition. In the IMU path, XIMU-3 sensors stream orientation estimates over UDP/WiFi at 100 Hz; an IMU driver ROS node ingests these data and writes them into the TF tree. In the fiducial-marker path, a webcam feeds an AR marker detector using ar_track_alvar, which estimates marker poses and writes them into TF. In the insole path, a Python ROS driver using the Moticon SDK reads wireless insole data and publishes normal force and COP estimates. Because the SDK delivers multiplexed bursts of variable length over a single connection, the driver performs sorting, restamping, buffering, filtering, and time correction before the data are usable downstream. The full system therefore operates on asynchronous, time-stamped streams rather than on a single synchronized sensor bus (Klein et al., 26 Jul 2025).

After calibration, the IK node consumes segment orientations through TF and performs model-restricted inverse kinematics using OpenSimRT. The paper states that the node estimates generalized joint angle from orientation input, constrained by a kinematic chain model described in OpenSimRT. Its main modification is to use ROS TF as a generic wrapper around OpenSimRT’s orientation-driven IK so that the input need not be limited to the original IMU pipeline. The resulting generalized coordinates q(t)\mathbf{q}(t) are spline-filtered, and first and second derivatives are published as q˙(t)\dot{\mathbf{q}}(t) and q¨(t)\ddot{\mathbf{q}}(t). The filtered adjacent-body transforms are republished into TF through a Human State Publisher after mapping OpenSim joint coordinates to an equivalent ROS/URDF representation through a predefined joint mapping between the .osim model and the URDF.

The IK optimization is not written explicitly, but because it is orientation-based OpenSim/OpenSimRT IK, a standard inferred formulation is

q=argminqi=1Nswilog ⁣(Rimeas1Ri(q))2,\mathbf{q}^\ast = \arg\min_{\mathbf{q}} \sum_{i=1}^{N_s} w_i \, \left\| \log\!\left(R_i^{\text{meas}\,-1} R_i(\mathbf{q})\right)\right\|^2,

with orientation discrepancy measured on SO(3)SO(3). This equation is inferential rather than quoted. Likewise, the spline-filtered derivatives are described procedurally rather than analytically; the implied relations are

q˙(t)=ddtq(t),q¨(t)=d2dt2q(t).\dot{\mathbf{q}}(t)=\frac{d}{dt}\mathbf{q}(t), \qquad \ddot{\mathbf{q}}(t)=\frac{d^2}{dt^2}\mathbf{q}(t).

The insole branch runs in parallel. COP is measured in the insole’s local frame, with xx anteroposterior and yy mediolateral. The system filters the normal GRF and COP and then transforms them into the global frame using TF. The exact homogeneous-transform equation is not printed, but the implied relation is

$^{B}R_{S} \approx (^{G}R_{B}^{\text{cal}})^{-1}\,^{G}R_{S,k},$0

with the transformed GRF applied as a force vector normal to the ground. An inferred approximation for the global force vector is

$^{B}R_{S} \approx (^{G}R_{B}^{\text{cal}})^{-1}\,^{G}R_{S,k},$1

up to sign and frame convention.

5. Inverse dynamics, static optimization, and soft real-time scheduling

The central practical issue in the full chain is synchronization. IK and insole data are not naturally aligned in time, and the insole SDK emits irregular bursts. The system therefore uses a buffer-based synchronization approach. Incoming left and right insole samples are sorted, restamped using a previously established synchronization event and each insole’s internal clock, and buffered; IK output is buffered as well. At the ID stage, the framework retrieves kinematics, external wrenches, and corresponding TF transforms from matched timestamps so that forces are applied to the correct body segments at the correct times. In the full-chain experimental setup, the authors explicitly added a 260 ms delay buffer to IK to account for insole and TF-broadcaster latencies (Klein et al., 26 Jul 2025).

The ID node is implemented as an asynchronous ROS node using a recursive Newton–Euler method. It consumes $^{B}R_{S} \approx (^{G}R_{B}^{\text{cal}})^{-1}\,^{G}R_{S,k},$2, $^{B}R_{S} \approx (^{G}R_{B}^{\text{cal}})^{-1}\,^{G}R_{S,k},$3, and $^{B}R_{S} \approx (^{G}R_{B}^{\text{cal}})^{-1}\,^{G}R_{S,k},$4 from the IK branch together with synchronized external wrenches from the insole branch, and publishes synchronized joint angles plus joint torques as joint states. The standard multibody inverse-dynamics relation is not printed in the paper, but the governing form is naturally represented as

$^{B}R_{S} \approx (^{G}R_{B}^{\text{cal}})^{-1}\,^{G}R_{S,k},$5

where the external forces enter through the Jacobian at the application points. Because this equation is not explicitly given, it is best understood as the standard formulation underlying the stated recursive Newton–Euler implementation. In the proof-of-concept evaluation, ankle inverse dynamics is the emphasized downstream result.

The final stage is the multithreaded static optimization node. OpenSimRT already includes a fast implementation of muscle activation estimations using static optimization, and the paper extends this capability into a ROS-node-based, multithreaded scheduler. The SO solves the muscle redundancy problem by minimizing the sum of squared muscle activations:

$^{B}R_{S} \approx (^{G}R_{B}^{\text{cal}})^{-1}\,^{G}R_{S,k},$6

The paper directly states this objective and further states that the node uses a symbolic moment-arm library generated from the scaled OpenSim model through an automated Python script provided by OpenSimRT. Standard equilibrium and bound constraints are implied, for example

$^{B}R_{S} \approx (^{G}R_{B}^{\text{cal}})^{-1}\,^{G}R_{S,k},$7

but the full equality constraints and activation-force mapping are not printed. The significance of the symbolic library is operational: it reduces online computational cost by avoiding repeated geometric moment-arm evaluation from the generic model during runtime.

The multithreading scheme is an engineering extension rather than a change in the optimization criterion. Each synchronized IK+ID message is assigned to one of $^{B}R_{S} \approx (^{G}R_{B}^{\text{cal}})^{-1}\,^{G}R_{S,k},$8 optimizer threads by a modulo operation on message index, and each thread retains its own warm-start history. With 4 threads at 100 Hz, each thread receives every fourth sample and therefore warm-starts from a state three samples earlier. A final synchronization deadline is imposed; if the optimizer has not converged by that deadline, the sample is discarded. The paper later evaluates SO scheduling under $^{B}R_{S} \approx (^{G}R_{B}^{\text{cal}})^{-1}\,^{G}R_{S,k},$9 and q(t)\mathbf{q}(t)0 threads from replayed data because SO is the computational bottleneck. This establishes the framework as soft real-time rather than hard real-time.

6. Evaluation, outputs, and limitations

The experimental platform was executed on an Intel Core i7-10750H under Debian GNU/Linux 11 (bullseye) in a Dockerized ROS/OpenSimRT environment. The laboratory reference system comprised 10 Vicon Vantage V16 cameras, 4 AMTI Optima force plates, and 6 Pico EMG sensors. Marker trajectories were sampled at 100 Hz, force plates at 1000 Hz, and EMG at 1000 Hz. The tested activities covered both kinematics-only and full-chain cases. For upper-body evaluation, a single subject performed trunk flexion/extension, lateral arm elevation, and elbow flexion. For lower-body IMU-only walking IK, six healthy participants performed five walking trials each along a 9 m walkway. For full-chain operation, two healthy participants performed walking, sit-to-stand/stand-to-sit, and squats while wearing IMUs and insoles concurrently with Vicon, force plates, and EMG. EMG was collected from tibialis anterior, medial gastrocnemius, soleus, gluteus maximus, and vastus medialis (Klein et al., 26 Jul 2025).

The framework’s outputs are correspondingly broad: real-time joint angles for upper and lower body, filtered joint velocities and accelerations, time-stamped segment transforms in TF, synchronized joint states containing kinematics plus joint torques, ankle inverse dynamics estimates, and static-optimization-based muscle activations and forces for major lower-limb muscles. Visualization is available in both OpenSim visualization and ROS visualization. The abstract states that the system can reasonably well describe inverse kinematics of both lower and upper body using either inertial measurement units or fiducial markers, and can effectively estimate inverse dynamics of the ankle joint and muscle activations of major lower limb muscles during walking, squatting, and sit-to-stand/stand-to-sit when combined with pressure insoles.

The clearest numerical validation reported in the provided text concerns upper-body AR-marker experiments. Compared to IMU-based angles, and after correcting an approximately q(t)\mathbf{q}(t)1 offset, the RMSE values were q(t)\mathbf{q}(t)2 for trunk flexion, q(t)\mathbf{q}(t)3 for lateral arm elevation, and q(t)\mathbf{q}(t)4 for elbow flexion. The paper notes that AR estimates suffered from lower sampling frequency and occasional data loss, especially beyond about q(t)\mathbf{q}(t)5 trunk flexion. For lower-body and full-chain trials, the excerpt states that RMSE was computed between real-time pipeline outputs and offline OpenSim IK/ID from motion capture, and that muscle activations were compared against processed EMG envelopes, but the full numerical tables are not present in the provided material.

The validation strategy is hybrid. For IK, the reference is either concurrent IMU measurement in AR trials or offline mocap-driven OpenSim IK in gait and full-chain trials. For ID, the reference is offline OpenSim ID using force-plate ground-reaction forces. For muscle activations, comparison is qualitative or quantitative against processed EMG envelopes from superficial muscles. The paper does not claim direct validation of deep muscle force magnitudes, only activation estimates of major lower-limb muscles. Several limitations are explicit or strongly implied: wearable force estimation is simplified because the pressure insole provides only normal force and COP; synchronization requires restamping, buffering, and a 260 ms IK delay; calibration remains sensitive to heading and sensor-to-segment alignment; AR markers are vulnerable to occlusion, frame drops, and lower sampling rate; the force application model and generic musculoskeletal assumptions limit generalizability; ROS introduces transport overhead and scheduling variability; and the static-optimization stage remains soft real-time because nonconvergent samples are dropped at the deadline. Taken together, these constraints indicate that OpenSimRT is validated here as a practical, wearable, online estimation core rather than as a gold-standard replacement for fully instrumented laboratory kinetics and invasive physiology.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to OpenSimRT.