Part of code is shown as below (without setLocked since it failed, now I set the range to 0 but this isn't what I want)
Code: Select all
platformToPelvis = FreeJoint('PlatformToPelvis',platform,locationInParent,orientationInParent,pelvis,locationInChild,orientationInChild,false);
% Update the coordinates of the new joint
jointCoordinateSet1 = platformToPelvis.upd_CoordinateSet();
jointCoordinateSet1.get(0).setRange([0, 0]);
jointCoordinateSet1.get(0).setName('Pelvis_rx');
jointCoordinateSet1.get(0).setDefaultValue(0);
jointCoordinateSet1.get(0).setLocked(true);
jointCoordinateSet1.get(1).setRange([0, 0]);
jointCoordinateSet1.get(1).setName('Pelvis_ry');
jointCoordinateSet1.get(1).setDefaultValue(0);
jointCoordinateSet1.get(2).setRange([-pi, pi]);
jointCoordinateSet1.get(2).setName('Pelvis_rz');
jointCoordinateSet1.get(2).setDefaultValue(0);
jointCoordinateSet1.get(3).setRange([0, 10]);
jointCoordinateSet1.get(3).setName('Pelvis_px');
jointCoordinateSet1.get(3).setDefaultValue(0.9);
jointCoordinateSet1.get(4).setRange([0, 10]);
jointCoordinateSet1.get(4).setName('Pelvis_py');
jointCoordinateSet1.get(4).setDefaultValue(0);
jointCoordinateSet1.get(5).setRange([0, 0]);
jointCoordinateSet1.get(5).setName('Pelvis_pz');
jointCoordinateSet1.get(5).setDefaultValue(0);
https://drive.google.com/open?id=0B4Av7 ... TlHb0pOVDA
I checked the API, it said the setLocked function is defined as
Code: Select all
setLocked (SimTK::State &s, bool aLocked) const