Table of Contents
Example Clients
Matlab Client Example1
Download Matlab Client Example1 that contains 4 files for the base example client. Visual3DServer currently only runs with 34 bit Matlab clients.
These files ship with the Visual3D Server, and are a great starting point for any application. To run this example, open GUIClient.m and hit run. The connect dialog and a graph will appear.
You can use this example to plot signals contained within the stream, but for you serves as a good starting point for a new client.
The code you want to modify is contained within “function timerFunc(obj, event, handles)”. That function executes on a timer, whose speed can be updated with a text box on the GUI (bottom right corner). In this function you'll see this line “if calllib('V3DSClientLib', 'v3ds_lockMutex');”. When this returns true and the if statement is met, that means there is new data in the stream. After, we buffer new data by putting it in temporary storage “ dataBuffer(end+1) = value; frameBuffer(end+1) = valueFrame +(i-1)/(nFrameVal);”.
After populating your buffers, you need to check if a condition has been met, and if it has, you want to plot the data. In this case, we plot the data after a certain number of frames, with the condition being “ if getappdata(handles.plotWindow,'frameCounter') > str2double(getappdata(handles.plotWindow,'plotFrame'))”. If that condition is true, we plot the signals and clear the buffers (next 15 lines-could be in a separate function).
In your case, you may want to plot the data if a certain event occurred, such as the knee angle reaching a peak, or at mid stance. There are an endless number of possibilities, and the time when you plot new data depend on the application.
Test Client Application
TestClient is installed with Visual3DServer. TestClient is a simple feedback application that allows you to send a pipeline script containing any of the above supported commands to Visual3DServer. The results that come back to the client are then displayed in a 2-D graph by result name and component. The axes show frames versus result values. TestClient is very useful for testing a pipeline script before trying to display more elaborate feedback in another client. You can send any subject speicfic XML model to Visaul3DServer for testing as well.