Page 1 of 1
RRA fails
Posted: Tue Sep 29, 2020 11:55 pm
by sheebadavis
Hi OpesnSim experts
I have performed scaling & IK on a full model successfully. Now when I try to run the code for RRA, it fails and when i tried to debug, following are the comments that I get in the command window.
Error using processData_GenericModel_sample (line 780)
Java exception occurred:
java.lang.RuntimeException: growTree(): algorithm produced an invalid tree containing a terminal massless body
(/bodyset/talus_r). This may be due to an invalid model or failure of heuristics. In the latter case you may be able to
get a valid tree by forcing a different loop break or changing parent->child ordering.
at org.opensim.modeling.opensimSimulationJNI.Model_finalizeConnections__SWIG_0(Native Method)
at org.opensim.modeling.Model.finalizeConnections(Model.java:787)
Can someone please help me with this? Thanks for all your support.
Regards
Sheeba
Re: RRA fails
Posted: Thu Oct 01, 2020 5:06 pm
by tkuchida
As the message states, you cannot have a massless body at the end of a tree. You can see the topology of the model using the "Topology View" in the GUI (
https://simtk-confluence.stanford.edu/d ... pologyView). Depending on what model you are using, what variables you are interested in, etc., you may need to adjust the model's topology (as stated in the message, "you may be able to get a valid tree by forcing a different loop break or changing parent->child ordering"). A quick hack would be to add mass to the talus.
Re: RRA fails
Posted: Sat Oct 03, 2020 4:25 am
by sheebadavis
Hi Thomas Uchida
Thanks for your reply. But I did not understand what exactly I am supposed to do, can you please tell me in detail. Is the problem because of not adding external force?
Thanks
Sheeba
Re: RRA fails
Posted: Sat Oct 03, 2020 8:56 am
by tkuchida
Starting from ground, the model comprises chains of joint-body-joint-etc. The error message is telling you that there is a massless body at the end of one or more of these chains. The problem with this situation is that a massless body undergoes infinite acceleration when a force is applied (F=ma) and the dynamic equations are computed starting from terminal bodies. You can correct the model by adding mass to the terminal body; or, if you have a closed kinematic chain, you can change the location of the constraint. You can find background information in the supporting documentation---e.g., see the Simbody Theory Manual,
https://github.com/simbody/simbody/blob ... Manual.pdf.
Re: RRA fails
Posted: Sun Oct 04, 2020 5:36 am
by aafox
Hi Sheeba,
I think there's probably value in figuring out how the massless body is coming about. You could firstly confirm by looking at the .osim file of the mdodel you're using to confirm that the talus is indeed massless. I'd then go back and check whether this was the case in the generic model you're scaling from - and if so, as Tom suggests, add an appropriate value for mass to this body. I'd find it odd that the generic model you start with has massless bodies - I've never encountered this issue. This would then lead me to check what might be happening in scaling that would cause the body to go from having mass, to not having mass. The first thought that came to mind was that the scaling factor for this body might somehow get set to zero. I don't think this happens if you don't set a marker pair for a body, it should stay at 1 and simply not change. I imagine this could happen if you accidentally set the same marker within the marker pair for the body - as then the calculation for distance between the marker pairs would be zero. It might also happen if you somehow set the total model mass really low - in that the talus is a small body and thus have a really small mass that could approach zero. I don't know about that last point though - I'd be more confident that there is some sort of error in how that talus body is being scaled in your measurement set.
Aaron
Re: RRA fails
Posted: Sun Oct 04, 2020 10:54 pm
by sheebadavis
Hi Dr Aaron & Thomas Uchida
Thanks for your response.
1. Based on Thomas's suggestion, I checked the topology view of the generic model and found that talus has a mass of 0.1 and talus of the scaled model has a mass of 0.099. Do I have to increase the mass of generic model?
2. I also checked the scalemeasurementSet.xml file where the marker pairs are chosen properly.
Thanks,
Sheeba