Versions Compared

Key

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

Hello! Welcome to our Lab. On this page we This page will guide you through the installation process of our Lab.Here are the stepsthe Lab:

  1. Install  Ubuntu 18.04.3 LTS.https://ubuntu.com/download                                                                             or

    https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-ubuntu     or

    https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-windows
  2.  Install updates running
    sudo apt update
    sudo apt upgrade
    Create a folder called 'dev' in your home directory
    In this folder clone our cpm software repository into your /dev folder by typing:
    cd ~/dev

    Create the folder '~/dev' and open it in a terminal:

    Code Block
    languagebash
    cd ~
    mkdir dev
    cd dev


  3. Clone the CPM Lab software repository:

    Code Block
    languagebash
    git clone https://
    git.rwth-aachen.de/CPM/Project/Lab/software.gityou have to enter your git username and password
    github.com/embedded-software-laboratory/cpm_lab software


  4. Prepare to run our installation script by getting a license.dat-file for the RTI DDS Connext Service (ask your supervisor if you are a student or get into contact with RTI). This is not required if you are running the eProsima version (which is not yet present in the master branch).
  5.  Run our script to install all necessary components. You find our script in the "software"   In the software folder you have just cloned . You find it in the folder "install-script-for-ubuntu-setup"you find install.sh.

    todofull installationsimulation setup only
    runbash setup_cpm_build_environment.sh


    Code Block
    languagebash
    bash setup_cpm_build_environment.sh
    cd software/
    sudo bash install.sh



    Code Block
    languagebash
    cd software/
    sudo bash install.sh --simulation


    What will it install?Unbuntu packagesUnbuntu packages

    Joystick/ GamepadJoystick/ Gamepad

    RTI DDS Connext or eProsimaRTI DDS Connext or eProsima

    RTI ARM or eProsima ARM

    OpenCV 4.0 for the Indoor Positioning System

    Basler Pylon 5 for the Indoor Positioning System and lab camera

    Reboot your computer       or      
    open a new terminal and type

    cd ~/dev; source


    Info
    titleChange DDS Domain

    If you want to change the DDS Domain later, change the corresponding variable DDS_DOMAIN in /etc/profile.d/rti_connext_dds.sh.

    The following domain IDs are used in the CPM Lab:

    Domain IDPurpose
    21Lab (main computer, NUCs, vehicles)
    61-66Student computers



    Info
    titleChange RTI license file
    If you want to update your license file, change the file at: /opt/rti_connext_dds-6.0.0/rti_license.dat


  6. Reboot your PC.

  7. Optional:
    Setup MATLAB. As a student from RWTH, you can do this with a MathWorks account following these instructions.
    For RTI DDS: Download the DDS Support Package for MATLAB and install the toolbox. The native DDS addon that ships with MATLAB versions from 2021a only supports Simulink. If you are going to code in MATLAB, install the corresponding package from the link.


    To use MATLAB  with eProsima, look here.

    Note

    Make sure to create a symbolic link to the MATLAB binary during or after the setup!


  8. Run the build script. It will also clone the cpm library so keep your git username and password on hand.

    full setuponly simulation setup


    Code Block
    languagebash
    ./build_all.bash



    Code Block
    languagebash
    ./build_all.bash --simulation
     For the middleware usage you need to set up environment variables.Use our script. Open it in the "software folder". It can be loaded into your currently running session by typing:
     . ./environment_variables.bash
    Do not set LD_LIBRARY_PATH for the whole system, only for your current shell.
    Set your local communication parameters by editing the XML template

    You need to replace the template parameter of the QOS_LOCAL_COMMUNICATION.xml.template with the machine's IP address and store the resulting file as QOS_LOCAL_COMMUNICATION.xml. This file can then be loaded by both the Middleware and your script.

    Bash example:

    # Copy local communication QoS, use correct IP
    my_ip=$(ip route get 8.8.8.8 | awk -F"src " 'NR==1{split($2,a," ");print a[1]}')
    sed -e "s/TEMPLATE_IP/${my_ip}/g" \
    <../QOS_LOCAL_COMMUNICATION.xml.template \
    >./QOS_LOCAL_COMMUNICATION.xml



Info
titleTroubleshooting
  • If you
    • encounter unexpected errors
    • have problems during the building process
    • receive an error regarding timing issues of unittests

make sure that the software is up to date and built correctly with

Code Block
languagebash
cd ~/dev/software/
git pull 
git clean -xdf 
./build_all.bash


  • If you ever run build_all.bash  as root , you might run into a lot of permission denied  errors. You need to delete all files and folders that were created and rerun as your usual user.

  • If you receive an error like "dds/someheader.h" not found, run the command "rtiddsgen", which should build the necessary cpp-files