ArtiSynth Installation Guide for MacOS

7 Loading and Running Models

7.1 Getting past MacOS security

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

 ...
 /Users/lloyd/git/artisynth_core/lib/MacOS64/libPardisoJNI.11.1.2.1.dylib)
 not valid for use in process using Library Validation: library load disallowed
 by system policy
 ...

and/or a popup notice like this:

The problem here is that one or more of the native libraries are not “known” to Apple and are therefore not trusted. Clicking the "?" on the popup will open a window containing more information about what to do.
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. You will then need to exit and restart ArtiSynth.

7.2 Using the Models menu

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.
Figure 2: ArtiSynth with the Spring Net demo loaded.

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, skip-forward and stop-all 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. The stop-all button will also stop the simulation, as well as any Jython commands or scripts that are running.

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.

7.3 Other ways to load models

It is possible to load models in several ways:

  • Using a model menu entry, as described above;

  • Specifying the Java class describing the model (“Load from class ...” from the Models menu);

  • Specifying a .art file containing a text representation of the model (“Load model ...” from the File menu);

  • Reloading a recently loaded model (“Load recent” from the Models menu).

It is also possible to configure ArtiSynth to load a specific model when it starts up; see “Loading, Simulating and Saving Models” in the ArtiSynth User Interface Guide. The model menu can also be customized, as described in “Customizing the Model Menu”.

7.4 Viewing and interacting with models

The ArtiSynth user interface provides a variety of tools for exploring and interacting with models, as described in depth in the ArtiSynth User Interface Guide, including:

  • 3D viewers with grids and clipping planes;

  • Component selection using either a viewer or a tree-based navigation panel;

  • Property inspection and editing for selected components;

  • 3D fixtures for translating, rotating and applying forces to models and their components;

  • A timeline for viewing and organizing input/output data streams known as probes;

  • Some simple model editing, including the ability to interactively delete components and add marker points;

  • Making movies from simulations.

7.5 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 13.4.