dronecrew / px4tools

PX4 flight analysis tools.
BSD 3-Clause "New" or "Revised" License
84 stars 48 forks source link

No documentation for logsysid.py #9

Closed mzahana closed 8 years ago

mzahana commented 8 years ago

Hi,

I am interested to know what logsysid.py does? Does it try to find the a good PID gains given some logs of PX4? How to use it? is there an example code?

Thanks.

jgoppert commented 8 years ago

Yes, it finds pid gains given a log file. Here is an example: https://github.com/dronecrew/px4tools/blob/master/examples/Log%20based%20System%20Identification%20and%20Control%20Design.ipynb

mzahana commented 8 years ago

Thanks. I will try it and confirm. Is there something similar for position/velocity control?

jgoppert commented 8 years ago

Pos/vel loop pid tuning would be possible using the closed loop transfer functions computed for the attitude loops but I haven't done that yet. Also the thrust sysid is a bit sketchy currently.

mzahana commented 8 years ago

I tried to use the logsysid example, but I get this error,

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-ab7db2f7ea65> in <module>()
      1 get_ipython().magic(u'load_ext autoreload')
      2 get_ipython().magic(u'autoreload 2')
----> 3 import px4tools.logsysid as logsysid
      4 import pandas
      5 import control

/home/mohamed/anaconda2/lib/python2.7/site-packages/px4tools-0.3.7-py2.7.egg/px4tools/logsysid.py in <module>()

ImportError: No module named sysid

I am sure that I installed the px4tools module, and I also was able to run the LPE analysis. What could be the problem? Is it related to the px4tools version?

mzahana commented 8 years ago

Here is what I get when I run conda install px4tools

Fetching package metadata ...........
Solving package specifications: ..........

# All requested packages already installed.
# packages in environment at /home/mohamed/anaconda2:
#
px4tools                  0.3.7                    py27_0    dronecrew

I am using a bit old 32-bit laptop.

jgoppert commented 8 years ago

@mzahana this should now be resolved, see the latest example

mzahana commented 8 years ago

Thanks. I will try the latest examples. Is there a plan to include position/vel pid tuning ? or if you can give a hint on how to do it, I might be able to implement it.

Thanks.