Insert stl file into opensim model

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Donald Ivan
Posts: 7
Joined: Tue Nov 26, 2019 7:25 pm

Insert stl file into opensim model

Post by Donald Ivan » Fri May 08, 2020 12:35 am

Hi,
I want add an extra load into arm26.osim. I have learnt that editing .osim file by notepad++ is able insert stl file into arm model.
Now, I already built my extra load model through solideworks and export them into several stl files and an xml file which indicates mass, inertia information.
But i failed to add my model into arm26.osim.
Does support documention provide any tutorial about add customized model into opensim model?

Thanks a lot,
Donald

Tags:

User avatar
Bryce Killen
Posts: 104
Joined: Mon Nov 24, 2014 7:12 pm

Re: Insert stl file into opensim model

Post by Bryce Killen » Fri May 08, 2020 2:05 am

Hi Donald,

It depends a little on what exact you're trying to do.

If you want to add the stl simply as a display geometry it can be added to the existing bodies under attached_geometry, if you are wanting to add a new body and use your stl as a display, doing it in notepad++ is very tedious, I would suggest using the API through either Matlab or Python, as you need to add a body, a joint, and coordinates for it to be implemented in OpenSim.

Some information on using scripting can be found here:
https://simtk-confluence.stanford.edu:8 ... pleScripts

Bryce

User avatar
Donald Ivan
Posts: 7
Joined: Tue Nov 26, 2019 7:25 pm

Re: Insert stl file into opensim model

Post by Donald Ivan » Fri May 08, 2020 5:11 am

Thank you, Bryce!
Actually, i want to insert my load model and then apply CMC to learn the change of muscle activation if there were a load attached to arm26.
Is this possible to realize?

User avatar
Bryce Killen
Posts: 104
Joined: Mon Nov 24, 2014 7:12 pm

Re: Insert stl file into opensim model

Post by Bryce Killen » Fri May 08, 2020 6:56 am

If I am interpreting correctly, you want to add a load to the arms and see what happens compared to the model without right ? So in this case you want to add a body with mass to the model right ?

Following the API link I sent will give you an idea of how to do this.

Bryce

User avatar
Donald Ivan
Posts: 7
Joined: Tue Nov 26, 2019 7:25 pm

Re: Insert stl file into opensim model

Post by Donald Ivan » Sun May 10, 2020 6:51 pm

Thank you, Bryce.
I have solved this problem under your guidance and api link you offered.

POST REPLY