Servers by jDrones

Error about sim_vehicle.py

Hi everyone,

I am new to ardupilot. I followed the instruction to run the SITL, however, an error stopped me when I run “sim_vehicle.py -w”. Here is the error information.

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"
RiTW: Starting ArduCopter : /home/wang/workspace/ardupilot/build/sitl/bin/arducopter-quad -S -I0 --home -35.363261,149.165230,584,353 -w --model + --speedup 1 --defaults /home/wang/workspace/ardupilot/Tools/autotest/default_params/copter.parm
Traceback (most recent call last):
File “/home/wang/workspace/ardupilot/Tools/autotest/sim_vehicle.py”, line 845, in
start_mavproxy(cmd_opts, frame_infos)
File “/home/wang/workspace/ardupilot/Tools/autotest/sim_vehicle.py”, line 663, in start_mavproxy
run_cmd_blocking(“Run MavProxy”, cmd, env=env)
File “/home/wang/workspace/ardupilot/Tools/autotest/sim_vehicle.py”, line 509, in run_cmd_blocking
p = subprocess.Popen(cmd, **kw)
File “/usr/lib/python2.7/subprocess.py”, line 710, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
SIM_VEHICLE: Killing tasks

Does anybody know how to solve this? Thanks so much!

Hi, do you have mavproxy (and pymavlink) installed ? (sudo pip2 install -U mavproxy pymavlink )

That’s it. Thank you!

SIM_VEHICLE: Using defaults from (/home/PRIYAM SHAH/ardupilot/Tools/autotest/default_params/sub.parm)
SIM_VEHICLE: Run ArduSub
SIM_VEHICLE: “/home/PRIYAM SHAH/ardupilot/Tools/autotest/run_in_terminal_window.sh” “ArduSub” “/home/PRIYAM SHAH/ardupilot/build/sitl/bin/ardusub” “-S” “-I0” “-” “–model” “vectored” “–speedup” “1” “–defaults” “/home/PRIYAM SHAH/ardupilot/Tools/autotest/default_params/sub.parm”
SIM_VEHICLE: Run MavProxy
SIM_VEHICLE: “mavproxy.exe” “–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” “–out” “udp:0.0.0.0:14550” “–map” “–console”
RiTW: Starting ArduSub : /home/PRIYAM SHAH/ardupilot/build/sitl/bin/ardusub -S - --model vectored --speedup 1 --defaults /home/PRIYAM SHAH/ardupilot/Tools/autotest/default_params/sub.parm
which: no osascript in (/usr/local/bin:/usr/bin:/cygdrive/c/sdk-tools-windows-3859397/platform-tool::/cygdrive/c/sdk-tools-windows-3859397/tools/bi::/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Python 3.6:/cygdrive/c/Python 3.6/Scripts:/cygdrive/c/Program Files/Java/jdk1.8.0_131/bin:/cygdrive/c/Program Files/Java/jre1.8.0_131/bin:/cygdrive/c/TDM-GCC-64/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Git/cmd:/cygdrive/c/TDM-GCC-64:/cygdrive/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/cygdrive/c/WINDOWS/IsmFiles:/cygdrive/c/MinGW/bi:/cygdrive/c/MinGW/msys/1.0/bin::/cygdrive/c/firefoxdrive:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files/Geth":/cygdrive/c/Program Files/Git LFS:/cygdrive/c/Program Files/PuTTY:/cygdrive/c/Program Files (x86)/MAVProxy:/cygdrive/c/Anaconda:/cygdrive/c/Anaconda/Library/mingw-w64/bin:/cygdrive/c/Anaconda/Library/usr/bin:/cygdrive/c/Anaconda/Library/bin:/cygdrive/c/Anaconda/Scripts:/cygdrive/c/Users/PRIYAM SHAH/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Users/PRIYAM SHAH/AppData/Roaming/npm:/cygdrive/c/Users/PRIYAM SHAH/AppData/Local/GitHubDesktop/bin:/cygdrive/c/Users/PRIYAM SHAH/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/phantomjs-2.1.1-windows/bin:/cygdrive/c/Users/PRIYAM SHAH/AppData/Local/Google/Cloud SDK/google-cloud-sdk/bin:/cygdrive/c/Program Files/heroku/bin:/home/PRIYAM SHAH/ardupilot/Tools/autotest)
RiTW: Window access not found, logging to /tmp/ArduSub.log
SIM_VEHICLE: Keyboard Interrupt received …
SIM_VEHICLE: Killing tasks

Occurrs And the Log written is

Set parameter SIM_SPEEDUP to 1.000000
Creating model vectored at speed 1.0
Home: 33.810314 -118.393869 alt=0.000000m hdg=270.000000
Starting sketch ‘ArduSub’
Starting SITL input
Using Irlock at port : 9005
bind port 5760 for 0
Serial port 0 on TCP port 5760
Waiting for connection …
Failed to load defaults from /home/PRIYAM
bind port 5762 for 2
Serial port 2 on TCP port 5762
bind port 5763 for 3
Serial port 3 on TCP port 5763
TSYS01 device is null!

Can Someone help me out!
System : Windows 10

Hi

Did you ever find a solution to this problem? I’m having the same issue.

Thanks.

Jon

Those are the key lines in the output. It indicates the script thinks it has received an interrupt signal - typically via pressing ctrl-c in that terminal. Are you doing that?

Hi Peter,

Thanks for that, the interrupt bits weren’t present. They did come up if I carried out ctrl-c thought. Tried a reinstall of the MAV software and it seems to have solved it.

On to the next issue now that I can’t seem to connect XPlane. It looks like I’m missing some simulation tab settings, despite having the advanced layout selected.

Don’t know if you’ve had any experience of that bit but any help is gratefully received.

Cheers,

Jon

I am having the same issue I am running windows 10 and have everything installed on D:

snyde@MSI ~
$ cd ~/ardupilot/ArduCopter

snyde@MSI ~/ardupilot/ArduCopter
$ …/Tools/autotest/sim_vehicle.py --map --console
Traceback (most recent call last):
File “…/Tools/autotest/sim_vehicle.py”, line 30, in
from pymavlink import mavextra
ModuleNotFoundError: No module named ‘pymavlink’

snyde@MSI ~/ardupilot/ArduCopter
$ pip install “pymavlink==2.4.6”
Collecting pymavlink==2.4.6
Downloading pymavlink-2.4.6.tar.gz (3.5 MB)
|████████████████████████████████| 3.5 MB 629 kB/s
Requirement already satisfied: future in /usr/lib/python3.6/site-packages (from pymavlink==2.4.6) (0.18.2)
Requirement already satisfied: lxml in /usr/lib/python3.6/site-packages (from pymavlink==2.4.6) (4.6.2)
Using legacy ‘setup.py install’ for pymavlink, since package ‘wheel’ is not installed.
Installing collected packages: pymavlink
Attempting uninstall: pymavlink
Found existing installation: pymavlink 2.4.14
Uninstalling pymavlink-2.4.14:
Successfully uninstalled pymavlink-2.4.14
Running setup.py install for pymavlink … done
Successfully installed pymavlink-2.4.6

snyde@MSI ~/ardupilot/ArduCopter
$ cd ~/ardupilot/ArduCopter

snyde@MSI ~/ardupilot/ArduCopter
$ …/Tools/autotest/sim_vehicle.py --map --console
Traceback (most recent call last):
File “…/Tools/autotest/sim_vehicle.py”, line 30, in
from pymavlink import mavextra
ModuleNotFoundError: No module named ‘pymavlink’

Servers by jDrones