Where to access the GUI
Inside the git repository sits the Matlab GUI. It is stored under matlab -> haptics -> biotacs -> GUI.
NOTE: it is important you checked out the utilities folder as well. This is also located in the repo. matlab -> haptics -> biotacs -> utilities. Do not change the location of this directory. The GUI will not know where to look for them if this location is changed.
Important notes about the GUI
To test out the GUI, a test set of different objects and motions are located below. This dataset was hand gathered and has 20 trials of each object:
The data is stored by object and then each file is specific to the motion that was performed. Each motion was taken over a scale to control the force exerted. This is also the directory hierarchy that should be used when loading data with the utility function load_all_data in MatlabUtilities.
We have another set of data that we have recently gathered with the PR2 squeezing multiple objects for 10 seconds. This can be found here:
Supported File Types
The GUI supports three formats. One .txt format default from Syntouch. It is the format that the LabView and C Library returns.
The next two formats are .json from ROS. The first format includes only the BioTac information. The second format includes the PR2 transorms. However, the PR2 transforms are not included or displayed in this GUI.
Also to note, the current GUI includes a simple JSON parser that was found online. The parser makes loading a JSON file to play back significantly slower than a .txt file. This will be fixed in the future, but for reference, please be patient when loading .json files.
All of the files are read in and processed. Processing includes reading in the raw stream and normalizing. Also the first 50 frames are thrown out (this can be configurable within process_json_file and process_txt_file) Normalizing subtracts the mean of the first 10 values from all readings.
The GUI tries to play back the data relatively similar to real time. However, depending on the computer and what other processes are occurring, time will not be accurate.
This is something that may or may not be pursued in the future because we do have time stamps from all the of the readings down to the milliseconds.
Area of contact and Force
These two values are still very experimental. We are working on calibrating the forces so do not trust these values as true Fx,Fy,Fz.
Contact area uses a convex hull around the activated electrodes. This gives a relatively accurate representation of the area of contact. However, this method requires at least three electrodes to be activated. When hard objects are pressed, there are cases when only one or two electrodes are active. The GUI will return a contact area of 0.
Currently the GUI only supports playing back pre-recorded data. Future work include streaming from the BioTacs live
Any system (Linux or Windows) that runs Matlab
Tutorial - How to start the GUI
- Change your working directory to the GUI folder
- In the command window, enter "main"
- Browse file
- Selected file display
- Number of fingers available to display
- Select which finger to display from available
- Large graph channel control
- Add/remove individual channels
- Add/remove all channels
- Displays what channels selected for large graph
- Time range (in readings)
- Play - starts the playback
- Forces in the x,y,z direction
- Max electrode at the moment in time
- Area of contact at the moment in time
- 19-electrode visual pressure indicator
- Large graph
- Small graphs
- Small graphs channel selection
Tutorial - How to playback a recording
- Browse and select a data file (Label 1). If a .txt file is selected this assumes the file selected is of the default Syntouch format. If a .json file is selected, this assumes the file is from ROS. Both formats from ROS (with transforms and without) are supported.
- Add channels to large graph. (Label 5) Note: usually pressing add all is what you need
- Select small graph channels (PDC, PAC, TAC, etc.) (Label 17)
- Specify time range - If you would like to play back the entire sequence, ignore the time range. It will automatically play the entire file. If you would like to specify, fill in the values in the appropriate boxes
- Select which finger to display (if there are more than one available). The fingers are numbered in order (NOT by the BioTac board order. Ex. - If fingers 1 & 3 are plugged in, you can play finger 1 (Biotac 1) and finger 2 (Biotac 3))
- Press Play. If you did not specify the time range, the range will now automatically populate with the entire sequence
How to read the results
- On the large graph will show the channels you selected prior
- The 19-electrode display now has colors. The darker red indicates more pressure. The lighter yellow indicates less pressure. In the example above, the poke is centered at the tip of the finger and force has been transferred to that location
- The forces in x,y,z direction will also change over time
- The max electrode changes over time