Versions Compared

Key

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

If you select this option in the Setup Tab of the LCC (Deploy Remote), the behaviour of the whole deployment changes fundamentally changes . Your software is no longer deployed locally , on your device, but on the NUCs (HLCs) which are used in the Lab. Your system must be set up similarly to the main Lab PC for this option to actually workhave installed the full setup

Requirements

Use the main PC

The main Lab PC (IP: 192.168.1.249) must be running (with an Apache Server), ideally before the NUCs are turned on.

Setting up the NUCs correctly

The NUCs need to be set up properly. They also need to have an automatically starting task running, which looks for new versions of the required files. This It is called crontab task and relies on lab_autostart.bash. 

Info
titleInfo on lab_autostart.bash

This file can also be found in the software repository (./high_level_controller/autostart). It is the only file that currently is not automatically updated on the NUC. Thus, if you change it, you need to re-upload it on the devices for the guest user. The path is described here.

The script is responsible for setting up the environment on the NUCs (e.g. downloading current versions of the cpm library, middleware etc.) so that programs can be deployed on the machines similarly to local deployment.

Provide all required packages

You need to do this before turning the NUCs on.

...

Check again if all four scripts can be found within var/www/html/nuc and if they are up to date. Only then you should start the NUCs.

Info
titleReload after changes

The HLCs use a startup script that takes the cpm library, Middleware etc. from an Apache server located on the Lab's main PC. The according files are updated every single time that these components are built. If you changed them during the lab run / if they are missing, please rebuild them and restart the NUCs/HLCs, so that they get the new software.

This decision was made to reduce upload traffic when files are uploaded to the HLCs during a lab run.

Make sure that all your files are uploaded correctly

Your folder structure must match the recommended folder structure (usage of ~/dev/...) for both the cpm library and the software repository. If your script/program relies on this data, then you should always refer to other programs using paths relative from ~ (so do not use /home/username explicitly). Cpm library and middleware can be found in the same folders on the NUCs. Required environment variables, e.g. for DDS, are set by default, so you do not need to take care of that.

All required data must lie in the same folder as your executable or script. The whole folder containing it gets uploaded to each NUC. If you depend on other data (except for the Middleware or cpm library, which are uploaded separately), put it in that folder, or your program might not work correctly. WARNING: 

Warning

Relative script paths are currently not supported. Also, please do not enter folders that may contain a lot of data (e.g. "./"), because all that data is then uploaded to all NUCs (which, although it gets deleted after they are restarted, might not be a good idea)

Usage of MATLAB

If you use Matlab then you need to use the init script.  It does work for you that you would else need to implement for every single of your own scripts: Load required data (e.g. XML configuration files), setup the reader and writer etc. Alternatively, use a script that is inspired by the init script. QOS_LOCAL_COMMUNICATION.xml is always located in ~/dev/software/middleware/build, and precompiled DDS IDL Matlab files can always be found in ~/dev/software/cpm_lib/dds_idl_matlab. Other files cannot be expected to be found on the NUC, unless you put them in the same folder as your own script.

...

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.

...