![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175156/image.png)
SimMechanics - Gimbal Joint Motion Actuation
2 views (last 30 days)
Show older comments
I have a SimMechanics model of a person, created by importing a SolidWorks assembly. I am using motion capture data to drive this model (for the purpose of inverse dynamics analysis), where each model joint is actuated by motion. I am using gimbal joints to represent the person's actual joints (e.g. hip, shoulder, elbow etc) as they have 3 rotational degrees of freedom.
I have written Matlab functions to calculate the Euler/Cardan angles of each joint, i.e. foot to shin, shin to thigh etc, between embedded coordinate systems in each body segment. These angles follow an x-y'-z'' sequence i.e. rotate about x axis first, then (rotated) y', then (twice rotated) z'', to follow the same convention the gimbal joint blocks use. These angles are then used to actuate the joints.
On running my model, however, the body segment orientations are completely wrong. Below is one of the outputs of my Cardan angles function, plotting the embedded coordinate systems onto each joint:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/155459/image.png)
Which looks exactly as it should (each segment x axis is red, y is green, cyan is z). But when I run my SimMechanics model, it's a disaster. This is the first frame, which should correspond with my stick figure above:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/155461/image.png)
Obviously, it's not remotely close, and I cannot work out why. Firstly, an obvious question - is the motion input to a gimbal joint defined in radians, or degrees? I have assumed radians, though I cannot actually see this mentioned in the documentation. I've also added motion sensing to each joint, and checked the sensed positions against the position inputs, and they match, so there's nothing funny happening there. Is the gimbal joint motion actuation definitely about the base x axis, then y', then z''? That's the only thing I can think of that may be causing the problem.
Is anyone able to help me with this?
0 Comments
Answers (1)
Omar Crypps
on 2 Oct 2016
Hi, I designed a model of 1 degree of freedom on Solidworks and i followed all the steps to export it to the Simulink of Matlab. However, there is always an error that appears after exporting it on Simlink.
Unfortuntely, I can't add a screen shot here but the error tells me " Constraint is not supported , the constraint has been exported as unknown constraint .
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175156/image.png)
0 Comments
See Also
Categories
Find more on Multibody Dynamics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!