Snippets

Carlos Rueda ESPComponent testing with LRAUV and ESP simulators

Created by Carlos Rueda

File snippet.markdown Added

  • Ignore whitespace
  • Hide word diff
+### Testing with simulators on bufflehead and tethyssim:
+
+**Note**: the config parameter ESPComponent.simulateHardware is false for these tests: the ESP simulator 
+is still an external process and the ESPComponent interacts with it as if it were a real ESP.)
+
+
+### On bufflehead
+
+Image of the ESP software ready to be exercised  (under carueda's home):
+
+```
+   $ cd esp2
+   $ . bin/ESPenv auv honu
+   $ ESPmode=simreal
+```
+
+Make sure the ESP simulator has enough "dry" cartridges. For this you can simply run `Cmd.slot All=>:dry`:
+
+```
+  $ esp
+  -> Cmd.slot All=>:dry
+  {All => :dry}
+  -> Cmd.map
+  {1 => :dry,
+   2 => :dry,
+   3 => :dry,
+   4 => :dry,
+   5 => :dry}
+  -> exit       # note, exit the ESP simulator herre for what follows.
+```
+
+Then, in this bufflehead session, prepare the following command but do not launch it yet:
+
+```
+  $ ESPclient=tethyssim:9998 ESPcmdPort=7777 esp
+```
+
+This prepares the subsequent execution of the ESP system (see below) once the socket server
+is running on the (simulated) vehicle.
+
+
+### On tethyssim:
+
+Using `Missions/Maintenance/sample.xml` for this testing. 
+Parameters that can be adjusted for testing convenience, for example:
+
+- Depth = 1
+- NumberOfSamples = 2
+
+
+Here's an actual session:
+
+```
+[carueda@tethyssim lrauv-application]$ bin/LRAUV -r -x "run Maintenance/sample.xml"
+
+2016-01-21T17:03:15.182Z,1453395795.182 [Supervisor](INFO): Main Thread ID is 1692
+2016-01-21T17:03:15.183Z,1453395795.183 [CommandLine ThreadHandler](INFO): Handler Thread ID is 1814
+2016-01-21T17:03:15.183Z,1453395795.183 [logger ThreadHandler](INFO): Handler Thread ID is 1815
+2016-01-21T17:03:15.183Z,1453395795.183 [CommandLine ThreadHandler](INFO): Handler Thread ID is 1812
+2016-01-21T17:03:15.183Z,1453395795.183 [controlThread ThreadHandler](INFO): Handler Thread ID is 1813
+2016-01-21T17:03:15.183Z,1453395795.183 [CTD_NeilBrown ThreadHandler](INFO): Handler Thread ID is 1817
+2016-01-21T17:03:15.183Z,1453395795.183 [WetLabsBB2FL ThreadHandler](INFO): Handler Thread ID is 1818
+2016-01-21T17:03:15.183Z,1453395795.183 [DeadReckonUsingMultipleVelocitySources](INFO): Will consider orientation measurement stale after 120s.
+2016-01-21T17:03:15.183Z,1453395795.183 [DeadReckonUsingMultipleVelocitySources](INFO): Will consider velocity measurement stale after 20s.
+2016-01-21T17:03:15.183Z,1453395795.183 [DeadReckonUsingSpeedCalculator](INFO): Will consider orientation measurement stale after 120s.
+2016-01-21T17:03:15.183Z,1453395795.183 [DeadReckonUsingSpeedCalculator](INFO): Will consider velocity measurement stale after 20s.
+2016-01-21T17:03:15.183Z,1453395795.183 [NavChartDb ThreadHandler](INFO): Handler Thread ID is 1820
+2016-01-21T17:03:15.183Z,1453395795.183 [NavChartDb](FAULT): Change detected in ENC collection. Wiping NavChart Directory
+2016-01-21T17:03:15.184Z,1453395795.184 [NavChartDb](INFO): Looking for Electronic Nav Chart files in directory: Resources/ElectronicNavigationCharts
+2016-01-21T17:03:15.184Z,1453395795.184 [NavChartDb](IMPORTANT): Will load Electronic Nav Chart data from US5CA62M.000
+2016-01-21T17:03:15.184Z,1453395795.184 [ExternalSim](INFO): ExternalSim initializing...
+2016-01-21T17:03:15.285Z,1453395795.285 [MissionManager](INFO): DefineArg sample:SampleAtDepth.ESPComponentTimeout = 7.000000 min
+2016-01-21T17:03:15.286Z,1453395795.286 [CommandLine](IMPORTANT): Running ./Missions/Maintenance/sample.xml
+2016-01-21T17:04:44.797Z,1453395884.797 [Startup:StartupSatComms](INFO): Completed Startup:StartupSatComms
+2016-01-21T17:04:44.797Z,1453395884.797 [Startup](INFO): Completed Startup
+2016-01-21T17:04:45.196Z,1453395885.196 [MissionManager](IMPORTANT): Started mission sample
+2016-01-21T17:12:26.794Z,1453396346.794 [ESPComponent](INFO): manually powering up ESP
+2016-01-21T17:12:26.794Z,1453396346.794 [ESPComponent](IMPORTANT): Starting PPPD with command:/sbin/pppd xonxoff asyncmap A0000 /dev/ttyS1 linkname esp noauth local lock 115200 134.89.10.51:134.89.10.60 persist maxfail 0 holdoff 10 lcp-echo-interval 60 lcp-echo-failure 3 proxyarp ktune deflate 12 ms-dns 134.89.10.32 ms-dns 134.89.10.10
+tethyssim>! echo 1 > /dev/loadB7sh: /sbin/pppd: No such file or directory
+2016-01-21T17:12:26.798Z,1453396346.798 [ESPComponent](IMPORTANT): Waiting for ESP to connect (timeout=30.0000)
+tethyssim>! echo 1 > /dev/loadB7
+2016-01-21T17:12:26.808Z,1453396346.808 [CommandLine](IMPORTANT): got command ! echo 1 > /dev/loadB7
+tethyssim>sh: /dev/loadB7: Permission denied
+```
+
+Upon the `[ESPComponent](IMPORTANT): Waiting for ESP to connect` above,
+launch the ESP simulator on the bufflehead session:
+
+```
+carueda@bufflehead:~/esp2$ ESPclient=tethyssim:9998 ESPcmdPort=7777 esp
+@09:09:18.51PST21-Jan-16 <simreal> Copyright 2015 MBARI
+/home/carueda/esp2/auv/honu/configure.rb
+ESP 3G "honu" 5 cartridge prototype
+@09:09:18.68 ArS.stop
+ArS.configure ArSconfig
+Rod.stop
+Rod.configure RodConfig
+PV.stop
+PV.configure PVconfig
+SC.stop
+SC.configure SCconfig
+TV.stop
+TV.configure TVconfig
+SP.stop
+SP.configure SPconfig
+All dwarves are running firmware version 3.74sim
+@09:09:18.69 <closeIntake> Intake.close
+<closeExhaust> Exhaust.close
+@09:09:20.00 <simreal> Clients may connect on TCP port 7777
+Connecting to tethyssim:9998
+@09:09:20.39 <LRAUV> Session Begun
+```
+
+then, on tethyssim:
+
+```
+2016-01-21T17:12:31.995Z,1453396351.995 [ESPComponent](IMPORTANT): ESP has connected as client
+2016-01-21T17:12:32.795Z,1453396352.795 [ESPComponent](IMPORTANT): ESP sampling sequence starting (sample #2)  sampling state: S_WAITING_INITIAL_PROMPT
+2016-01-21T17:12:33.196Z,1453396353.196 [sample:SampleAtDepth:SampleWrapper:SampleESP:C](IMPORTANT): ESP sampling at 1.101370 m in nan degC water with nan ug/l chlorophyll fluorescence.
+2016-01-21T17:12:33.594Z,1453396353.594 [ESPComponent](IMPORTANT): ESP sampling state: S_PREPARING_SHOW_LOG
+2016-01-21T17:12:33.994Z,1453396353.994 [ESPComponent](IMPORTANT): ESP sampling state: S_PREPARING_SHOW_STATUS
+2016-01-21T17:12:35.995Z,1453396355.995 [ESPComponent](IMPORTANT): ESP sampling state: S_LOADING_CARTRIDGE
+2016-01-21T17:12:55.595Z,1453396375.595 [ESPComponent](IMPORTANT): ESP sampling state: S_FILTERING
+2016-01-21T17:12:57.995Z,1453396377.995 [ESPComponent](IMPORTANT): ESP sampling state: S_WAITING_FOR_PAUSED
+2016-01-21T17:13:19.195Z,1453396399.195 [ESPComponent](IMPORTANT): ESP sampling state: S_PROCESSING
+2016-01-21T17:13:21.594Z,1453396401.594 [ESPComponent](IMPORTANT): ESP sampling state: S_WAITING_FOR_PROCESSED
+2016-01-21T17:14:15.195Z,1453396455.195 [ESPComponent](IMPORTANT): ESP sampling state: S_STOPPING
+2016-01-21T17:14:19.595Z,1453396459.595 [ESPComponent](IMPORTANT): ESP sampling sequence completed normally (sample #2)
+2016-01-21T17:14:19.597Z,1453396459.597 [sample:SampleAtDepth:SampleWrapper:SampleESP](INFO): Completed sample:SampleAtDepth:SampleWrapper:SampleESP
+2016-01-21T17:14:19.597Z,1453396459.597 [sample:SampleAtDepth:SampleWrapper](INFO): Completed sample:SampleAtDepth:SampleWrapper
+2016-01-21T17:14:19.597Z,1453396459.597 [sample:SampleAtDepth](INFO): Completed sample:SampleAtDepth
+2016-01-21T17:14:19.994Z,1453396459.994 [ESPComponent](INFO): powering down ESP
+tethyssim>pppd: no process killed
+2016-01-21T17:14:20.003Z,1453396460.003 [sample:SampleRepeater:Sample](INFO): Completed sample:SampleRepeater:Sample
+2016-01-21T17:14:20.003Z,1453396460.003 [sample:SampleRepeater](INFO): Completed sample:SampleRepeater
+2016-01-21T17:14:20.003Z,1453396460.003 [sample](INFO): Completed sample
+2016-01-21T17:14:20.396Z,1453396460.396 [MissionManager](IMPORTANT): Started mission Default
+```
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.