ethz-asl / data-driven-dynamics

Data Driven Dynamics Modeling for Aerial Vehicles
Other
98 stars 14 forks source link

Pipeline fails with data selection #187

Closed Jaeyoung-Lim closed 2 years ago

Jaeyoung-Lim commented 2 years ago

Problem Description When manually selecting data using the data selection tool, the pipeline fails with the following error

-------------------------------------------------------------------------------
                            Optimization Metrics                               
-------------------------------------------------------------------------------
R2: 0.9998888927269959
RMSE: 0.058325590518898365

-------------------------------------------------------------------------------
Complete results saved to: 
model_results/multirotor_model_2022-02-16-13-46-30.yaml
-------------------------------------------------------------------------------
Traceback (most recent call last):
  File "Tools/parametric_model/generate_parametric_model.py", line 117, in <module>
    start_model_estimation(**vars(arg_list))
  File "Tools/parametric_model/generate_parametric_model.py", line 99, in start_model_estimation
    model.compute_residuals()
  File "/home/jaeyoung/dev/data-driven-dynamics/Tools/parametric_model/src/models/dynamics_model.py", line 486, in compute_residuals
    y_forces_pred[2::3] = y_pred[int(2*self.y_forces.shape[0]/3):self.y_forces.shape[0]]
ValueError: could not broadcast input array from shape (5414) into shape (14075)
Makefile:34: recipe for target 'estimate-model' failed
make: *** [estimate-model] Error 1

It appears that the residual calculation is done on the full log, while the predictions are done on the selected data, which was added in https://github.com/ethz-asl/data-driven-dynamics/pull/182

Jaeyoung-Lim commented 2 years ago

Fixed in https://github.com/ethz-asl/data-driven-dynamics/pull/191