Recent Changes - Search:

PmWiki

pmwiki.org

edit SideBar

Running Hlacerti Demos

Run a hlacerti demo in one computer (localhost)

See the manual for see the different ways to use Ptolemy with CERTI (particularly section 6.2 Installing CERTI).

  • Open a terminal and execute the shell ($CERTI_HOME is the path of your installation of CERTI):
source $CERTI_HOME/share/scripts/myCERTI_env.sh
  • The rtig process can be launched automatically (by the first Ptolemy federate model) or manually by the user. If there is a rtig running, and you want to launch it automatically, then you need to kill the process (e.g., pkill rtig)
  • Go to the folder where the Ptolemy federation is (with the .fed file) and open the models. For executing the f14 Ptolemy federation:
cd $PTII/org/hlacerti/demo/f14HLA/AllFederatesTAR
$PTII/bin/vergil f14HlaTAR.xml &
  • Click on each model name and run them in the order they appear. The first federate, Aircraft, launches the rtig, and the last one, AutoPilot, is the register of the synchronization point.

Remark: There is an issue with macOS El Capitan and after. Even if CERTI and Ptolemy are successifuly installed, the demos in the folder $PTII/org/hlacerti/demo do not work, with models stuck with the message initializing (in the left botton corner) and an error message. Please check the manual or https://chess.eecs.berkeley.edu/ptexternal/wiki/Main/HLA\#ElCapitan.

Run f14 demo on two computers C1 and C2

  • In each computer, run in a terminal the command line ifconfig.
  • Check if the two computers C1 and C2 are connected to a same LAN and note their IP number. Let us call them IP1 and IP2 respectively. Notice that you can also use a ssh -X host-name.

Scenario 1: Launch the rtig in IP1, and all Ptolemy federates in IP2.

  • In computer IP1 (only launches rtig). Remark: if you do not have the rights to write in $CERTI_HOME/share/federations, you can append the folder where the .fed file is to the environment variable CERTI_FOM_PATH
source $CERTI_HOME/share/scripts/myCERTI_env.sh
cp $PTII/org/hlacerti/demo/f14HLA/AllFederatesTAR/priseV2.fed $CERTI_HOME/share/federations
rtig
  • In computer IP2:
source $CERTI_HOME/share/scripts/myCERTI_env.sh
export CERTI_HOST=IP1
cd $PTII/org/hlacerti/demo/f14HLA/AllFederatesTAR
  • Be sure rtig is running on IP1. Open and run the models (the last one to be launched must be f14PilotStick.xml):
$PTII/bin/vergil f14HlaTAR.xml &
  • In the terminal on computer IP1 the contents of priseV2.fed appears and the models are executed.

Scenario 2: The first Ptolemy federate is launched on computer C1 (it also launches the rtig process) and the other(s) is(are) launched on C2.

  • In each computer, run in a terminal the command line ifconfig.
  • Check if the two computers C1 and C2 are connected to a same LAN and note their IP number. Let us call them IP1 and IP2 respectively.
  • In computer IP1:
source $CERTI_HOME/share/scripts/myCERTI_env.sh
export CERTI_HOST=localhost
cd $PTII/org/hlacerti/demo/f14HLA/AllFederatesTAR
$PTII/bin/vergil f14Aircraft.xml &
(run the model)
  • In computer IP2:
source $CERTI_HOME/share/scripts/myCERTI_env.sh
export CERTI_HOST=IP1
cd $PTII/org/hlacerti/demo/f14HLA/AllFederatesTAR
$PTII/bin/vergil f14AutoPilot.xml f14PilotStick.xml &
(run f14AutoPilot then f14PilotStick)
  • In the terminal on computer IP1 the contents of priseV2.fed appears and the models are executed.
Edit - History - Print - Recent Changes - Search
Page last modified on June 05, 2019, at 09:02 AM