Difference between revisions of "MATLAB code"

From Training Technology Lab Wiki
Jump to navigation Jump to search
(Blanked the page)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
= Introduction =
 
Training Technology Lab uses MATLAB for most data processing and visualization purposes.
 
Several scripts have been written to work with our various technology. <br>
 
Here is a list of the projects:
 
 
* Rosbag extraction
 
* EMG analyzer
 
* Bluetooth force sensor
 
* RTL MATLAB control
 
* BFR audio
 
 
== Rosbag extraction ==
 
[[File:MATLAB dualvideo example.png|600px|thumb|right|'''rosbag_video.m''' example - using two webcam feeds.]]
 
 
'''Official methods:''' <br>
 
Viewing: For viewing video stored in a .bag file, [http://wiki.ros.org/rqt_bag rqt_bag] is the standard tool.
 
 
Extraction: To extract video (which are just compressed/uncompressed images) several methods exist. We have often used [https://github.com/OSUrobotics/bag2video bag2video].
 
 
=== MATLAB scripts: ===
 
'''rosbag_loader.m'''
 
Converts .bag files into .mat files. Must be done before using the other 2 scripts
 
 
'''rosbag_plotter.m'''
 
Automatically plots known data formats)
 
 
'''rosbag_video.m'''
 
Automatically converts rosbags into .avi files with data plot overlays.<br>
 
It can use single or dual videos and plot up to 4 data sets.
 
 
 
Usage:
 
1. Make a new folder with the same name as the ROSBAG-file you intend to analyze.
 
2. Paste in the ROSBAG-file and a copy of rosbag_loader.m(which can be found in one of the other folders)
 
3. Run rosbag_loader and chosse the desired .bag file. This will save the data as a workspace file in the new folder
 
4. Run rosbag_plotter and choose the desired .m file, to plot the data.
 
 
== EMG analyzer ==
 
For analyzing EMG data recorded with Myon electrodes and ADInstruments AD converter via ROS-setup in Training Technology Lab
 
 
== Bluetooth force sensors ==
 
 
== ROS MATLAB control ==
 
An initial attempt to control the RTL from MATLAB. The idea was to make programming the RTL and make data acquisition easier for Veltek students.
 
A MATLAB GUI was supposed to be the interface. This project is not finished.
 
 
== BFR audio ==
 
A simple test script for listening to sound from arteries during blood flow restriction exercise. 
 
 
= FAQ/Debugging =
 
This sections relates to all common problems with the software.
 

Latest revision as of 12:51, 12 August 2019