Error:sim_vehicle.py --console --map

SIM_VEHICLE: Using defaults from (/home/yyx/WorkSpace/ardupilot/Tools/autotest/default_params/copter.parm)
SIM_VEHICLE: Run ArduCopter
SIM_VEHICLE: “/home/yyx/WorkSpace/ardupilot/Tools/autotest/run_in_terminal_window.sh” “ArduCopter” “/home/yyx/WorkSpace/ardupilot/build/sitl/bin/arducopter” “-S” “-I0” “–model” “+” “–speedup” “1” “–defaults” “/home/yyx/WorkSpace/ardupilot/Tools/autotest/default_params/copter.parm”
SIM_VEHICLE: Run MavProxy
SIM_VEHICLE: “mavproxy.py” “–master” “tcp:127.0.0.1:5760” “–sitl” “127.0.0.1:5501” “–out” “127.0.0.1:14550” “–out” “127.0.0.1:14551” “–map” “–console”
RiTW: Starting ArduCopter : /home/yyx/WorkSpace/ardupilot/build/sitl/bin/arducopter -S -I0 --model + --speedup 1 --defaults /home/yyx/WorkSpace/ardupilot/Tools/autotest/default_params/copter.parm
Traceback (most recent call last):
File “/home/yyx/.local/bin/mavproxy.py”, line 38, in
from MAVProxy.modules.lib import mp_util
File “/home/yyx/.local/lib/python2.7/site-packages/MAVProxy/modules/lib/mp_util.py”, line 32, in
except (ImportError, ModuleNotFoundError):
NameError: name ‘ModuleNotFoundError’ is not defined
SIM_VEHICLE: MAVProxy exited
SIM_VEHICLE: Killing tasks
yyx@ubuntu:~/WorkSpace/ardu

this is my question

I think it didn’t installed properly. Please check below link and especially where it says:

If you are on a debian based system (such as Ubuntu or Mint), we provide a script that will do it for you. From the cloned ardupilot directory :
Tools/environment_install/install-prereqs-ubuntu.sh -y

https://ardupilot.org/dev/docs/building-setup-linux.html

I have tried it.but it appeared 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

You can follow this Intelligent Quads tutorials. But don’t choose Copter-4.0.4, you can choose 4.5.0+ (I’m using 4.5.2)

感谢您的回复。但是我在虚拟机中安装了ubuntu18.04.ubuntu18.04+Copter-4.0.7

Do not use ArduCopter 4.0.7.
Use ArduCopter 4.5.5

this is general link, you can find an installation guide for ubuntu 18.04 below “Software Development Tutorials” title

ubutun 18.04 is deprecated and we don’t maintain python2 anymore , please upgrade to ubuntu 22.04 and use python3 without our lastest install script.

1 Like