[SOLVED] How to run cfclient from source?
Posted: Fri Apr 17, 2015 2:33 am
My Crazyflie 2.0 has been flying great with the cfclient in the crazyflie-clients-python/bin folder. I have also been able to run basiclog.py and ramp.py from the crazyflie-clients-python/examples folder. I'm going to be doing some control and navigation development, so I'm delving into the Python code. I've done plenty of programming with Python, but the package/module model is new to me. Here's what I've tried so far:
I cloned crazyflie-clients-python from the current GitHub repo and /lib/cfclient/ui/pluginhelper.py exists.
Next, I tried the following:
I cloned crazyflie-clients-python from the current GitHub repo and /lib/cfclient/ui/dialogs/connectiondialogue.ui DOES exist.
After those tries, I edited crazyflie-clients-python/lib/cfclient/cfclient.py by appending the following code to the end of the file:
and tried the following:
As stated previously, I cloned crazyflie-clients-python from the current GitHub repo and /lib/cfclient/ui/pluginhelper.py exists. No changes to the repo had been made up to when I appended the above code. I'm using OS X Yosemite, but I've also been flying from Ubuntu 14.04. I used the VM a little but abandoned it because I couldn't pass my PS4 controller from the OS X host to the VM guest.
Any help running cfclient from source would be greatly appreciated.
Code: Select all
crazyflie-clients-python/lib/cfclient username$ python
>>> import cfclient
>>> cfclient.main()
INFO:cfclient:Disabling STL printouts
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "cfclient.py", line 121, in main
from ui.main import MainUI
File "ui/__init__.py", line 36, in <module>
from cfclient.ui.pluginhelper import PluginHelper
ImportError: No module named ui.pluginhelper
>>> quit()
Next, I tried the following:
Code: Select all
crazyflie-clients-python/lib username$ python
>>> import cfclient
>>> cfclient.main()
INFO:cfclient.cfclient:Disabling STL printouts
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "cfclient/cfclient.py", line 121, in main
from ui.main import MainUI
File "cfclient/ui/main.py", line 44, in <module>
from dialogs.connectiondialogue import ConnectDialogue
File "cfclient/ui/dialogs/connectiondialogue.py", line 44, in <module>
'/cfclient/ui/dialogs/connectiondialogue.ui'))
File "/usr/local/lib/python2.7/site-packages/PyQt4/uic/__init__.py", line 210, in loadUiType
winfo = compiler.UICompiler().compileUi(uifile, code_string, from_imports, resource_suffix)
File "/usr/local/lib/python2.7/site-packages/PyQt4/uic/Compiler/compiler.py", line 139, in compileUi
w = self.parse(input_stream, resource_suffix)
File "/usr/local/lib/python2.7/site-packages/PyQt4/uic/uiparser.py", line 984, in parse
document = parse(filename)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
tree.parse(source, parser)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 647, in parse
source = open(source, "rb")
IOError: [Errno 2] No such file or directory: '/cfclient/ui/dialogs/connectiondialogue.ui'
>>> quit()
After those tries, I edited crazyflie-clients-python/lib/cfclient/cfclient.py by appending the following code to the end of the file:
Code: Select all
if __name__ == '__main__':
main()
Code: Select all
crazyflie-clients-python/lib username$ python cfclient/cfclient.py
INFO:__main__:Disabling STL printouts
Traceback (most recent call last):
File "cfclient/cfclient.py", line 140, in <module>
main()
File "cfclient/cfclient.py", line 121, in main
from ui.main import MainUI
File "/Users/bdenbyANT/Documents/afit-local/2015-03-spring-06/eeng-699/crazyflie-clients-python/lib/cfclient/ui/__init__.py", line 36, in <module>
from cfclient.ui.pluginhelper import PluginHelper
ImportError: No module named ui.pluginhelper
Any help running cfclient from source would be greatly appreciated.