Skip to content

Commit

Permalink
Merge pull request #22 from AaronPB/develop
Browse files Browse the repository at this point in the history
Release of version 1.2.0
  • Loading branch information
AaronPB authored May 7, 2024
2 parents 659dc80 + ec6048f commit 8406ea3
Show file tree
Hide file tree
Showing 71 changed files with 7,708 additions and 1,980 deletions.
540 changes: 322 additions & 218 deletions config.yaml

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/features/calibration_test.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

# Calibration process

Calibration process are only available for the platform sensors defined in the [`platform loadcell list` config section](../setup/config_file.md#platform-1-loadcell-list) .
Calibration process are only available for **platform sensors** defined in the [`sensor_groups` config section](../setup/config_file.md#sensor-groups-section) .

To access the calibration menu, click on the <kbd>Calibrate sensors</kbd> button on the left panel.

## Calibration menu

![Calibration UI](../images/calibrationUI_default.png)

At the left side, the menu loads all compatible sensor lists defined in `config.yaml`, but only the connected ones will be enabled. You can connect the sensors previously from the main menu or click the <kbd>Connect sensors</kbd> button to try another connection to the selected ones.
At the left side, the menu loads all compatible sensor groups defined in `config.yaml`, but only the connected ones will be shown. You can connect the sensors previously from the main menu.

> [!TIP]\
> [!TIP]
> Need more information about how to connect sensors? Check the [sensor connection](general_test.md#sensor-connection) section of the general test procedure.
In order to preform a calibration test, click the enabled button of the connected sensor.
Expand All @@ -38,7 +38,7 @@ The calibration program allows the known value to be recorded in two ways:

The following sections shows how to preform each action.

> [!NOTE]\
> [!NOTE]
> If a measurement goes wrong, you can remove it selecting the correspondent row from the measurement table and click the <kbd>Remove selected row</kbd> button.
### Calibrate with manual inputs
Expand All @@ -53,7 +53,7 @@ To calibrate with known values you must follow these steps:

### Calibrate with calibration sensor input

To calibrate using the reference sensor, you must first declare it in the [`calibration_sensor` section](../setup/config_file.md#calibration-sensor) of the `config.yaml` file.
To calibrate using the reference sensor, you must first declare it in the [`calibration_sensors` section](../setup/config_file.md#calibration-sensors-section) of the `config.yaml` file.

Once defined, run the program, connect the sensors to be calibrated and access the calibration window again.

Expand All @@ -68,7 +68,7 @@ If the button is active, then the sensor is correctly connected. The steps to pr
### Generate the calibration results
Once all measurements have been taken, linear regression can be performed by clicking on the <kbd>Make linear regression</kbd> button.

> [!IMPORTANT]\
> [!IMPORTANT]
> A minimum of two measurements must be taken for the <kbd>Make linear regression</kbd> button to be available.
![Calibration UI results](../images/calibrationUI_results.png)
Expand All @@ -83,9 +83,9 @@ When the first regression line is calculated the <kbd>Save results</kbd> button
If at any time you wish to cancel the calibration test, click the <kbd>Clear calibration test</kbd> button or select another available sensor from the left side.

## Calibration settings
It is possible to modify the data reading time and frequency in the [`general settings` section](../setup/config_file.md#general-settings) of the `config.yaml` file.
It is possible to modify the data reading time and frequency in the [`settings` section](../setup/config_file.md#settings-section) of the `config.yaml` file.

It is also possible to change the reference sensor in the [`calibration_sensor` section](../setup/config_file.md#calibration-sensor) of the same file.
It is also possible to change the reference sensor in the [`calibration_sensors` section](../setup/config_file.md#calibration-sensors-section) of the same file.

---

Expand Down
83 changes: 52 additions & 31 deletions docs/features/general_test.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[:house: `Back to Home`](../home.md)

# General test procedure
**Work in progress**

The main objective of the program is to record data from the connected sensors in a synchronised manner and to generate a file in `.csv` format at the end of each trial.

Expand All @@ -16,6 +15,7 @@ The interface is organised in three main sections which will be detailed below:
- Settings and sensor information tab.
- Plot tabs.


## Control Panel

| Control panel disabled | Control panel enabled |
Expand All @@ -35,7 +35,6 @@ The layer is divided into three parts:
- **Calibrate sensors button**: to calibrate the Phidget LoadCells. For more information, see the [Calibrate sensors](calibration_test.md) section.



## Settings and sensor information

![Main UI settings tab](../images/mainUI_tab_settings.png)
Expand All @@ -54,8 +53,8 @@ Once selected, if it is in the correct format, the window will be updated with t

The path to the custom configuration will also be saved in the default configuration file (`config.yaml`) to be loaded automatically each time the program is launched.

> [!NOTE]\
> This can be cancelled by loading again the default `config.yaml` file or deleting the custom configuration path manually.
> [!NOTE]
> This can be cancelled by loading again the default `config.yaml` file or deleting the custom configuration path manually in the [`settings` config section](../setup/config_file.md#settings-section).
### Folder and file name of the test

Expand All @@ -65,59 +64,81 @@ They will be saved in `.csv` format, either with the calibration data applied as

### Sensor connection

To connect the sensors you must mark the ones you want to connect in the **Sensor information** table by clicking on the text boxes. In case you do not want to connect a certain sensor that is selected, simply click it again.
This section shows all sensor groups configured in the [`sensor_groups` config section](../setup/config_file.md#sensor-groups-section).

You can select or deselect sensor groups connections by clicking on their names. It is also possible to enable/disable individual sensors from a sensor group via the `settings` button next to it.

> [!NOTE]
> When you click the `settings` button, an additional window will show up with the sensor information. If you want to continue in the main window, close the pop-up window.
>
> Any modifications will be saved.
You can check the selection status by identifying its color border:
You can check the selection status looking at the name background color:

![Main UI settings tab sensors](../images/mainUI_tab_settings_sensors.png)

| Border color | Description |
| Background color | Description |
| :---: | :--- |
|<img valign='middle' src='https://readme-swatches.vercel.app/008000'/>| Selected. |
|<img valign='middle' src='https://readme-swatches.vercel.app/808080'/>| Not selected. |
| <img valign='middle' src='https://readme-swatches.vercel.app/326295'> | Selected. |
| <img valign='middle' src='https://readme-swatches.vercel.app/808080'> | Not selected. |

Once the sensors are selected, press the <kbd>Connect sensors</kbd> button. Depending on the type and number of sensors it will take some time to establish connection with all of them.

Once a connection is established (or not) with the indicated sensors, the background colors will be updated with the status of each sensor as follows:
Once a connection is established (or not) with the indicated sensors, the connection background colors will be updated with the status of each sensor as follows:

![Main UI settings tab sensors connection](../images/mainUI_tab_settings_sensors_connect.png)

| Background color | Description |
| :---: | :--- |
| No color | No connection attempted. |
|<img valign='middle' src='https://readme-swatches.vercel.app/ff0000'/>| Connection could not be established. |
|<img valign='middle' src='https://readme-swatches.vercel.app/008000'/>| Connection successfully established. |
| Background color | Description for sensor groups | Description for individual sensors |
| :---: | :--- | :--- |
| <img valign='middle' src='https://readme-swatches.vercel.app/808080'> | No connection attempted. | No connection attempted. |
| <img valign='middle' src='https://readme-swatches.vercel.app/ff0000'> | All sensors failed to connect. | Connection could not be established. |
| <img valign='middle' src='https://readme-swatches.vercel.app/ffa500'> | Some sensors failed to connect. | - |
| <img valign='middle' src='https://readme-swatches.vercel.app/008000'> | All sensors are connected. | Connection successfully established. |

If at least one sensor is connected and the requirements indicated on the control panel are met, the buttons will be enabled to start the tests.

## Plot tabs
### Results settings

When a test has finished, this section will update with the available data recorded. Here you can modify data limits and the butterworth filter parameters.

![Main UI settings tab results](../images/mainUI_tab_settings_results.png)

You can change the preview graph by clicking other sensor name in the preview selector.

To apply any modifications, click the <kbd>Apply changes</kbd> button. If you want to save the data again with those modifications, click the <kbd>Save</kbd> button. To undo range modifications, click on <kbd>Reset</kbd>.

> [!NOTE]
> The <kbd>Save</kbd> button only apply data range modifications. It does not save filtered data.
All applied modifications will update available sensor graphs. Checkout the following section!


If enabled in [`general settings` config section](../setup/config_file.md#general-settings), the current recorded data will be displayed in different tabs depending of the available sensors.
# Graph tabs

All the plot data processing is done by the [`TestDataManager`](../../src/managers/testDataManager.py) class.
There are two tabs available:
- **Sensor graphs** - To see individual sensor data.
- **Platform graphs** - To see specific platform data: total forces and COP data.

### Platform forces
All the graph processing is done by the [`DataManager`](../../src/managers/dataManager.py) class.

> [!IMPORTANT]\
> Requires `_X_n`, `_Y_n` or `_Z_n` markers in sensor names of [`platform loadcell list` config section](../setup/config_file.md#platform-1-loadcell-list) in order to be plotted.
## Sensor graphs

*TODO plot image*
Simply click a sensor group at the top selector and an available sensor. The graph will update with the current recorded data from the selected sensor.

### Platform COP
You can use the options above to save the generated graph, edit, zoom, etc.

> [!IMPORTANT]\
> Requires `_X_n`, `_Y_n` or `_Z_n` markers in sensor names of [`platform loadcell list` config section](../setup/config_file.md#platform-1-loadcell-list).\
> Requires the 12 platform sensors to be available in order to be plotted.
![Main UI graphs sensor](../images/mainUI_tab_graphs_sensor.png)

*TODO plot image*
## Platform graphs

### Encoders
As in the previous section, click a sensor group at the top selector and an available option below. The graph will update with the current recorded data.

*TODO plot image*
Use the options above to save the generated graph, edit, zoom, etc.

### IMU angles
> [!IMPORTANT]
> This graphs needs special sensor group requirements in order to be available. Check [platform groups configuration](../setup/config_file.md#platform-groups).
*TODO plot image*
![Main UI graphs platform](../images/mainUI_tab_graphs_platform.png)

---

Expand Down
Binary file modified docs/images/calibrationUI_default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/calibrationUI_panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/calibrationUI_results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/mainUI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/mainUI_cp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/mainUI_cp_status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/mainUI_default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/mainUI_tab_custom_config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/mainUI_tab_graphs_platform.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/mainUI_tab_graphs_sensor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/mainUI_tab_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/mainUI_tab_settings_results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/mainUI_tab_settings_sensors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/mainUI_tab_settings_sensors_connect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/platform.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8406ea3

Please sign in to comment.