GazzolaLab / PyElastica

Python implementation of Elastica, an open-source software for the simulation of assemblies of slender, one-dimensional structures using Cosserat Rod theory.
https://www.cosseratrods.org
MIT License
233 stars 111 forks source link

Updating muscle forces mid-simulation - how does it work? #311

Closed saultshaker closed 1 year ago

saultshaker commented 1 year ago

I am trying to build a custom gymnasium environment for my own RL project using PyElastica.

I've been digging into the muscle_torques_with_bspline.py for Case 1 to try and understand the nuts and bolts of how muscle torques are changing mid-simulation.

In an attempt to compare it with a PyElastica example were forces/torques applied to rods aren't changing throughout the simulation, I looked at axial_stretching.py which brought me to the EndPointForces class.

I am still not clear how muscle_torques_with_bspline.py allows for an RL agent to change the torques within a rod while the simulation is running. Could this be explained?

I'm happy to provide additional details to clarify my question if that's useful.

Thanks in advance!

Additional context I posted a similar comment to the Elastica-RL-control repo, but figured it might be more appropriate here.

Ali-7800 commented 1 year ago

I replied in to this in https://github.com/GazzolaLab/Elastica-RL-control/issues/11.