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
External object simulation
- Antoine BERGER
- Posts: 2
- Joined: Mon Feb 01, 2021 4:07 am
- Thomas Uchida
- Posts: 1793
- Joined: Wed May 16, 2012 11:40 am
Re: External object simulation
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.
- Antoine BERGER
- Posts: 2
- Joined: Mon Feb 01, 2021 4:07 am
Re: External object simulation
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 ?
- Najoua Assila
- Posts: 34
- Joined: Thu Aug 30, 2018 9:24 am
Re: External object simulation
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.
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.