External object simulation

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Antoine BERGER
Posts: 2
Joined: Mon Feb 01, 2021 4:07 am

External object simulation

Post by Antoine BERGER » Mon Jan 17, 2022 3:34 am

Hi everyone,
We are currently working on the simulation of a rugby pass through OpenSim. We have our model ready but we would like to add the ruby ball to the simulation. We have the .trc file of the ball displacements (represented with four markers around the ball), but we don't know how to implement it into the model. The purpose is to be able don't determine accurately the speed of the ball and its trajectory compared to body segments.

Do you know a way to do it ?

Regards,

Antoine & Axel

Tags:

User avatar
Thomas Uchida
Posts: 1793
Joined: Wed May 16, 2012 11:40 am

Re: External object simulation

Post by Thomas Uchida » Mon Jan 17, 2022 5:17 am

You could add a new rigid body to the model, connect it to Ground with a FreeJoint, and track the markers on the ball. You can use methods like OpenSim::Frame::findStationLocationInAnotherFrame (https://simtk.org/api_docs/opensim/api_ ... aa78c66f79) to relate the trajectory of the ball to the player.

User avatar
Antoine BERGER
Posts: 2
Joined: Mon Feb 01, 2021 4:07 am

Re: External object simulation

Post by Antoine BERGER » Tue Jan 18, 2022 7:31 am

Thanks a lot, we successfully added the body and FreeJoint to the model. But as we don't know anything about C++ programming, we are unable to create the coordinates for the ball mobilities. Is there another way to do that than programming ? Or maybe using python ?

User avatar
Najoua Assila
Posts: 34
Joined: Thu Aug 30, 2018 9:24 am

Re: External object simulation

Post by Najoua Assila » Mon Jan 31, 2022 12:42 am

Hi,

If you are connecting your body to the ground, you can find an implementation in python here: https://github.com/pyomeca/pyosim/blob/ ... le.py#L205

Hope it helps.

POST REPLY