As a follow up to my prior question, I was able to solve
import cv2
import libardrone.libardrone
I reinstalled opencv and I realized the documentation was incorrect; it was supposed to be
import libardrone.ardrone
Solving these two problems let me to be able to attempt the track.py given here: https://github.com/JJLewis/ColorTracking-ARDrone2.0-Python.
Running track.py gives me the follow errors even though I have ffmpeg installed correctly.
WARNING:root:Connection to ardrone
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/track.py", line 180, in <module>
main()
File "/Library/Python/2.7/site-packages/track.py", line 19, in main
drone = libardrone.ARDrone(True, False)
File "/Library/Python/2.7/site-packages/libardrone/ardrone.py", line 108, in __init__
self.network_process = arnetwork.ARDroneNetworkProcess(com_pipe_other, is_ar_drone_2, self)
File "/Library/Python/2.7/site-packages/libardrone/arnetwork.py", line 51, in __init__
self.ar2video = ar2video.ARVideo2(self._drone, drone.debug)
File "/Library/Python/2.7/site-packages/libardrone/ar2video.py", line 37, in __init__
h264 = h264decoder.H264Decoder(self, drone.image_shape)
File "/Library/Python/2.7/site-packages/libardrone/h264decoder.py", line 82, in __init__
raise Exception("You need to install ffmpeg to be able to run ardrone")
Exception: You need to install ffmpeg to be able to run ardrone
>>> Exception in thread Thread-35:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/Library/Python/2.7/site-packages/libardrone/arnetwork.py", line 86, in run
video_socket, nav_socket, control_socket = _connect()
File "/Library/Python/2.7/site-packages/libardrone/arnetwork.py", line 75, in _connect
control_socket.connect(('192.168.1.1', ARDRONE_CONTROL_PORT))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
error: [Errno 60] Operation timed out
As a beginner, I am having difficulties resolving these issues. My specifications are as follows Mac 10.12, Python 2.7.14, and OpenCV 3.3.0_3.