Genesis icon indicating copy to clipboard operation
Genesis copied to clipboard

Musculoskeletal Bodies Simulation

Open utkuoguzman opened this issue 1 year ago • 9 comments

Hi, When you state "Genesis supports simulation (and the coupling) of rigid and articulated bodies", is this also valid for musculoskeletal bodies, meaning the muscle simulation of MuJoCo and OpenSim and Hyfydy? It is a big part of the MuJoCo community. If this feature is not included, can you also put the musculoskeletal bodies simulation into your backlogs? Thanks.

utkuoguzman avatar Dec 20 '24 12:12 utkuoguzman

Similarly, I am also concerned about whether Genesis supports MuJoCo tendon geom, which makes up most musculoskeletal models in MuJoCo. Thanks.

JiangJubo avatar Dec 20 '24 16:12 JiangJubo

yes, need human body simulation

Albertchamberlain avatar Dec 23 '24 09:12 Albertchamberlain

would love to learn more about the MuJoCo tendon support, ideally to support MyoSuite task suites :) In the meanwhile I had a test with human physiological skeletal simulation from myoskeleton and on an M3 Max with 36 GB run at 50 fps (which seem a bit slow). Did anybody have similar observations for models of similar complexity?

Vittorio-Caggiano avatar Dec 23 '24 09:12 Vittorio-Caggiano

I'm also interested in this. According to #374 and #287 these probably still need to be implemented. I haven't looked into it yet, but these issues provide a path to start looking at it.

I would also be interested in trying to incorporate some way of using OpenSim models directly instead of converting to MJCF, especially because MuJoCo tendons are inelastic. It could be useful to be able to specify materials for tissue kind of like the Hybrid entity. I'll have to dig into the code a bit more to see if this makes sense

hudsonburke avatar Jan 02 '25 01:01 hudsonburke

would love to learn more about the MuJoCo tendon support, ideally to support MyoSuite task suites :) In the meanwhile I had a test with human physiological skeletal simulation from myoskeleton and on an M3 Max with 36 GB run at 50 fps (which seem a bit slow). Did anybody have similar observations for models of similar complexity?

If you do not need parallel simulation, using ‘backend=gs.cpu’ would greatly improve speed

also rendering could be the bottleneck. There’s still part of the rendering pipeline (specifically scene state update) that is still in raw python and we haven’t jitted. You could turn off rendering and check the speed again. If it’s still slow, do let us know

zhouxian avatar Jan 02 '25 01:01 zhouxian

would love to learn more about the MuJoCo tendon support, ideally to support MyoSuite task suites :) In the meanwhile I had a test with human physiological skeletal simulation from myoskeleton and on an M3 Max with 36 GB run at 50 fps (which seem a bit slow). Did anybody have similar observations for models of similar complexity?

Did you have to edit the myoskeleton files to get it to show up? I tried this one and several other's from myosim, but it would either error out or just show a blank plane like in one of the issues

hudsonburke avatar Jan 02 '25 02:01 hudsonburke

Hi developers,

I’ve been following the discussions about muscle and tendon modeling (e.g., #374 and #287), and I noticed many users are interested in these features, but they’re currently not supported in Genesis.

Given that this seems like a valuable extension for the framework, I was wondering if it would be possible for the community to contribute towards implementing these features. Specifically:

  1. Do you think it's feasible to add muscle and tendon simulation support to Genesis?
  2. Are there any suggestions on how we could start building these features, possibly within the existing codebase?

I’d love to hear your thoughts, and if anyone from the community is interested in joining the effort, that would be great!

Thanks for your time and guidance.

Hippozhibos avatar Jan 04 '25 05:01 Hippozhibos

would love to learn more about the MuJoCo tendon support, ideally to support MyoSuite task suites :) In the meanwhile I had a test with human physiological skeletal simulation from myoskeleton and on an M3 Max with 36 GB run at 50 fps (which seem a bit slow). Did anybody have similar observations for models of similar complexity?

Did you have to edit the myoskeleton files to get it to show up? I tried this one and several other's from myosim, but it would either error out or just show a blank plane like in one of the issues

@hudsonburke yes, I had to remove slide joints to make it work

Vittorio-Caggiano avatar Jan 04 '25 16:01 Vittorio-Caggiano

would love to learn more about the MuJoCo tendon support, ideally to support MyoSuite task suites :) In the meanwhile I had a test with human physiological skeletal simulation from myoskeleton and on an M3 Max with 36 GB run at 50 fps (which seem a bit slow). Did anybody have similar observations for models of similar complexity?

If you do not need parallel simulation, using ‘backend=gs.cpu’ would greatly improve speed

also rendering could be the bottleneck. There’s still part of the rendering pipeline (specifically scene state update) that is still in raw python and we haven’t jitted. You could turn off rendering and check the speed again. If it’s still slow, do let us know

thanks @zhouxian when I remove rendering the performance increase to ~620 FPS (M3 mac Max). Will try to do some test on parallel as well.

Vittorio-Caggiano avatar Jan 04 '25 16:01 Vittorio-Caggiano