Contact CSE | CSE Home  
  HDCP home | ISCR home | FAQ | Events | Site Updates | Contact ISCR

USC SCRover Package Installation and Testing

Follow the instructions in this document to add the USC SCRover code to your MDS Release 6, modify configuration files, and compile the system.

This document assumes you have followed the directions in TPS_MDS.html. Briefly, you must be running Redhat 9.0 and have installed the following software: ACE, gcc3.2.3, Java JRE and JDK, ksh, perl, junit, and Player/Stage. To run the B0107 test, you must also install Matlab 6.5 (R13), Simulink, and the stateflow & stateflow coder toolboxes (see below for more info).

In addition, this document assumes you have installed MDS baseline 5.7.4328 (Release 6), (obtainable from JPL).

If you would like a copy of the SCRover code, please contact Alex Lam at scrover@cse.usc.edu.

To get the MDS code please fill out a JPL Control Clearance form (available here) requesting a Caltech Use license for HDCP research and send the completed form to Kenny Meyer (kenny.meyer@jpl.nasa.gov).

Configuring & Compiling the code:

Now, please do the following steps for compiling:
  1. Set the environment variable MDS_ROOT to the absolute path of the MDS_Rep directory of the MDS distribution.
    For example, in BASH do, "export MDS_ROOT=/.../baseline.5.7.4328/MDS_Rep" You may want to put this environment variable in your .bashrc file or similar configuration file so that the variable is set upon logging in.
  2. Place the SCRover.tar file in $MDS_ROOT and untar it.
  3. JPL uses Defines files to indicate what operating system and compiler you are using. You may need to create/tailor your own Define files for your configuration if they do not already exist. To create your own Defines file:
    • Decide which compiler you wish to use. Most likely this will be gcc3.2.3
    • Determine your kernel release and processor. You can accomplish this by typing in uname -a (Similarly, you can do uname -r -p if you only want the release and processor information.). You should get an answer like this: Linux neo.usc.edu 2.4.20-20.9 #1 Mon Aug 18 11:45:58 EDT 2003 i686 i686 i386 GNU/Linux. My release number is 2.4.20-20.9 and my processor is i686.
    • Create the following files if they do not already exist (you can use existing files as templates):
      $MDS_ROOT/source/com/MakeGeneratorII/Defines_Linux-2.4.20-20.9-i686
      $MDS_ROOT/source/com/MakeGeneratorII/Defines_gcc3.2.3_Linux-2.4.20-20.9-i686_Linux-2.4.20-20.9-i686_debug
      replace the kernel version number with your own uname -a output
  4. MDS has hardcoded into their scripts (files of type .sh, .pm, and .pl and all Defines_ files) specific file paths: (/tps/bin/perl, /tps/java/}. To compile the code, you must do one of the following:
    • Go through each script/file and change
      /tps/bin/perl to your own perl executable
      /tps/java to your own "java" directory. This directory should contain the java sdk libraries and have a bin subdirectory. (For example, at USC we have /tps/java pointed to /usr/java/j2sdk1.4.1_02)
    • If you are root, you can create a /tps directory and add symlinks for /tps/bin/perl and /tps/java. This is what USC did.
  5. Edit $MDS_ROOT/verification/TestMaster/use-ace531.dot. Set MDS_ACE_ROOT on line 2 to the directory where you installed ACE (this is the parent directory of the ACE_wrappers directory).
  6. Edit $MDS_ROOT/verification/TestMaster/xml.dot. Update the variables to reflect your Java JDK installation.
  7. Edit $MDS_ROOT/verification/TestMaster/player.dot. Modify the MDS_COMPILE_DEFINES and MDS_ADDITIONAL_APP_LIBS variables to where you installed the Player libraries
  8. Edit $MDS_ROOT/verification/TestMaster/Configs/Hosts/mist-x86.dot and $MDS_ROOT/verification/TestMaster/Configs/Hosts/mist-common.dot. The paths to ksh, perl, gcc, make, ace, and java should accurately reflect your configuration. These files contain other paths whose correctness are not required to run the SCRover package.
    • When updating the path to gcc3.2.3, please make sure the path {MDS_HOST_GCC323}/bin/gcc and {MDS_HOST_GCC323}/bin/g++ exists on your machine.
  9. Edit $MDS_ROOT/verification/TestMaster/Configs/XML/xml.dot and update the variables to reflect your java installation. If you created a symbolic link to java as indicated in step 4, you do not need to update the variables.
  10. Edit $MDS_ROOT/verification/TestMaster/use-java-linux.dot and update the variables to reflect your java installation. If you created a symbolic link to java as indicated in step 4, you do not need to update the variables.
  11. Edit $MDS_ROOT/verification/TestMaster/tests/UTestHelper.pm. Change line 85 of the file. Append /path/to/player-1.3/lib to the LD_LIBRARY_PATH search path variable.
  12. Enter your ACE_wrappers directory. In this directory, please create the directories: "build/Linux-{Linux_OS}_gcc3.2.3" directory with {Linux OS} replaced with the version number of your Linux operation system. For example, on my machine, I created build/Linux-2.4.20-20.9-i686_gcc3.2.3 In this new directory, please create a symbolic link to the ace directory in the ACE_wrappers directory: ln -s /path/to/ACE_wrappers/ace ace
  13. Obtain a copy of "tmwtypes.h" from JPL and place this file in $MDS_ROOT/source/com/matlab/toolbox/stateflow/mds_cpp/include. The tmwtypes.h file is a file MDS generates with Matlab. Currently, this file is not part of the standard distribution.
  14. Run the B0107test. For more instructions on how to run the B0107test, please scroll down to the next section for more instructions
  15. Here are the commands used to compile the code. Type each of the following in your MDS_Rep/source directory: (Please be sure that you have run the B0107test already or you have copied the B0107test generated files onto your computer.) Each of these compilation steps can take from 1-2 hours time depending on your computer.
    • ./compile.sh -g gcc323x86ace531.dot -g player.dot HdcpRoversFlight
    • ./compile.sh -g gcc323x86ace531.dot -g player.dot apps
      If you encounter a TpsSimMain error, please execute the following command: ./compile.sh -g gcc323x86ace531.dot apps. This should fix the problem. Otherwise, please contact Alex Lam for help.
    • ./compile.sh -g gcc323x86ace531.dot Mds_Fw_Sttp_init
    • ./compile.sh -g gcc323x86ace531.dot Transport
    • ./compile.sh -g gcc323x86ace531.dot TransportTest
  16. Verify the contents in $MDS_ROOT/delivery/Linux-2.4.20-20.9-i686/gcc3.2.3/Unix/debug
    In the bin directory, there should be 8 executable files.
    In the lib directory, there should be 85 .so files.
  17. Now, you are able to run the SCRover code. Please follow the testing instructions below

Running B0107test

Please do not run the B0107test until you get to Step 14 of "Compiling the code"
  1. Install Matlab
  2. Edit $MDS_ROOT/verification/TestMaster/Configs/Hosts/mist-common.dot to reflect your Matlab path
  3. Please make the following changes to the make.cfg files
    • Edit $MDS_ROOT/source/make.cfg. Set SUBDIRS = ver Loki Mds Hdcp
    • Edit $MDS_ROOT/source/Mds/Ra/Mars/make.cfg. Set SUBDIRS = Flight Ground Scheduler Sim FlightSetup
    • Edit $MDS_ROOT/source/Mds/Ra/Mars/Flight/make.cfg. Set SUBDIRS = c++. Specifically, you will be removing GoalNet from the SUBDIRS line.
  4. Type the following in $MDS_ROOT/verification/TestMaster:
    ./runtests.sh -i a4 -z -b $MDS_ROOT -g gcc323x86ace531.dot -g player.dot B0107test
If an error occurs, look in $MDS_ROOT/tmp.a4. If successful, the following files will be generated and you will get the following success message: TESTRUNSTATUS passed 0
  • $MDS_ROOT/delivery/appdepends.Unix
  • $MDS_ROOT/delivery/interfaces
  • $MDS_ROOT/delivery/layers
  • $MDS_ROOT/delivery/libdepends.Unix
  • $MDS_ROOT/source/Makefile.Unix
B0107test also generates the *_adl_def.cpp files found in the Adaptation layer as well as the directory $MDS_ROOT/delivery/share/include/Hdcp.

Testing instructions

  • Start stage (refer to Stage documentation on how to do this). Start with the world files provided by USC, but you are free to use your own worlds. For MRE4 tests, use MRE4.world. For wall-following, use wall.world. (These .world files can be found in the "stage" directory of the SCRover.tar file. Just place them where the other .world files are located in your state installation directory.
  • Go to the $MDS_ROOT/verification/TestMaster directory and choose which SCRover scenario you like to run:
    • To execute wall-following in simulation, type:
      ./runtests.sh -i t3 -z -b $MDS_ROOT -r $MDS_ROOT -g gcc323x86ace531.dot -g player.dot PioneerRoverTest3.sh
      This test should only take about 1-2 minutes to start (on a 2.0GHz, 512 MB machine) and roughly 10 minutes to complete, but you can end the program anytime want.
    • To execute MRE4 (turn 90 degrees, drive 3 meters) in simulation, type:
      ./runtests.sh -i t2b -z -b $MDS_ROOT -r $MDS_ROOT -g gcc323x86ace531.dot -g player.dot PioneerRoverTest2b.sh
      This test may take 2-4 minutes to complete (on a 2.0GHz, 512 MB machine). If you see the rover light up on screen, then everything is ok
    • To execute MRE4 (turn 90 degrees, drive 3 meters) on the actual rover, type:
      ./runtests.sh -i t2 -z -b $MDS_ROOT -r $MDS_ROOT -g gcc323x86ace531.dot -g player.dot PioneerRoverTest2.sh
      This test may take 2-4 minutes to complete (on a 2.0GHz, 512 MB machine).
    The -b flag specifies where you like the compile results to be stored at. Currently, it is stored it at the $MDS_ROOT directory.
    The -g flag specifies the .dot files needed to run the test. This option may be repeated as many times as neccessary. For SCRover test cases, gcc323x86ace531.dot and player.dot are required.
    The -i flag specifies the directory where the test results will be stored. t2, t2b, t3 are the names of the directory where the results of running this script will be stored. (For this flag, you may use any name you wish. You are not required to use the names I have chosen as the name of the directory.) Thus, to see the log files/results that were generated from running the test scenarios, you may go to $MDS_ROOT/tmp.t2b for example if you were running MRE4 in simulation. You may use any name you wish.


  •  
      Contact CSE | Legal
    Copyright © Center for Software Engineering, University of Southern California