Hi All,
I want to use the API Visualizer through Matlab as a error checking tool for some spatial transforms I am performing (basically I want to see where some projected points end up to be confident I've done it correctly).
From what I can tell, using the Visualizer through the API with Matlab will require me to call through class Model() to realize states (global positions). But really I only want to view global positions of markers and don't want to initialize a model with my set of markers in ground to do this. Is there a way, through the API/Matlab, to visualize just the markers the way you can through the GUI?
Best,
David
Question about API-Visualizer
Re: Question about API-Visualizer
Hi David,
If you are viewing points in space it may just be easier to plot them in Matlab. Is there a reason why this doesn't work for you?
It is true that you need a Model to get the OpenSim API to create a visualizer. But that Model doesn’t have to have anything in it except for Ground (which may be there by default). You can create an empty model and place some objects on the Ground body, then the visualizer would display them.
Let us know if that works,
-James
If you are viewing points in space it may just be easier to plot them in Matlab. Is there a reason why this doesn't work for you?
It is true that you need a Model to get the OpenSim API to create a visualizer. But that Model doesn’t have to have anything in it except for Ground (which may be there by default). You can create an empty model and place some objects on the Ground body, then the visualizer would display them.
Let us know if that works,
-James
- David John Saxby
- Posts: 83
- Joined: Mon May 09, 2011 8:39 pm
Re: Question about API-Visualizer
Hi James,
Thanks for the reply.
I wanted a "nice" visualizer and Matlab isn't "nice" . Also I was just generally trying to work with the visualizer to expand my OpenSim range.
I found a solution though, as you pointed out a model is abstract.
I used model(), then created a bunch of objects with the transformed global coordinates I wanted and attached sphere vtp's. Then scaled them down to an appropriate size.
There was a trick with the visualizer though (might not be a trick but it took me a while!), you need to call show() even if you passed the model states to the visualizer to get it to realize the geometry files. It says this explicitly in the doxy, but I often go cowboy and don't read the doc's.
Best,
David
Thanks for the reply.
I wanted a "nice" visualizer and Matlab isn't "nice" . Also I was just generally trying to work with the visualizer to expand my OpenSim range.
I found a solution though, as you pointed out a model is abstract.
I used model(), then created a bunch of objects with the transformed global coordinates I wanted and attached sphere vtp's. Then scaled them down to an appropriate size.
There was a trick with the visualizer though (might not be a trick but it took me a while!), you need to call show() even if you passed the model states to the visualizer to get it to realize the geometry files. It says this explicitly in the doxy, but I often go cowboy and don't read the doc's.
Best,
David