I was wondering if you could help me with the API visualizer. I have used it through the Matlab API before, but I now need it in C++ and I can't get it to work...
Here are the relevant steps in Matlab:
Code: Select all
osimModel = Model('my_model.osim');
osimModel.setUseVisualizer(true);
state = osimModel.initSystem;
osim_viz = osimModel.updVisualizer;
osim_viz.show(state);
osim_viz.show(state);
at every iteration to display the new model position + colour of muscles. It works fine.
In C++, I've done:
Code: Select all
Model osimModel("my_model.osim");
osimModel.setUseVisualizer(true);
osimModel.buildSystem();
SimTK::State& state = osimModel.initializeState();
OpenSim::ModelVisualizer& osim_viz = osimModel.updVisualizer();
osim_viz.show(state);
Any help would be greatly appreciated!
Best wishes,
Dimitra