pathfinder-for-autonomous-navigation / psim

Six DOF flight simulator and related GNC implementations.
MIT License
4 stars 6 forks source link

Jupyter Notebook Estimator Plotting Utility #228

Closed nhz2 closed 3 years ago

nhz2 commented 4 years ago

Jupyter Notebook Estimator Plotting Utility

Fixes #216

Depends on #226

Summary of changes

Added a Jupyter Notebook animated plotting function. The function is inspired by testing estimators in Simulink, which has scopes to look at the performance of an estimator while a sim is running. The function can plot a list of functions of the estimator, sensors, and truth at a specified sample rate.

The goal is to quickly test and see the accuracy of an estimator in Jupyter Notebook. psim/estimatortest/Orbit-estimator-test.ipynb is an example.

Running the Jupyter Notebook on the linux server over ssh

  1. ssh into the server

  2. clone the psim repo add --recursive flag to also get lin

  3. cd psim

  4. git checkout Jupyter-Notebook-Plotting-Utility

  5. python -m venv venv

  6. source venv/bin/activate

  7. pip install -r requirements.txt

  8. ipython kernel install --user --name=venv

  9. jupyter notebook --no-browser --port 1234

  10. Start an SSH tunnel to the server, see more info on unix use ssh -NL 1234:localhost:1234 username@serverip in a new local terminal

  11. copy the URL in the output from step 9 into your browser. Something like the following should come up.

    Screenshot 2020-05-08 17 15 54
  12. Click estimatortest and then open Orbit-estimator-test.ipynb

  13. Change the kernel to venv.

    Screenshot 2020-05-08 17 22 39
  14. Everything should be working now. I would recommend opening another ssh connection to do git stuff, or make edits in vim.

tanishqaggarwal commented 3 years ago

Is this good to merge?