Skip to content

A regression estimator for UAV's true control signal based on the battery information and desired force

Notifications You must be signed in to change notification settings

zonghan0904/regression_estimator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Regression Estimator

Loss

Compare

Usage

Requirements

  • Python3

Training

  • $ python train.py --valid --verbose
  • the evaluation result will be saved at ./evaluations
  • the model's weight will be saved as ./weights/estimator.ckpt

Function Call in C

  • convert PyTorch model to Torch script $ python convert.py
  • the Torch script module will be saved as ./weights/traced_regression_net_model.pt
  • donwload libtorch zip file and unzip it
  • move libtorch to /usr/local/lib
  • compile estimator
    • $ cd lib/estimator/
    • $ mkdir build
    • $ cd build
    • $ cmake ..
    • $ cmake --build . --config Release
    • $ mkdir libestimator
    • $ mv libestimator.so libestimator
  • move libestimator to /usr/local/lib
  • $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/libestimator
  • $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/libtorch/lib
  • $ make
  • $ ./pwm_estimator

About

A regression estimator for UAV's true control signal based on the battery information and desired force

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published