Page 1 of 1

Visualizer setShowShadows in Matlab

Posted: Wed Oct 02, 2019 10:46 pm
by yangkaiwen
Hello,

How do I use seShowShadows Command in Matlab Opensim library. Matlab gave an error message "setShowShadows does not exist"

Here is my setup
osimModel=Model("abc.osim")
osimModel.setUseVisualizer(true);
osimState=osimModel.initSystem();
osimModel.updVisualizer().updSimbodyVisualizer().setShowShadows(true)

Re: Visualizer setShowShadows in Matlab

Posted: Thu Oct 03, 2019 8:36 am
by jimmy
I get an error message in the latest dev version of OpenSim

Code: Select all

>> sviz = osimModel.updVisualizer().updSimbodyVisualizer();
>> sviz.setShowShadows(true)
Java exception occurred:
java.lang.RuntimeException: SimTK Exception thrown at VisualizerProtocol.cpp:745:
  Error detected by Simbody method VisualizerProtocol: An attempt to write() 1 bytes to pipe 742 failed with errno=32 (Broken pipe).
  (Required condition 'status!=-1' was not met.)

	at org.opensim.modeling.opensimSimbodyJNI.SimTKVisualizer_setShowShadows(Native Method)
	at org.opensim.modeling.SimTKVisualizer.setShowShadows(SimTKVisualizer.java:71)
This more detailed message indicates a pipe error between the function and the visualizer. This is a bug so will have to be patched in a future version.

Re: Visualizer setShowShadows in Matlab

Posted: Thu Oct 03, 2019 4:56 pm
by yangkaiwen
Thank you.