Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Matlab install via mpm instructions added

TODO Maybe general setup that's required with RWTH licenses, adjust environment variables

...

Matlab Installation (or Upgrade)

The Matlab Package Manager (mpm) can be used to install Matlab on a NUC via the command line. An exemplary bash script to remove current versions and install a new one follows.

#!/bin/bash

cd /tmp

# remove installed versions if present
rm -rf /usr/local/MATLAB/R2020a/
rm -rf /usr/local/MATLAB/R2022a/
rm -rf /opt/MATLAB/R2020a/
rm -rf /opt/MATLAB

# get mpm
wget -q https://www.mathworks.com/mpm/glnxa64/mpm
chmod +x mpm

# install release and toolboxes
MATLAB_RELEASE=r2023a
TOOLBOXES="Parallel_Computing_Toolbox ROS_Toolbox Statistics_and_Machine_Learning_Toolbox Symbolic_Math_Toolbox"
./mpm install --release=$MATLAB_RELEASE --destination=/usr/local/MATLAB/R2023a/ --products MATLAB $TOOLBOXES

# symbolic link
ln -sf /usr/local/MATLAB/R2023a/bin/matlab /usr/local/bin/matlabR2023a

# remove mpm
rm -f mpm /tmp/mathworks_root.log

Network Setup

Matlab is set up on the NUCs using a network license using this guide. We currently use the Matlab 2023a version.

If an existing installation with license is present on a NUC, simply copying the licenses folder in the installation directory (e.g. /usr/local/MATLAB/R2023a/licenses) to the new installation folder suffices.

DDS Setup

You can find all information required to set up RTI DDS in Matlab here: https://www.mathworks.com/hardware-support/rti-dds.html.

...

To use RTI DDS Support, you must have RTI DDS installed on your system. If that is not the case, please refer to rtiddsbasics.md for further information.

Important Environment Variables

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:
    /home/controller/Documents...: /Remote/Libs:/Library files of cpm lib (libcpm.so) and middleware (libadditional_idl.so)
    /home/controlleropt/rti_connext_dds-56.30.10/lib/x64Linux3gcc5x64Linux4gcc7.43.0
PATH=$PATH:
    $HOME/bin:
    $HOME/.local/bin:
    /homeopt/controller/rti_connext_dds-56.30.10:
    /home/controlleropt/rti_connext_dds-56.30.10/bin:
    /home/controlleropt/rti_connext_dds-56.30.10/lib/x64Linux3gcc5x64Linux4gcc7.43.0:
    $HOME/opt/rti_connext_dds-56.30.10/bin:
    $HOME/Documentsopt/raspbian-toolchain-gcc-4.7.2-linux64/bin
NDDSHOME=$HOME/opt/rti_connext_dds-56.30.1
0
RTI_LICENSE_FILE=$HOME/opt/rti_connext_dds-56.30.10/rti_license.dat

Your installation paths might be different, so you might need to change some of them.