You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

The setup view allows to launch all components required to perform a simulation from within the LCC's GUI. It can also be used for real vehicles, and to deploy your selected program or script remotely on the NUCs (HLCs).

Selecting a Script

A single script can be selected by editing the path text field or selecting a file using the Open button. In the file chooser, you can select whether you want to use an executable or a Matlab script in a drop down menu at the bottom right of the window.

Required Script Properties

Your script should take the following arguments:

C++Matlab

--vehicle_ids=

--dds_domain=

--node_id=

--simulated_time=

--dds_initial_peer=

(your_params, varargin)

Most of the required C++ parameters are used to set values for the cpm library. Of these parameters, you are probably only interested in the list of vehicle IDs your program is responsible for (--vehicle-ids). The same is true for the matlab script, where varargin gives you a list of vehicle IDs - any other parameters, which come beforehand, are custom.

Further parameters can be specified in the text field below the Open button. If you need to access these command line parameters in your C++ program, simply use the Command Line Parser and --your_param= in the text field. Custom arguments can be set by yourself this way during testing / for your simulations. Matlab custom arguments just need to be passed in a comma-separated fashion (e.g.: 1, 155, 3).

Selecting Vehicles

You can select, for each vehicle individually, whether they should be ignored, simulated, or if a real vehicle is used with that vehicle ID during the simulation. The buttons below the scrollable view allow you to set the state for all vehicles at once. Vehicles that are set to be off will be ignored by your script, as their IDs are not passed to it. You do not need to start the simulated vehicles - the LCC does that for you immediately after selection. They are killed when the simulation is stopped or when another mode (real or off) is chosen.

Warning

If you have not started the LCC with the correct parameters (e.g. use the main server DDS domain), you might not be able to connect to the real vehicles.

Simulated Time

This switch should be self-explanatory - if you want to use simulated time, turn it on, else turn it off.

Lab mode

The IPS tracks the real vehicles, so it should be turned on if real vehicles are used. In any other case, it should stay turned off.

Deploy Remote

This option includes a lot of features, thus we created an own page for it.

Lab Camera

The lab camera enables you to record your experiment. Turn the "Record" switch on, if you want to record your experiment.

After stopping the experiment, you will find the video file in the /tmp/ folder.

If you are planning to play the video on windows without installing codecs, convert the video e.g. with

ffmpeg -i $INPUT_NAME_WITH_FILE_EXTENSION$ -ss $START_IN_SECONDS$ -t $DURATION_IN_SECONDS$ -c:v libx264 -strict -2 -preset slow -pix_fmt yuv420p -f mp4 output.mp4

Deploy / Kill

When you have finished your setup, you can launch all the components / scripts by clicking on Deploy. Not all software starts immediately then. Some, e.g. those that rely on the Middleware, wait until you start the simulation in the Timer Tab. (Wait for the program to show up before you start the simulation)

Local: This starts several tmux sessions that run the required scripts. These sessions are terminated when you press on Kill. A stop signal is sent to all timers when the kill button gets pressed.

Remote: The folder in which the script is located gets uploaded to the NUCs if you choose to deploy the software remotely. Each HLC/NUC script gets assigned a single vehicle ID. IDs are given in ascending order regarding the selected vehicle IDs and the available HLC IDs. Not all vehicles might be controlled, if not enough NUCs are online. Middleware and Script are deployed on the HLCs, simulated vehicles, IPS and CloudDiscoveryService are deployed on the local machine.

Important note: Always use Kill after you have finished, or else some software might end up running on a system until it is restarted.


  • No labels