Looking for an alternative function to addInStationForce in Matlab API.

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Wei Wang
Posts: 8
Joined: Thu Sep 29, 2016 8:24 am

Looking for an alternative function to addInStationForce in Matlab API.

Post by Wei Wang » Wed Sep 19, 2018 2:00 pm

Hi all,

I am using the calcResidualForceIgnoringConstraints function in Matlab API to get the joint torques, what I want to do is including the ExpressionBasedBushingForces as part of the appliedBodyForces.

However, the forces I got from getRecordValues seemed to be applied at Bushing frames (in the global frame), not at body origins. As far as I know, in C++ API, addInStationForce function can be used to transform the bushing forces to body origin. Does anybody happen to know a similar function in Matlab API can solve my problem?

Thank you and kind regards,
Wei

Tags:

User avatar
Colin Smith
Posts: 53
Joined: Fri Feb 24, 2012 11:50 am

Re: Looking for an alternative function to addInStationForce in Matlab API.

Post by Colin Smith » Thu Sep 20, 2018 5:44 am

I don't know all the details about what you are trying to do, but to transform a vector I think you can do the following in MATLAB:

Frame has a method "findTransformBetween", you could use this to get the Transform between ground and your body Frame.

Then Transform has the following methods you can use to convert the force vector and application point:
xformBaseVecToFrame or xformFrameVecToBase
shiftBaseStationToFrame or shiftFrameStationToBase

User avatar
Wei Wang
Posts: 8
Joined: Thu Sep 29, 2016 8:24 am

Re: Looking for an alternative function to addInStationForce in Matlab API.

Post by Wei Wang » Thu Sep 20, 2018 1:15 pm

Hi Colin,

Thanks for your quick reply! Good to know the method of transform, and I have solved my problem now. :D

POST REPLY