ethz-asl / data-driven-dynamics

Data Driven Dynamics Modeling for Aerial Vehicles
Other
91 stars 13 forks source link

enhance: allow data selection with arbitrary setpoint topics and variables #230

Closed sjschlapbach closed 10 months ago

sjschlapbach commented 10 months ago

Problem Description: Until now, it was only possible to select data based on one of the 6 available manual_control_setpoint topics aux1 to aux6 when using the data_selection=setpoint option. It was requested that this mechanism should be more flexible and also accept other variables more flexibly.

Proposed Solution: In addition to the data_selection attribute, the user can now provide a selection_var variable to the make command (with the syntax topic_name/variable_name - e.g. manual_control_setpoint/aux1). The corresponding variable will then be added to the topics that are loaded from the log file and used to identify relevant sections of the provided log.

Test command:

make estimate-model model=fixedwing_model log=path_to_ulog data_selection=setpoint selection_var=manual_control_setpoint/aux1
manumerous commented 10 months ago

I was just thinking that our generate_parametric_model.py contains quite a lot of logic and code. What do you think if we start modularizing some of the logic related to interactive and setpoint data selection into their own python modules to make the overall logic a bit more readable? Can be a different PR though.

Jaeyoung-Lim commented 10 months ago

I was just thinking that our generate_parametric_model.py contains quite a lot of logic and code. What do you think if we start modularizing some of the logic related to interactive and setpoint data selection into their own python modules to make the overall logic a bit more readable? Can be a different PR though.

Obviously, yes please :)