Skip to content

robot-perception-group/dataset_generation

Repository files navigation

Dataset Generation

This repository contains the code that is used for the generation of dataset for the training of a TCN as part of the project

Autonomous Docking of Multi-Rotor UAVs on Blimps under the Influence of Wind Gusts

by Pascal Goldschmid and Aamir Ahmad.

The main project repository can be found here.

If you have any questions, comments or suggestions please contact pascal.goldschmid@ifr.uni-stuttgart.de.


Description

This repository provides scripts for the generation of a dataset that can be used for training a Temporal Convolutional Network (TCN) to predict the response of a blimp to a wind gust. The repository to train the TCN can be found here.

The general principle to generate the dataset is as follows. On the original recorded episode containing the time series data about pose, velocity etc. a windowing approach is applied. This windowing is such that a predefined time period specifieds length of the features, followed by a predefined time period specifying the length of the labels. So the overal window length is duration_features + duration_labels. That window is then shifted across the recorded episode in a predefined time delta. Flr each time step in the shifting sequence, the features and labels are extracted and added to the dataset. This procedure is repeated for multiple episodes.

Data that can be used to generate the dataset can either be downloaded here or recorded using the procedure described in the readme file of the repository aerial_docking, which is also part of the project.

Usage

In the file dataset_generation_pipeline.py adapt the parameters used for the dataset generation. The following tables explain the available parameters.

General parameters

Parameter Value (Example) Description
log_dir /mnt/data_3/tcn_training_data Path to the data base containing the recorded episodes
of an airships response to a wind gust
log_id run The recorded episodes need to be stored in folders named
log_id_i where i is a positive integer value.
episode_id episode In each folder run_i there are several recordings of episdes 
stored as .csv files. The naming scheme is episode_id_j
where j is a positive integer.
samples_id v3 Name of the dataset.
sample_path /mnt/data_3/datasets Path to the directory where the generated dataset shall
be stored.
start_num_logs 0 Index of the first folder containing episodes for the generation
of datasets. Using the example values that would be run_0.
end_num_logs 10 Index of the last folder containing episodes for the generation
of datasets. Using the example values that would be run_10.

Sample extraction — time parameters

Parameter Value Unit Description
dur_features 10 s Duration of the feature time series. Value used to calculate
times and initial lengths of time series.
dur_labels 10 s Duration of the labels time series. Value used to calculate
times and initial lengths of time series.
number_of_timesteps_per_episode 98 Number of timesteps defining the final length of features
and labels.
t_extract_window_start 0 s Initial time in the original data from where to start extracting
time series data using a shifting window.
t_extract_window_end 60 s Time until which the end of a window may be shifted.
delta_t_extract 0.5 s Time period by which a window is shifted.

Running the script

Then run the script using the command python3 dataset_generation_pipeline.py

Updating the config file of the TCN training

The script stores a file called lim_value_info.txt in the target folder of the generated dataset. This file contains the minimum and maximum values for the input features as well as for the output labels that are used by the TCN for normalization during training. Copy these values and update the config file of the TCN training accordingly. See the readme of the repository tcn_airship_response.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages