How to can change the axis origin and orientation?

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Bruno Gallo
Posts: 1
Joined: Fri Feb 24, 2012 11:49 am

How to can change the axis origin and orientation?

Post by Bruno Gallo » Fri Jun 03, 2016 7:02 am

Hello everyone!
I'm a newbye of Opensim...and I'm working with Opensim for my thesys with a copy of arm26 model.
How I must do for change the main axis origin in a model?
Thank you

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: How to can change the axis origin and orientation?

Post by jimmy d » Wed Jun 08, 2016 4:53 pm

Can you please explain further?

User avatar
KATHLEEN BALFOUR
Posts: 9
Joined: Fri Feb 05, 2016 7:19 pm

Re: How to can change the axis origin and orientation?

Post by KATHLEEN BALFOUR » Tue Jul 05, 2016 9:59 am

I think I have a similar question!

I am working with Cortex which captures our data in a different orientation. To transform into OpenSim we are going into the files and changing the Z values into the Y columns, and Y values into -Z columns. The X is the same for both OpenSim and Cortex.

Is there an easier way to do this in OpenSim? Are we able to change the orientation so we do not have to manually edit our captured data?

Thank you
Kathleen

User avatar
Nirav Maniar
Posts: 32
Joined: Tue May 12, 2015 11:03 pm

Re: How to can change the axis origin and orientation?

Post by Nirav Maniar » Sun Jul 10, 2016 12:03 am

kcbalfou wrote:I think I have a similar question!

I am working with Cortex which captures our data in a different orientation. To transform into OpenSim we are going into the files and changing the Z values into the Y columns, and Y values into -Z columns. The X is the same for both OpenSim and Cortex.

Is there an easier way to do this in OpenSim? Are we able to change the orientation so we do not have to manually edit our captured data?

Thank you
Kathleen
Hi Kathleen,

You can try this in the OpenSim GUI:

1. File > Preview Experimental Data > Then select your relevant trc file (or mot files for GRFs). In the view window, you should now be able to see your experimental marker motion.
2. In the Navigator window, find "ExperimentalData_0" and click the + drop down (you should see the name of the trc file you selected)
3. Right click on this and select transform. You can keep changing axis until the motion (which you can visualise in the view window) conforms to OpenSim requirements.

Cheers,
Nirav

User avatar
KATHLEEN BALFOUR
Posts: 9
Joined: Fri Feb 05, 2016 7:19 pm

Re: How to can change the axis origin and orientation?

Post by KATHLEEN BALFOUR » Mon Jul 11, 2016 12:50 pm

kneerav wrote: Hi Kathleen,

You can try this in the OpenSim GUI:

1. File > Preview Experimental Data > Then select your relevant trc file (or mot files for GRFs). In the view window, you should now be able to see your experimental marker motion.
2. In the Navigator window, find "ExperimentalData_0" and click the + drop down (you should see the name of the trc file you selected)
3. Right click on this and select transform. You can keep changing axis until the motion (which you can visualise in the view window) conforms to OpenSim requirements.

Cheers,
Nirav
Hey Nirav,

This sounds like the perfect thing for me. However, I am having issues getting from step 1 to step 2. Whenever i add a .trc file I get an error "Couldn't load data and/or model for display. Possible reasons: data file as incorrect format or resource file _openSimlab.osim missing". I don't believe my file has an incorrect format because I have used it OpenSim before.

When I use a .mot for Preview Experimental Data no new model appears.

User avatar
Nirav Maniar
Posts: 32
Joined: Tue May 12, 2015 11:03 pm

Re: How to can change the axis origin and orientation?

Post by Nirav Maniar » Mon Jul 11, 2016 5:58 pm

kcbalfou wrote:
Hey Nirav,

This sounds like the perfect thing for me. However, I am having issues getting from step 1 to step 2. Whenever i add a .trc file I get an error "Couldn't load data and/or model for display. Possible reasons: data file as incorrect format or resource file _openSimlab.osim missing". I don't believe my file has an incorrect format because I have used it OpenSim before.

When I use a .mot for Preview Experimental Data no new model appears.
Hey Kathleen,

When you preview experimental data, you will not see a model at all. Depending on whether it is a marker (trc) file or a GRF (mot) file, you will see only the markers or GRF (green arrow) when you play the file after it has been loaded.

The error you have mentioned can, in my experience, be overcome by running OpenSim as an administrator. So next time you go to open OpenSim, right click on the icon and select "run as administrator". Then retry the steps I outlined. Let me know if this does or does not work.

Cheers,
Nirav

User avatar
Guanxin Jiang
Posts: 8
Joined: Fri Mar 18, 2016 5:40 am

Re: How to can change the axis origin and orientation?

Post by Guanxin Jiang » Fri Jul 15, 2016 1:06 am

Hello, I met kind of similiar questions. I am a starter in OpenSim and i try to modify the arm26 model in my bachelor thesis. I mean in the original model, when the forearm does flexion movement, the axis in the elbow is fixed. Right now i want to modify it into unfixed axis when the arm does flexion and extension. How can i do it? Is there any way i can edit a changable axis in the osim file?
THX

User avatar
KATHLEEN BALFOUR
Posts: 9
Joined: Fri Feb 05, 2016 7:19 pm

Re: How to can change the axis origin and orientation?

Post by KATHLEEN BALFOUR » Tue Jul 19, 2016 11:05 am

kneerav wrote: Hey Kathleen,

When you preview experimental data, you will not see a model at all. Depending on whether it is a marker (trc) file or a GRF (mot) file, you will see only the markers or GRF (green arrow) when you play the file after it has been loaded.

The error you have mentioned can, in my experience, be overcome by running OpenSim as an administrator. So next time you go to open OpenSim, right click on the icon and select "run as administrator". Then retry the steps I outlined. Let me know if this does or does not work.

Cheers,
Nirav
Nirav,

I got it! It works great. I am still having intermittent issues with that same error. I have tried running the program as an admin, and I know I have the opensimlab.osim file. So I am unsure why I keep getting the error. However, one time I was able to correctly transform my data!

Thank you!
Kathleen

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: How to can change the axis origin and orientation?

Post by jimmy d » Wed Jul 20, 2016 10:22 am

Kathleen and Nirav,

Could you possibly start a new forum thread. Your discussion, which is great, does not relate to the original question. You are dealing with changing the global orientation of the data, which is not related to editing the axis of a joint.

However, to answer your question. Most people have Matlab code that performs this rotation for them. You can find community code here.

Thanks
-J

POST REPLY