Open mrrezaie opened 9 months ago
Hi, as a quick follow up, is there any way to find out the ordering of the state variables returned from state.getQ? Thanks.
Hi, Model::getCoordinateNamesInMultibodyTreeOrder may help:
import opensim as osim
model = osim.Model(model_file_name)
model.initSystem()
coordNames = model.getCoordinateNamesInMultibodyTreeOrder()
[coordNames.getElt(i) for i in range(coordNames.size())]
Hi,
model.getStateVariableNames
andmodel.getStateVariableValues
return coordinates names and values in CoordinateSet order whereasstate.getQ
/U
/UDot
returns coordinates values in multibody tree order. It might make more sense if both of them followed a same order.Thank you.