Skip to content

Commit

Permalink
SPOT 3.0.8-beta.2
Browse files Browse the repository at this point in the history
Major Update:
- A ground station pi is now used to collect PhaseSpace data. Data is then send via UDP to each individual platform.
- Users are no longer required to have RED active, and can use any combination of active platforms they desire.
- Fixed issue #30.
- Fixed a logic issue where the software would attempt to run robot arm code during a simulation.
- Fixed issue #2 as a result of the ground station pi.
- Removed the judp function as it is no longer used.
- Modified the way diagrams are compiled. The diagram is now built once onto the ground station pi. It is then copied and placed on the active platforms. This means that users are no longer required to build the diagram for each platform and should save a lot of time.
- Added the Batch_Scripts folder to the Template_Files. Users should not need to interact with this folder, as it temporarily stores the batch scripts which are generated by the GUI.
- Added the Pi_Files folders to temporarily store the MATLAB_ws folder.
- Removed the serverRate variable from the initializer as it is no longer required. Data collected on the ground station pi does not appear to buffer. However, changing the rates from the default will require manual tuning. The default is 20 Hz for both the ground station diagram and the experiment template.
- Added the WhoAmI block, which is now populated by the IdentifyPlatform device driver.
- Only one UDP receive block is now required in the template, greatly reducing the complexity of the Use Hardware to Obtain States subsystem.
- Added a new button to Copy Code to Platforms. This button creates 4 batch files that uses PSCP to copy the files from the ground station pi to the other platforms.
- Added the new Refresh Software on Selected Platforms to provide a single button that erases the MATLAB_ws folder on any selected platform. Good for troubleshooting.
- Removed the troublesome warning upon starting the software.
- Added various error checks relating to checking that certain pre-compiled diagrams are present.
- Added a function to Custom_Library/Resources called ApplyDataDictionary. This function takes in the experiment packet and creates a dictionary. This same functionality is built into the GUI for simulation data. This will not work if users add new data to be logged.
- A new example of how to post-process the data is included in the template folder, under Saved Figures.
  • Loading branch information
TheElectricDream committed Jul 10, 2022
1 parent 82ca446 commit c6b10fa
Show file tree
Hide file tree
Showing 12 changed files with 7 additions and 191 deletions.
Binary file modified Custom_Library/MainLibrary.slx
Binary file not shown.
7 changes: 2 additions & 5 deletions Custom_Library/PhaseSpase_Cameras/PHASESPACE/PhaseSpace_ALL.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
%#ok<*EMCA>

properties
% Platform Selection
platformSelection = 1;
PS_SampleRate = 10;
end

Expand Down Expand Up @@ -48,7 +46,7 @@ function setupImpl(obj)
% Call C-function implementing device initialization
coder.cinclude('owl.hpp');
coder.cinclude('phasespace_headers.h');
coder.ceval('initialize_phasespace',obj.platformSelection,obj.PS_SampleRate);
coder.ceval('initialize_phasespace',obj.PS_SampleRate);
end
end

Expand Down Expand Up @@ -82,8 +80,7 @@ function setupImpl(obj)
coder.ref(y5),coder.ref(y6),coder.ref(y7),...
coder.ref(y8),coder.ref(y9),coder.ref(y10),...
coder.ref(y11),coder.ref(y12),coder.ref(y13),...
coder.ref(y14),coder.ref(y15),coder.ref(y16),...
obj.platformSelection);
coder.ref(y14),coder.ref(y15),coder.ref(y16));
y =[y7/obj.PS_SampleRate, y1/1000, y2/1000, y3, y4/1000, y5/1000,...
y6, y8/1000, y9/1000, y10/1000, y11/1000, y12/1000, y13/1000,...
y14/1000, y15/1000, y16];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "rtwtypes.h"

double initialize_phasespace(double, double);
void stream_phasespace(double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double);
double initialize_phasespace(double);
void stream_phasespace(double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *);
void terminate_phasespace();
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ OWL::Rigids rigids;

/* initialize_phasespace() initializes the options for the phasespace cameras
and starts streaming data. */
double initialize_phasespace(double platformSelection, double PS_SampleRate)
double initialize_phasespace(double PS_SampleRate)
{
/* The address is the IP address for the phasespace computer. */
string address = "192.168.0.109";
Expand Down Expand Up @@ -116,8 +116,7 @@ double initialize_phasespace(double platformSelection, double PS_SampleRate)
void stream_phasespace(double* XPOS_red, double* YPOS_red,
double* ATTI_red, double* XPOS_black, double* YPOS_black, double* ATTI_black,
double* current_time, double* ElbowX, double* ElbowY, double* WristX, double* WristY,
double* EndEffX, double* EndEffY, double* XPOS_blue, double* YPOS_blue, double* ATTI_blue,
double platformSelection)
double* EndEffX, double* EndEffY, double* XPOS_blue, double* YPOS_blue, double* ATTI_blue)
{

/* Initialize the "event" parameter. This parameter indicates if there is
Expand Down
Binary file modified Template_Files/GUI_v3_08.mlapp
Binary file not shown.
11 changes: 1 addition & 10 deletions Template_Files/Run_Initializer.m
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,10 @@
% the frequency of the template changes, the frequency of the server must
% also be changed, i.e. open the StreamData.sln under the PhaseSpace Server
% folder, and change line 204 from owl.frequency(10) to
% owl.frequency(serverRate):
% owl.frequency(serverRate).:

baseRate = 0.05; % 20 Hz

%% Set the frequency that the data is being sent up from the PhaseSpace:

% This variable must be less then the baseRate; in simulation, setting this
% equal to the baseRate causes the simulation fail, while in experiment
% setting this equal to or higher then the baseRate causes the data to
% buffer in the UDP send.

serverRate = 0.1; % 10 Hz

%% Set the duration of each major phase in the experiment, in seconds:

Phase0_Duration = 10; % [s]
Expand Down
Binary file modified Template_Files/Template_v3_08_2020a.slx
Binary file not shown.
171 changes: 0 additions & 171 deletions Template_Files/judp.m

This file was deleted.

Binary file modified Useful_Code/CleanShutdown/CleanShutdown.slx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Useful_Code/FloatPlatform/FloatPlatform.slx
Binary file not shown.

0 comments on commit c6b10fa

Please sign in to comment.