Rotation Axes
- Cristina Curreli
- Posts: 14
- Joined: Wed Oct 28, 2015 8:51 am
Rotation Axes
Dear OpenSim users,
I am currently struggling with the definition of the TransformAxes which describe the spatial position/orientation of B in P.
In particular, I’d like to better understand in which reference system OpenSims defines the three rotation axes. Let’s assume that, in the simplest case, the axis in rotation1 is (0 0 1), the axis in rotation2 is (0 1 0) and the one in rotation3 is (1 0 0). I’m quite sure that the axis in rotation1 is the Z versor of the parent reference system, in fact the first rotation is around the Z fixed axis of the parent body. I guess that the axis2 and axis3 are defined in the child/moving reference system but what I noticed is that rotation2 is not always around the Y versor of the chid frame.
Can anyone help me to clarify this point?
Thanks,
Cristina
I am currently struggling with the definition of the TransformAxes which describe the spatial position/orientation of B in P.
In particular, I’d like to better understand in which reference system OpenSims defines the three rotation axes. Let’s assume that, in the simplest case, the axis in rotation1 is (0 0 1), the axis in rotation2 is (0 1 0) and the one in rotation3 is (1 0 0). I’m quite sure that the axis in rotation1 is the Z versor of the parent reference system, in fact the first rotation is around the Z fixed axis of the parent body. I guess that the axis2 and axis3 are defined in the child/moving reference system but what I noticed is that rotation2 is not always around the Y versor of the chid frame.
Can anyone help me to clarify this point?
Thanks,
Cristina
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Rotation Axes
Hi,
I would suggest you to read the simbody theory manual p47 for more details.
https://simtk.org/docman/view.php/47/23 ... Manual.pdf
The coordinate rotates with respect to the parents axis. Although, if constraints are presented, this motion may change. You can check this by searching for the coordinate name in the .osim file and see if constraints are presented.
Best
I would suggest you to read the simbody theory manual p47 for more details.
https://simtk.org/docman/view.php/47/23 ... Manual.pdf
The coordinate rotates with respect to the parents axis. Although, if constraints are presented, this motion may change. You can check this by searching for the coordinate name in the .osim file and see if constraints are presented.
Best
- Cristina Curreli
- Posts: 14
- Joined: Wed Oct 28, 2015 8:51 am
Re: Rotation Axes
Thanks Jim for you answer and your kind suggestion.
I'm not considering any constraints at the moment.
I think that only the axis for rotation1 is defined in the 'fixed' parent mobilizer frame and the rotation1 is always around that fixed axis. Also, I noticed that the axis for rotation3 is referred to the moving child mobilizer frame. I would say that for rotation2 we have a 'floating' axis in the sense of Grood & Suntay (1983).
My conclusion could also be wrong. I'd really love to have some comments on this.
Thanks,
Cristina
I'm not considering any constraints at the moment.
I think that only the axis for rotation1 is defined in the 'fixed' parent mobilizer frame and the rotation1 is always around that fixed axis. Also, I noticed that the axis for rotation3 is referred to the moving child mobilizer frame. I would say that for rotation2 we have a 'floating' axis in the sense of Grood & Suntay (1983).
My conclusion could also be wrong. I'd really love to have some comments on this.
Thanks,
Cristina
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Rotation Axes
Hi,
Can you attach the model so I can have a look?
Best
Can you attach the model so I can have a look?
Best
- Cristina Curreli
- Posts: 14
- Joined: Wed Oct 28, 2015 8:51 am
Re: Rotation Axes
Hi Jim,
Let’s consider a very simple example in which we have two bodies: ground (parent body) and thorax (child) and a ground_thorax Joint (CustomJoint) with 6 dof and no constraints.
The six coordinates are:
- rot_Z (type: rotational ; axis: 0 0 1)
- rot_y (type: rotational ; axis: 0 1 0)
- rot_X (type: rotational ; axis: 1 0 0)
- ground_thorax_tx (type: translational ; axis: 1 0 0)
- ground_thorax_ty (type: translational ; axis: 0 1 0)
- ground_thorax_tz (type: translational ; axis: 0 0 1)
In order to better visualize the problem, let’s put 0.1 as default value for ground_thorax_tx. For the others, we just put 0.
We can visualize 4 frames (Figure attached):
- P is the parent body frame, with origin P0.
- F is the mobilizer’s fixed frame attached to P, with origin F0.
- B is the child body frame, with origin B0.
- M is the mobilizer’s moving frame attached to B, with origin M0.
Let’s assume that in the ground_thorax JointProperties, location in parent, orientation in parent, location and orientation are all (0 0 0) so that both Xpf (transform matrix from P to F) and Xbm (transform matrix from B to M) is an identity matrix.
Now let’s have a look at the coordinates window.
If we change the coordinate values by playing with the sliders, we can say without any doubts that the axes for traslation1/translation2/translation3 are specified in the fixed parent frame F.
Also, the axis for rotation1 is a versor defined in the fixed parent frame F. In fact, whatever is the orientation and position of M with respect to F at time t, rotation1 is always around the axis which pass through the origin M0 and has a fixed direction described by the unit vector (0 0 1) in the fixed parent frame and they all pass through point M0.
Would be great if you can move the sliders for rotation2 e rotation3 and notice that the (1 0 0) vector for rotation 3 is not a fixed vector defined in the parent frame F, the same for rotation2.
My (short) experience says that the axis for rotation3 is defined in the moving frame M; the one for rotation2 is the common axis perpendicular to axis1 and axis3.
I guess there is a simple rule or a univocal definition for that but unfortunately I don’t find it. Sorry for that and many many thanks for your big help.
The forum says ‘invalid file extension’ for .osim and .xml files when I try to attach the example model. Can I send it to you by email?
Thanks,
Cristina
Let’s consider a very simple example in which we have two bodies: ground (parent body) and thorax (child) and a ground_thorax Joint (CustomJoint) with 6 dof and no constraints.
The six coordinates are:
- rot_Z (type: rotational ; axis: 0 0 1)
- rot_y (type: rotational ; axis: 0 1 0)
- rot_X (type: rotational ; axis: 1 0 0)
- ground_thorax_tx (type: translational ; axis: 1 0 0)
- ground_thorax_ty (type: translational ; axis: 0 1 0)
- ground_thorax_tz (type: translational ; axis: 0 0 1)
In order to better visualize the problem, let’s put 0.1 as default value for ground_thorax_tx. For the others, we just put 0.
We can visualize 4 frames (Figure attached):
- P is the parent body frame, with origin P0.
- F is the mobilizer’s fixed frame attached to P, with origin F0.
- B is the child body frame, with origin B0.
- M is the mobilizer’s moving frame attached to B, with origin M0.
Let’s assume that in the ground_thorax JointProperties, location in parent, orientation in parent, location and orientation are all (0 0 0) so that both Xpf (transform matrix from P to F) and Xbm (transform matrix from B to M) is an identity matrix.
Now let’s have a look at the coordinates window.
If we change the coordinate values by playing with the sliders, we can say without any doubts that the axes for traslation1/translation2/translation3 are specified in the fixed parent frame F.
Also, the axis for rotation1 is a versor defined in the fixed parent frame F. In fact, whatever is the orientation and position of M with respect to F at time t, rotation1 is always around the axis which pass through the origin M0 and has a fixed direction described by the unit vector (0 0 1) in the fixed parent frame and they all pass through point M0.
Would be great if you can move the sliders for rotation2 e rotation3 and notice that the (1 0 0) vector for rotation 3 is not a fixed vector defined in the parent frame F, the same for rotation2.
My (short) experience says that the axis for rotation3 is defined in the moving frame M; the one for rotation2 is the common axis perpendicular to axis1 and axis3.
I guess there is a simple rule or a univocal definition for that but unfortunately I don’t find it. Sorry for that and many many thanks for your big help.
The forum says ‘invalid file extension’ for .osim and .xml files when I try to attach the example model. Can I send it to you by email?
Thanks,
Cristina
- Attachments
-
- figure1.png (60.99 KiB) Viewed 2513 times
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Rotation Axes
Sorry I can't see the problem. The definition of the joint is a convention. The type of the joint defines how frame M moves with respect to frame F. For the CustomJoint the definition is each translation is a displacement of M wrt F. As for the rotation, it is a rotation around the axis of the frame M. If for some reason you need some other convention, you need to define your own joint.
Best
Best
- Cristina Curreli
- Posts: 14
- Joined: Wed Oct 28, 2015 8:51 am
Re: Rotation Axes
Thanks a lot Jim.
Yes, for me is clear that the translations/rotations in the CustomJoint are defined as displacement/rotation of M wrt F. But not very clear the frame/s in which the rotation axes are defined.
Let's define the rotation axes: (0 0 1), (0 1 0) and (1 0 0) respectively for pelvis_tilt, pelvis_list, pelvis_rotation of your model. Now, in my opinion, if you move the slider of pelvis_tilt you will see a rotation of M around an axis1 passing through M0 but with a direction which is the same of the axis Z of F. If you move the slider of pelvis_rotation, you will see a rotation of M around the axis X of the moving frame M. If you move the slider of pelis_list, you may see the frame M rotating around an axis passing through M0 which is perpendicular to axis1 and axes3.
Please, correct me, if I’m wrong.
Thanks again,
Cristina
Yes, for me is clear that the translations/rotations in the CustomJoint are defined as displacement/rotation of M wrt F. But not very clear the frame/s in which the rotation axes are defined.
Let's define the rotation axes: (0 0 1), (0 1 0) and (1 0 0) respectively for pelvis_tilt, pelvis_list, pelvis_rotation of your model. Now, in my opinion, if you move the slider of pelvis_tilt you will see a rotation of M around an axis1 passing through M0 but with a direction which is the same of the axis Z of F. If you move the slider of pelvis_rotation, you will see a rotation of M around the axis X of the moving frame M. If you move the slider of pelis_list, you may see the frame M rotating around an axis passing through M0 which is perpendicular to axis1 and axes3.
Please, correct me, if I’m wrong.
Thanks again,
Cristina
- Attachments
-
- Immagine.png (58.19 KiB) Viewed 2494 times
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Rotation Axes
Hi,
Ok I see, I also confused this! Rotation is defined as the rotation of M wrt F. So the axis that you define correspond to the axis of frame F and the rotation is always referred as rotation around these axis and not the axis of the local body frame. So if you keep pelvis_rotation you see a natural rotation about the local coordinate system M (not true), but if you change this coordinate you see a rotation around some other axis that is not in M. But it is the other way around, it is always around the axis defined in F.
Best
Ok I see, I also confused this! Rotation is defined as the rotation of M wrt F. So the axis that you define correspond to the axis of frame F and the rotation is always referred as rotation around these axis and not the axis of the local body frame. So if you keep pelvis_rotation you see a natural rotation about the local coordinate system M (not true), but if you change this coordinate you see a rotation around some other axis that is not in M. But it is the other way around, it is always around the axis defined in F.
Best
- Guanxin Jiang
- Posts: 8
- Joined: Fri Mar 18, 2016 5:40 am
Re: Rotation Axes
Hello Stanev and Curreli,
i saw the discussion between you two and it trully inspires me a lot. Right now i am working on modifying an elbow model arm26, which was shared on the website of opensim. My aim is to change the elbow flexion axis from a fixed one to an unfixed one when the arm does flexion and extension movement. I need to change both the position and orientation of this axis. So i am thinking if it is possible to do this using the way you discussed?
i saw the discussion between you two and it trully inspires me a lot. Right now i am working on modifying an elbow model arm26, which was shared on the website of opensim. My aim is to change the elbow flexion axis from a fixed one to an unfixed one when the arm does flexion and extension movement. I need to change both the position and orientation of this axis. So i am thinking if it is possible to do this using the way you discussed?