How ferminjosue-epo9/analisis-dinamico-de-la-pierna-haciendo-uso-de-sensores-inerciales works
This repository is a wearable-sensor gait-analysis system: ESP32 devices stream inertial measurements, and a Python application calibrates and processes two sensors to drive a subject-scaled OpenSim gait model. A separate utility inspects model muscles and segment geometry. The main script excerpt shows profile handling, sensor threads, Madgwick orientation updates, model scaling, and motion-file writing; the README documents the end-to-end Bluetooth-to-OpenSim workflow. Some intermediate calculations are omitted from the excerpt, so the graph avoids asserting unsupported internal call sequences.
Main entry points: opensim_kinematics_streamer.py Analysis runner · forceset_extractor.py Model inspector · GaitModel.osim Gait model · IMU_CalibratedStreamer.ino ESP32 IMUs
Components 14
Sensor acquisition
- ESP32 IMUs
esp32_firmware/IMU_CalibratedStreamer/IMU_CalibratedStreamer.ino - Bluetooth link
Python analysis
- Analysis runner
python_simulation/opensim_kinematics_streamer.py - Subject profile
python_simulation/opensim_kinematics_streamer.py - Model scaling
python_simulation/opensim_kinematics_streamer.py - Sensor threads
python_simulation/opensim_kinematics_streamer.py - Orientation fusion
python_simulation/opensim_kinematics_streamer.py - Joint kinematics
python_simulation/opensim_kinematics_streamer.py - Motion output
python_simulation/opensim_kinematics_streamer.py
OpenSim biomechanics
- OpenSim runtime
- Gait model
opensim_tools/GaitModel.osim - 3D geometry
opensim_tools/geometry
Model inspection
- Model inspector
python_simulation/forceset_extractor.py
Other components
- Operator
Connections 16
- Operator → Analysis runner: starts analysis
README.md - ESP32 IMUs → Bluetooth link: streams packets
README.md - Bluetooth link → Sensor threads: sends measurements
README.md - Analysis runner → Subject profile: loads or creates
python_simulation/opensim_kinematics_streamer.py - Analysis runner → Model scaling: generates model
python_simulation/opensim_kinematics_streamer.py - Model scaling → OpenSim runtime: runs ScaleTool
python_simulation/opensim_kinematics_streamer.py - Analysis runner → Sensor threads: starts threads
python_simulation/opensim_kinematics_streamer.py - Sensor threads → Orientation fusion: updates filter
python_simulation/opensim_kinematics_streamer.py - Analysis runner → Joint kinematics: computes angles
python_simulation/opensim_kinematics_streamer.py - Analysis runner → OpenSim runtime: updates posture
README.md - OpenSim runtime → Gait model: loads model
README.md - OpenSim runtime → 3D geometry: uses assets
README.md - Analysis runner → Motion output: writes motion
python_simulation/opensim_kinematics_streamer.py - Operator → Model inspector: runs inspection
- Model inspector → OpenSim runtime: loads and inspects
python_simulation/forceset_extractor.py - Model inspector → Gait model: reads model