Skip to content
Snippets Groups Projects
Commit 82a1603e authored by ucart's avatar ucart
Browse files

Merge branch 'groundstation_gui_fd_test' of...

Merge branch 'groundstation_gui_fd_test' of https://git.ece.iastate.edu/danc/MicroCART into groundstation_gui_fd_test
parents 52b752e9 5f83b8ea
No related branches found
No related tags found
1 merge request!43Resolve "Transition current hardware platform to Vivado"
......@@ -10,3 +10,33 @@ It runs [make](quad/Makefile) under the quad directory to build the project.
## Test Stage
The test stage is defined by the [`ci-test.sh`](ci/ci-test.sh) file.
It runs [make test](quad/Makefile#L36) under the quad directory to run the tests.
# CI Server
The CI server for this project is at `microcart.ece.iastate.edu`
login information should be handed off outside this repo for security reasons.
The gitlab runner uses docker to launch a container, in which the scripts are run.
The VM is running Red Hat Enterprise Linux, which as of Oct. 6, 2018 was licensed.
**Note:** RHEL uses `yum` for package management, but the docker image uses `apt-get`.
## Accessing System Folders
If you need to access any folders on the VM from within the docker,
the information [here](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#volumes-in-the-runners-docker-section) should help
Specifically this part:
### Example 2: mount a host directory as a data volume
In addition to creating a volume using you can also mount a directory from your
Docker daemon's host into a container. It's useful when you want to store builds
outside the container.
[runners.docker]
... whatever config is already there ...
volumes = ["/path/to/persistent/data/in/container", /path/to/bind/from/host:/path/to/bind/in/container:rw"]
## Accessing a remote share on the VM
To get to the Xilinx tools for hardware simulation, we need access to
`logic.ece.iastate.edu/export/Xilinx` as a mounted folder. This can be done with NFS.
NFS is installed and the folder mounted. If it becomes unmounted, then run
$ sudo mount logic.ece.iastate.edu:/export/Xilinx /remote/Xilinx
on the VM. This may not be doable from within the CI run as it is in a container (Docker image) that may behave differently or have different permissions.
This diff is collapsed.
No preview for this file type
......@@ -95,6 +95,11 @@ else
handles.main.params.file.path = handles.filepath;
handles.main.params.file.pathName = handles.filepath;
end
handles.pause_or_play = 0;
handles.pause_play_timer = timer('BusyMode', 'queue', 'ExecutionMode',...
'fixedRate', 'Period', 5.0);
set(handles.pause_play_timer, 'TimerFcn', @(hObject, event) pushbutton2_Callback(hObject, eventdata, guidata(hObject)));
cd(handles.main.params.file.path);
load_listbox(hObject, eventdata, handles)
guidata(hObject, handles);
......@@ -158,6 +163,22 @@ exportData(hObject, eventdata, handles);
previewPlot(hObject, eventdata, handles);
guidata(hObject,handles);
function pause_play_timer(hObject, eventdata, handles)
% hObject handle to pushbutton_pause
% eventdata reserved - to be defeined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles = guidata(hObject);
handles = updateOptions(hObject, eventdata, handles);;
if (handles.pause_or_play == 0)
handles.pause_or_play = 1;
start(handles.pause_play_timer);
else
handles.pause_or_play = 0;
stop(handles.pause_play_timer);
end
guidata(hObject, handles);
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
......
......@@ -2,6 +2,32 @@
This folder contains the files used in developing the model of the quadcopter.
## Documentation
### **1. Simulink Flight Simulator**
**How to Run the Simulator**
1. In the project folder, open “MicroCART/controls/model”. The “model” folder contains the files needed to run the Simulink simulator. Make sure this folder is the current workspace directory.
2. Open “modelParameters.m” in MATLAB and run the script. This will create/update parameters in the MATLAB workspace which are used by the simulator. At this point you should also check that the contents of the “model” folder are displayed in the “Current Folder” window in MATLAB.
3. Open “Quadcopter_Model.slx”
4. To view the 3D simulator, navigate within the model by clicking on the following blocks: Sensors -> 3D Graphical Simulation -> VR Sink
5. Press “Run” in Simulink
**Changing Setpoints**
1. To change the simulation setpoints, return to the top level of the simulink model and then enter the “Setpoints” block.
2. The default version of the simulator has five step functions which individually instruct the quad to move 1 unit in the x-direction, 1 unit in the y-direction, 1 unit in the z-direction, turn clockwise by 1 unit along the yaw angle, and then return to its starting values. Each step function can be thought of as a setpoint.
3. Open a step function block by double clicking on it. Altering the step time will change when the quad begins to move towards a setpoint. Initial and final value have the format [x-position, y-position, z-position, yaw-angle], and any alterations to these fields will change where the quad starts and where it goes to respectively.
4. Setpoints can be added or removed by adding or removing step functions from the Simulink model diagram.
*Note:
For this model, negative z values correspond to a position above the starting point [0,0,0,0] and positive z values correspond to a position beneath the starting point. (Example: If the quad is instructed to move from [0,0,-2,0] to [0,0,-1,0], it will be moving from a height of 2 units above the starting point down to a height of 1 unit above the starting point.) This means we will usually only work with negative z-values since our starting point is usually the ground and we cannot fly beneath it :)*
**Changing Control Models**
1. To select which controller is used to simulate quad flight, navigate to the top level of the Simulink model and toggle the controller switch to either LQR or PID
## Additional Documents
[Measuring Motor Resistance](documentation/MeasuringMotorResistance.pdf)
[Simulink Model](documentation/SimulinkModel.md)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment