Versions Compared

Key

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

...

  • offset_nanoseconds: Set the offset of the communication w.r.t. ~1970 (TODO, real time) or 0 (simulated time); should usually not be changed
  • use_param_server: Irrelevant parameter, false is default (true currently not required, would break the middleware)
  • log_topic: Topic name of the logging topic (logs that are collected by the LCC)
  • hlc_state_topic: Topic name of the vehicle state list topic for the vehicle information sent to the HLC
  • vehicle_state_topic: Topic name of the vehicle states sent by the vehicles
  • hlc_trajectory_topic: Topic name of the trajectory commands sent by the HLC
  • vehicle_trajectory_topic: Topic name of the trajectory commands sent to the vehicles
  • hlc_speed_curvature_topic: Topic name of the speed curvature commands sent by the HLC
  • vehicle_speed_curvature_topic: Topic name of the speed curvature commands sent to the vehicles
  • hlc_direct_topic: Topic name of the direct control commands sent by the HLC
  • vehicle_direct_topic: Topic name of the direct control commands sent to the vehicles

Scripts

Different scripts have already been written to test and deploy the middleware together with all necessary libraries and a matlab program on the local or other machines. These scripts can be found in ./Middleware/remote and ./Middleware/local.

Bash Scripts for Deployment on Other Machines

Basic usage

  • Open the folder deploy
  • Call the deploy script by typing bash deploy.bash [ip address] [vehicle id] [id of the terminal windows started remotely] [id of the middleware in the DDS network] [id of the DDS domain of the vehicles and LCC] [boolean value: simulated time]. If the password set in pw.txt matches the password on the machine on which you want to deploy the Middleware (and use other scripts), then this command should suffice to start the software on another machine.
  • WARNING: Always use Ctrl + C to stop the script. Otherwise, the processes on the other machine are not killed.

Editing the HLC Script

Currently, the content of the Matlab folder is uploaded to the HLCs. Any Matlab script contained in this folder can be used as a HLC script. To call a hlc script, simply change the last line of matlab_start.bash

/home/controller/Documents/Matlab/bin/matlab -nodisplay -nosplash -logfile matlab.log -nodesktop -r "cd '/home/controller/Documents/Remote/Matlab/'; dummy_line_speedCurvature(${vehicleID})"

to

/home/controller/Documents/Matlab/bin/matlab -nodisplay -nosplash -logfile matlab.log -nodesktop -r "cd '/home/controller/Documents/Remote/Matlab/'; name_of_your_script(${vehicleID})"

Debugging

If the middleware or HLC script for some reason do not work - that is, if the vehicle does not do anything up to 60 seconds after the scripts were started - possible error messages do not appear in the console window where bash deploy.bash ... was called.

You can use

sshpass -p password ssh controller@ip_address

(replace password and ip_address) to remotely access the HLC. Then, type ls. Your should see two files (and some other files): middleware.txt and matlab.log. Using cat, you can print the content of these files in the console. They contain the output of the consoles that were started remotely on the HLC to start the Middleware and the Matlab script and may contain error messages that can help you with debugging e.g. your script.

TODO: More info here?

Communication between HLC and Middleware

...