ArtiSynth Installation Guide for MacOS

7 Loading and Running Models

After ArtiSynth starts up, you can load and run demonstration models. Do this by selecting Models > Demos from the main menu and choosing a demo model (Figure 1).

Figure 1: The ArtiSynth model selection menu.

On older versions of MacOS, errors similar to the following may appear on the Eclipse Console output:

 2021-03-12 11:01:16.949 java[585:230b] invalid drawable

This is due to a problem in the default version of the Java-OpenGL (JOGL) interface. To fix it, go back to the terminal window, and from the ArtiSynth home directory run the command

 > bin/installJOGL2.3.2

Then recompile ArtiSynth.

Once a model is loaded, it will appear in the viewer, and simulation can be controlled using the “play” controls located at the upper right of the application window:

From left to right, these are: step size control, which controls the simulation step size (in seconds); current simulation time (in seconds); and the reset, skip-back, play/pause, single-step and skip-forward buttons. Starting and stopping a simulation is done by clicking play/pause, while reset resets the simulation to time 0. The single-step button advances the simulation by one time step.

On newer versions of MacOS, another problem that may occur when trying to run ArtiSynth models is that MacOS may complain about using a nonvalidated external library. This will take the form of a console error that looks like this:

 not valid for use in process using Library Validation: library load disallowed
 by system policy

The problem here is that one or more of the native libraries are not “known” to Apple and are therefore not trusted. General information on working around this problem is described here:
The short version is to immediately open your Security and Privacy settings after the error occurs, and then, near the bottom of the General tab, you should see a notification about the blocked application with a button to the right labeled Open Anyway. Clicking that button will grant the application a security exception.

Detailed information on how to use the ArtiSynth GUI for model visualization, navigation and simulation control is given in the ArtiSynth User Interface Guide.

Figure 2 shows ArtiSynth with the Spring Net demo loaded.

Figure 2: ArtiSynth with the Spring Net demo loaded.

7.1 Command line arguments

If you are running ArtiSynth from a terminal window (Section 5.2) then you can supply it with command line arguments to control different aspects of its behavior. A full list of these can be seen by running artisynth with the -help option:

 > artisynth -help

Descriptions of these options appear in various places within the ArtiSynth documentation. For example, one commonly used option is -model <modelClassName>, which instructs ArtiSynth to preload a model associated with a given class name:

 > artisynth -model artisynth.demos.mech.SpringMeshDemo

If you are running under Eclipse, command line arguments can be set in the launch configuration, as described in Section 12.4.