Trouble with OpenCV

Hi everyone,

I have an internship at NASA this summer where I’ll be working with PixHawk and ArduPlane. I’ll specifically be working with the SITL simulator, at least initially. So I’ve been trying to get the SITL up and running on my laptop, but I keep running into problems with OpenCV.

I followed the installation instructions here http://dev.ardupilot.com/wiki/simulation-2/sitl-simulator-software-in-the-loop/setting-up-sitl-on-linux/. When I run the following command

I get these errors:

Failed to load module: No module named terrain. Use 'set moddebug 3' in the MAVProxy console to enable traceback no script test/mavinit.scr Failed to load module: No module named console. Use 'set moddebug 3' in the MAVProxy console to enable traceback Failed to load module: No module named map. Use 'set moddebug 3' in the MAVProxy console to enable traceback

If I set moddebug 3, and then try to manually import a module, I get the following error:

[code]set moddebug 3
MANUAL> module load terrain
MANUAL> Traceback (most recent call last):
File “/home/maotouying/anaconda/bin/mavproxy.py”, line 260, in load_module
m = import_package(modpath)
File “/home/maotouying/anaconda/bin/mavproxy.py”, line 390, in import_package
mod = import(name)
File “/home/maotouying/anaconda/lib/python2.7/site-packages/MAVProxy/modules/mavproxy_terrain.py”, line 7, in
from MAVProxy.modules.mavproxy_map import mp_elevation
File “/home/maotouying/anaconda/lib/python2.7/site-packages/MAVProxy/modules/mavproxy_map/init.py”, line 11, in
from MAVProxy.modules.mavproxy_map import mp_slipmap
File “/home/maotouying/anaconda/lib/python2.7/site-packages/MAVProxy/modules/mavproxy_map/mp_slipmap.py”, line 17, in
import cv
ImportError: No module named cv

Traceback (most recent call last):
File “/home/maotouying/anaconda/bin/mavproxy.py”, line 260, in load_module
m = import_package(modpath)
File “/home/maotouying/anaconda/bin/mavproxy.py”, line 390, in import_package
mod = import(name)
ImportError: No module named terrain
[/code]

So, it’s pretty obvious where the problem is, but no matter how I try to install OpenCV, I get the same problem. I already installed it via this command

I tried installing it using the script here https://help.ubuntu.com/community/OpenCV, as well as here https://github.com/jayrambhia/Install-OpenCV/blob/master/Ubuntu/. Neither worked. By the way, the regular expression in the script supplied on Ubuntu site isn’t matching with the latest version of OpenCV because the naming convention for updates has changed. So, the Ubuntu script is broken. I ran the version of the script on GitHub, which installed version 2.4.9, but got the same errors. Is building OpenCV from source the only way to get it working?

By the way, I’m running Linux Mint 17 on a Toshiba Satellite.