Concretely, how do I translate this fragment from an example from testJoints.cpp into python?
Code: Select all
SpatialTransform hipTransform;
hipTransform[0].setCoordinateNames(
OpenSim::Array<std::string>("hip_q0", 1, 1));
hipTransform[0].setFunction(new LinearFunction());
......
CustomJoint hip("hip", ground, hipInPelvis, Vec3(0), osim_thigh, hipInFemur,
Vec3(0), hipTransform);
UPDATE: Finally cracked it.
Code: Select all
spatialTransform = osim.SpatialTransform()
pupdown= osim.ArrayStr()
pupdown.append("p_updown")
spatialTransform.updTransformAxis(0).setCoordinateNames(pupdown)
spatialTransform.updTransformAxis(0).set_function(osim.LinearFunction())
Thanks in advance, Sietse