Can't Get Forward Dynamics To Run

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Chris Bates
Posts: 15
Joined: Fri Feb 24, 2012 11:50 am

Can't Get Forward Dynamics To Run

Post by Chris Bates » Wed Jul 25, 2012 4:16 pm

Hi all,

I've built a model sitting in a chair and I'm attempting to get it to stand up. I have contact half spaces for the floor, chair bottom, and armrests with contact points on the feet, legs, and arms for each half space respectively. I performed static optimization of the model sitting in the chair with the feet, legs, and hands resting on top of their respective contact space to obtain a controls file. When trying to run forward dynamics on the model just sitting there it will either fail or just freeze at 0%. Am I missing something? When reading the user's guide it said if I didn't have an initial states file it would just use the model initial states, which I have made to be the person sitting in the chair. Any help would be greatly appreciated.

Thanks,
Chris

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: Can't Get Forward Dynamics To Run

Post by Ayman Habib » Wed Jul 25, 2012 4:35 pm

Hi Chris,

Please keep in mind that a half space is actually an infinite plane, do you still expect your model to "stand" under this assumption?

Best regards,
-Ayman

User avatar
Chris Bates
Posts: 15
Joined: Fri Feb 24, 2012 11:50 am

Re: Can't Get Forward Dynamics To Run

Post by Chris Bates » Thu Jul 26, 2012 10:06 am

Ayman,

If I specify only certain contact points for each half space in the Hunt Crossley Force, will they be bound by the other half spaces? I was under the assumption that they did not. If so, is there a contact plane that I can set bounds for the size? If this is in a tutorial/guide somewhere just point me there so you don't have to just repeat something it says. I haven't been able to find one about it.

Thanks,
Chris

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: Can't Get Forward Dynamics To Run

Post by Ayman Habib » Thu Jul 26, 2012 10:17 am

Hi Chris,

A Halfspace is by definition infinite (that occupies the entire half-space x>0.
This is useful for representing walls and floors.). Since contact surfaces, other than halfspace, have to be closed so that they have inside and outside, you can use a block and size it/transform it to fit your needs. The tug of war example has a block that you can start from.

Hope this helps, and please let us know if you continue to have questions.

Best regards,
-Ayman

User avatar
Chris Bates
Posts: 15
Joined: Fri Feb 24, 2012 11:50 am

Re: Can't Get Forward Dynamics To Run

Post by Chris Bates » Thu Jul 26, 2012 10:27 am

Ayman,

Thank you! I had completely forgotten about the tug of war contact surface. I'll work on that and let you know. Thanks for the quick responses.

Chris

User avatar
Chris Bates
Posts: 15
Joined: Fri Feb 24, 2012 11:50 am

Re: Can't Get Forward Dynamics To Run

Post by Chris Bates » Thu Jul 26, 2012 1:42 pm

Ayman,

I've been looking through the tug of war example, but I don't use the API. I use a text editor (Notepad++). What I've gathered from the example is that I need to create a geometry block with the size and shape that I want and then create a mesh around it, but I have no idea how that is done in the text editor.

Thanks,
Chris

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: Can't Get Forward Dynamics To Run

Post by Ayman Habib » Thu Jul 26, 2012 2:01 pm

Hi Chris,

The specification of ContactGeometry allows you to apply a transform to your geometry (represented as .obj file) to translate it and rotate it, that should allow you to put the block's obj file from the tug-of-war example in the right location.

As to sizing, you can use any third party package to handle obj files (e.g. MeshLab or Paraview)

Please let us know if you continue to have problems creating and placing the contact geometry to fit your needs.

Best regards,
-Ayman

User avatar
Chris Bates
Posts: 15
Joined: Fri Feb 24, 2012 11:50 am

Re: Can't Get Forward Dynamics To Run

Post by Chris Bates » Thu Jul 26, 2012 2:10 pm

Ayman,

Sorry for you having to lead me through this, but I can't seem to find the actual tug of war example. I had Reinbolt's class at UT and we had it as one of our labs, but when I look at that in Notepad++ it just has geometry files with no contact geometry. I've looked in the examples folder for my OpenSim download and the tug of war example is not in there. I'm pretty sure if I could see the code I'd understand more.

Could I just potentially create a visible object on my chair, say a block on the armrest, and put a contact mesh around it? Or would it just fall through the chair until it hits the Contact Half Space?

User avatar
Chris Bates
Posts: 15
Joined: Fri Feb 24, 2012 11:50 am

Re: Can't Get Forward Dynamics To Run

Post by Chris Bates » Thu Jul 26, 2012 2:21 pm

Here is a picture of what I have. Could I just put a contact mesh on the chair itself? It is one .stl file that I have loaded into the ground body. The code for the mesh is:

<ContactMesh name="chair">
<body_name> </body_name>
<location>0 0 0</location>
<orientation>0 0 0</orientation>
<filename> </filename>
</ContactMesh>

If that's possible I'd just have the chair sitting on the contact half space (floor) and then I could put contact spheres on the model (as shown on the feet) to get the model to sit in the chair.
Attachments
chair_sitting.tiff
model sitting in chair

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: Can't Get Forward Dynamics To Run

Post by Ayman Habib » Thu Jul 26, 2012 2:42 pm

Hi Chris,

The contact mesh file needs to be .obj so please use either of the two packages I mentioned in my earlier email and you should be able to proceed. I'm not sure how you're modeling the contact with the bottom or back of the chair but that's more for you to decide/model.

Best of luck,
-Ayman

POST REPLY