Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleMatlab example of using the init-script:
clc
script_directoy = fileparts([mfilename('fullpath') '.m']);
cd(script_directoy)

% Initialize data readers/writers...
init_script_path = fullfile('../', '/init_script.m');
assert(isfile(init_script_path), 'Missing file "%s".', init_script_path);
addpath(fileparts(init_script_path));
[matlabParticipant, stateReader, trajectoryWriter, systemTriggerReader, readyStatusWriter, trigger_stop] = init_script(matlabDomainID);
cd(script_directoy)

General information

Mapping of vehicle IDs

...

The following data type is used to check for NUC-crashes.

struct HLCHello {
    string source_id; //To find out where the msg came from and to not answer to own msg

    boolean script_running; //If true, a Matlab / C++ session is still running
    boolean middleware_running; //If true, a Middleware session is still running
};

Explanation: Hello messages are sent regularly by each NUC. Missing messages or unexpected entries can be used to detect errors.

  • source_id: This field can be used to obtain the ID of the NUC that sent the message
  • script_running: True if a tmux session for the script is currently running. These sessions are started on the NUC when Deploy Remote is used, after the upload has finished. Usually, when a program crashes, the tmux session is stopped as well, thus this value can be used as an indicator to check if the script crashed.
  • middleware_running: True if a tmux session for the middleware is running. Similar to script_running.

Online-indicators for NUCs

...

As soon as you actually deploy your programs, and after the scripts have been uploaded, the LCC also starts checking if their corresponding tmux sessions (middleware and script) are still running.

Errors are reported in the UI if that it not the case anymore (e.g. with a popup similar to local crash checks, and in the monitoring window for each vehicle).