Visualizer setShowShadows in Matlab

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Kaiwen Yang
Posts: 45
Joined: Mon Sep 03, 2018 11:25 am

Visualizer setShowShadows in Matlab

Post by Kaiwen Yang » Wed Oct 02, 2019 10:46 pm

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)

Tags:

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: Visualizer setShowShadows in Matlab

Post by jimmy d » Thu Oct 03, 2019 8:36 am

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.

User avatar
Kaiwen Yang
Posts: 45
Joined: Mon Sep 03, 2018 11:25 am

Re: Visualizer setShowShadows in Matlab

Post by Kaiwen Yang » Thu Oct 03, 2019 4:56 pm

Thank you.

POST REPLY