-
Notifications
You must be signed in to change notification settings - Fork 23
Getting and Processing Log Data
Every time the Cassie Real-Time Subsystem is run, log data is saved to the local hard drive of the target machine. This log data is overwritten after every run, so in order to get data off of the robot follow the steps on this page before running the Cassie Real-Time Subsystem again.
A blank SLRT USB has the Simulink Real-Time kernel, but no application. When booted from the target PC, the kernel will enable the development computer to connect through the Simulink Real-Time Explorer interface.
- Format a USB drive to make sure there is nothing on the drive already. This is most easily done through the Windows interface
- Start the Simulink Real-Time Explorer by typing
slrtexplrin the Matlab command prompt - Set up the CassieV3 target PC as specified in Setting Up Development PC
- Under Boot Configuration select Removable Disk as the boot mode
- Click the button to the right of the drop-down menu to create a boot disk, and select the blank USB drive from step 1
- Follow the procedure in Setting Up Development PC.
- Boot the target computer from the blank SLRT USB drive created in the previous step
- Start the Simulink Real-Time Explorer on the development computer
- Make sure all of the host/target settings are correct and match the settings used to create the blank SLRT USB
- Click the connect icon in the Targets section of the SLRT Explorer. The red light next to CassieV3 should turn green
- Double-click on the File System
- Right-click on the desired files on the target PC and select Copy to Host...
- Files can be copied to the target by dragging them into the file system window
Occasionally the SLRT Explorer may display an Invalid Port error when the file system is opened. If this happens, the connection can be reset by typing the following into the Matlab command prompt:
tg = slrt;
tg.close();
After resetting the connection, repeat steps 5-8 above. If the problem persists, check the target PC settings and reset the target PC.
This process can also be performed on a target PC running any model. Make sure that the robot is not turned off after an experiment, as a reset will overwrite all of the log files. While the electronics are all still running (turn off motor power), connect Cassie to the development computer using an ethernet cable, and follow steps 5-8 above. The only difference is that there should be an application under the Applications section in the SLRT Explorer. Make sure that the application is stopped (press the stop icon) before transferring files.
Alternatively, you can copy data using a batch script and FreeDOS on a USB flash drive. To do so, follow these steps:
- Create a FreeDOS bootable USB flash drive as described in Creating Standalone Application
- Copy doslfn.com to the USB drive
- Copy DataLogTransfer.bat to the USB drive
- Rename DataLogTransfer.bat to autoexec.bat
- Plug the USB drive into the target PC and turn it on
- When you hear consecutive beeps, the files have finished being copied to the LOGS folder on the flash drive and have been deleted from the target PC hard drive
This batch script will copy all .dat, .txt, and .bin files on the target hard drive to the LOGS folder of the flash drive. NOTE: This will also delete all log files, so make sure you back them up before erasing them from the flash drive
The Cassie Real Time Subsystem produces 4 different log files during operation: message.dat, energy.dat, outputs.dat, and inputs.dat. For quick plotting of the data, use the included '''loadFileScopeData''' function, which will plot all of the data as long as the log files are on the path. Note: this function will only work if the log files still have the default names.
The log files are saved as Simulink Real-Time file scope data objects, which can be converted to a struct and then an array by executing the commands:
fileScopeDataStruct = SimulinkRealTime.utils.getFileScopeData('file.dat');
fileScopeDataArray = fileScopeDataStruct.data;
Each variable in the log file is a column of the array, and the last column in the array is the time. I.e, the array is organized as follows:
[ data1, data2, ..., dataN, time ]
The signals which comprise each log file are listed below, in order. The number in brackets is the size of the signal in columns.
- Status messages[4]
Status message enumeration is defined in the documentation for CassieState. Typedoc CassieStatein the command prompt
- Battery voltage
- Battery current
- Actual motor torques[10]
- Orientation quaternion[4]
- Angular velocity[3]
- Motor positions[10]
- Motor velocities[10]
- Joint positions[4]
- Joint velocities[4]
- Introduction
- Limitation of Liability
- Warning Symbols in this Manual
- General Precautions
- Mechanical Precautions
- Maintenance Precautions
- Research and Development Precautions
- Battery Safety
- Mechanical Overview
- Electrical Overview