@@ -342,7 +342,8 @@ void compareMotionTables(const TimeSeriesTable& report,
342
342
auto found = std::find (stdLabels.begin (), stdLabels.end (), label);
343
343
if (found != stdLabels.end ()) {
344
344
// skip any pelvis translations
345
- if (found->find (" pelvis_t" ) == std::string::npos) {
345
+ if (found->find (" pelvis_t" ) == std::string::npos ||
346
+ label.length () != 9 ) {
346
347
index = (int )std::distance (stdLabels.begin (), found);
347
348
}
348
349
}
@@ -373,12 +374,11 @@ void testInverseKinematicsSolverWithOrientations()
373
374
auto orientationsData = convertMotionFileToRotations (
374
375
model, " std_subject01_walk1_ik.mot" );
375
376
376
- OrientationsReference oRefs (orientationsData);
377
- oRefs.set_default_weight (1.0 );
377
+ std::shared_ptr<OrientationsReference>
378
+ oRefs (new OrientationsReference (orientationsData));
379
+ oRefs->set_default_weight (1.0 );
378
380
379
- const std::vector<double >& times = oRefs.getTimes ();
380
-
381
- MarkersReference mRefs {};
381
+ const std::vector<double >& times = oRefs->getTimes ();
382
382
383
383
SimTK::Array_<CoordinateReference> coordinateRefs;
384
384
@@ -397,10 +397,10 @@ void testInverseKinematicsSolverWithOrientations()
397
397
SimTK::State& s0 = model.initSystem ();
398
398
399
399
// create the solver given the input data
400
- InverseKinematicsSolver ikSolver (model, mRefs , oRefs, coordinateRefs);
400
+ InverseKinematicsSolver ikSolver (model, nullptr , oRefs, coordinateRefs);
401
401
ikSolver.setAccuracy (1e-4 );
402
402
403
- auto timeRange = oRefs. getValidTimeRange ();
403
+ auto timeRange = oRefs-> getValidTimeRange ();
404
404
cout << " Time range from: " << timeRange[0 ] << " to " << timeRange[1 ]
405
405
<< " s." << endl;
406
406
@@ -443,16 +443,16 @@ void testInverseKinematicsSolverWithEulerAnglesFromFile()
443
443
444
444
SimTK::State& s0 = model.initSystem ();
445
445
446
- MarkersReference mRefs {};
447
- OrientationsReference oRefs (" subject1_walk_euler_angles.sto" );
446
+ std::shared_ptr<OrientationsReference> oRefs (
447
+ new OrientationsReference (" subject1_walk_euler_angles.sto" ) );
448
448
SimTK::Array_<CoordinateReference> coordRefs{};
449
449
450
450
// create the solver given the input data
451
451
const double accuracy = 1e-4 ;
452
- InverseKinematicsSolver ikSolver (model, mRefs , oRefs, coordRefs);
452
+ InverseKinematicsSolver ikSolver (model, nullptr , oRefs, coordRefs);
453
453
ikSolver.setAccuracy (accuracy);
454
454
455
- auto & times = oRefs. getTimes ();
455
+ auto & times = oRefs-> getTimes ();
456
456
457
457
s0.updTime () = times[0 ];
458
458
ikSolver.assemble (s0);
0 commit comments