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
Looking for an alternative function to addInStationForce in Matlab API.
- Colin Smith
- Posts: 53
- Joined: Fri Feb 24, 2012 11:50 am
Re: Looking for an alternative function to addInStationForce in Matlab API.
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
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
Re: Looking for an alternative function to addInStationForce in Matlab API.
Hi Colin,
Thanks for your quick reply! Good to know the method of transform, and I have solved my problem now.
Thanks for your quick reply! Good to know the method of transform, and I have solved my problem now.