configuration - cpswarm/StageSimulationManager GitHub Wiki
Go to project it.ismb.pert.cpswarm.simulation.stage
-
stageManager.bndrun
it is a run descriptor filestageManager.bndrun
which descrips the needed Felix and all dependency bundles to launch the stage manager and with the following-runproperties:
instruction inside for configuring the launching environment:To set individual System properties with the
-D
option to pass the command line parameters to override the properties listed in the-runproperties:
when running the manager,for example:
java -Dverbosity=0 -jar stageManager.jar
-runproperties: \ org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog,\ org.eclipse.jetty.LEVEL=WARN,\ # Avoid verbose superfluous debug info printed on Stdin. logback.configurationFile=resources/logback.xml,\ # Configuration of ch.qos.logback.core bundle org.apache.felix.log.storeDebug=false,\ # Configuration of org.apache.felix.log bundle to determine whether or not debug messages will be stored in the history org.osgi.service.http.port=8080,\ # The default port used for Felix servlets and resources available via HTTP ros.core.native=true,\ # Indicating if launching the installed ROS system or the rosjava ROScore implementation of the rosjava_core project verbosity=2,\ # Selected verbosity level: 0 NO_OUTPUT, 1 ONLY_FITNESS_SCORE, 2 ALL maxNumber.carts=5,\ # The total number of carts to be scouted, used by fitness function fitness.function=fitness.py,\ # The name of the fitness function script launch.file=stage_complete.launch,\ # The launch file in the simulation ros.master.uri=http://localhost:11311,\ # It is used to manually indicate the Ros environment variable in case the user doesn't set it during the Ros installation Manager.config.file.manager.xml=resources/manager.xml,\ # Specify the location of the configuration file of the Gazebo simulation manager javax.net.ssl.trustStorePassword=changeit,\ javax.net.ssl.trustStore=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/security/cacerts,\ # Replace path of the JDK with the user's value in real use case org.osgi.framework.trust.repositories=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/security/cacerts # Replace path of the JDK with the user's value in real use case
-
resources/manager.xml
It is a configuration file can be used to change some system parameters used by the Stage simulation manager to communicate with other components in the software.
Here is the default values, set the values to be used in the real use case
<settings> <uuid>22e6dbf2-ca2f-437f-8397-49daada26042</uuid> <!-- If present, indicates the UUID to be used in the JID (it is useful to have fixed JIDs) --> <serverURI>123.123.123.123</serverURI> <!-- URI of the XMPP server --> <serverName>pippo.pluto.it</serverName> <!-- name of the XMPP server --> <serverPassword>server</serverPassword> <!-- Password to be used to connect to the XMPP server --> <dataFolder>/home/cpswarm/</dataFolder> <!-- Data folder where to store the data --> <dimensions>2</dimensions> <!-- dimensions supported by the wrapped simulator --> <maxAgents>8</maxAgents> <!-- max agents supported by the wrapped simulator --> <optimizationUser>frevo</optimizationUser> <!-- XMPP user of the optimization tool --> <orchestratorUser>orchestrator</orchestratorUser> <!-- XMPP user of the orchestrator --> <rosFolder>/home/catkin_ws/src/</rosFolder> <!-- folder of the ROS workspace, it must be the <src> folder --> <monitoring>true</monitoring> <!-- indication if the monitoring GUI has to be used or not --> <mqttBroker>tcp://123.123.123.123:1883</mqttBroker> <!-- MQTT broker to be used if the monitoring is set to true --> <timeout>90000</timeout> <!-- Timeout in milliseconds for one simulation --> <fake>false</fake> <!-- Indicate if real simulations need to be done or not --> </settings>
Click the
Export
button in the stageManager.bndrun file -> Selete Export Destination which should be in the same folder with this bndrun file, because the excutable jar has to access to theResources/Manager.xml
configuration file.Run the exported jar in it's folder:
$ java -jar stageManager.jar