Servers by jDrones

SITL doesn't work on Ubuntu 16.04

Hello,

Has anyone successfully run SITL on Ubuntu 16.04, I’ve tried everything I’ve found on the internet but i still end up getting errors when running sim_vehicle.py

here is output of sim_vehicle.py -w

SIM_VEHICLE: Start
SIM_VEHICLE: Killing tasks
SIM_VEHICLE: Starting up at -35.363261,149.165230,584,353 (CMAC)
SIM_VEHICLE: WAF build
SIM_VEHICLE: Configure waf
SIM_VEHICLE: "/home/mh/ws/ardu/ardupilot/modules/waf/waf-light" "configure" "--board" "sitl"
Traceback (most recent call last):
  File "/home/mh/ws/ardu/ardupilot/Tools/autotest/sim_vehicle.py", line 973, in <module>
    do_build(vehicle_dir, cmd_opts, frame_infos)
  File "/home/mh/ws/ardu/ardupilot/Tools/autotest/sim_vehicle.py", line 371, in do_build
    return do_build_waf(opts, frame_options)
  File "/home/mh/ws/ardu/ardupilot/Tools/autotest/sim_vehicle.py", line 323, in do_build_waf
    run_cmd_blocking("Configure waf", cmd_configure, check=True)
  File "/home/mh/ws/ardu/ardupilot/Tools/autotest/sim_vehicle.py", line 450, in run_cmd_blocking
    p = subprocess.Popen(cmd, **kw)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
SIM_VEHICLE: Killing tasks

Hello,

Try sudo pip install -U pexpect

Has anyone successfully run SITL on Ubuntu 16.04, I’ve tried everything I’ve
found on the internet but i still end up getting errors when running
sim_vehicle.py

Have you done:
git submodules update --init --recursive

?

Peter

Yes I did, same error.

Yes I’ve tried that, but still I get the same error.

Try just
waf distclean waf configure
copy past the output here
and then
waf copter
and copy past the error here

here is the output

waf distclean
'distclean' finished successfully (0.044s)

waf configure
Setting top to                           : /home/mh/ws/ardupilot/ArduCopter 
Setting out to                           : /home/mh/ws/ardupilot/ArduCopter/build 
No function 'configure' defined in /home/mh/ws/ardupilot/ArduCopter/wscript
 waf copter
No function 'copter' defined in /home/mh/ws/ardupilot/ArduCopter/wscript

What command did you run?

this

 sim_vehicle.py -w

run the command on the root of the project not on ArduCoper directory !

Okay here is the output of waf configure

Setting top to                           : /home/mh/ws/ardupilot 
Setting out to                           : /home/mh/ws/ardupilot/build 
Autoconfiguration                        : enabled 
Setting board to                         : sitl 
Checking for 'g++' (C++ compiler)        : /usr/lib/ccache/g++ 
Checking for 'gcc' (C compiler)          : /usr/lib/ccache/gcc 
Checking for need to link with librt     : not necessary 
Checking for HAVE_CMATH_ISFINITE         : yes 
Checking for HAVE_CMATH_ISINF            : yes 
Checking for HAVE_CMATH_ISNAN            : yes 
Checking for NEED_CMATH_ISFINITE_STD_NAMESPACE : yes 
Checking for NEED_CMATH_ISINF_STD_NAMESPACE    : yes 
Checking for NEED_CMATH_ISNAN_STD_NAMESPACE    : yes 
Checking for header endian.h                   : yes 
Checking for header byteswap.h                 : yes 
Could not load the Waf tool 'clang_compilation_database' from ['Tools/ardupilotwaf/', '/home/mh/Downloads/.waf-2.0.4-91d6a4e5781350f87eb0a75b95b84884', '/home/mh/Downloads', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/home/mh/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/wx-3.0-gtk2']
No module named clang_compilation_database
(complete log in /home/mh/ws/ardupilot/build/config.log)

and the output of the waf copter is The project was not configured

did you set up your environement with https://github.com/ArduPilot/ardupilot/blob/master/Tools/scripts/install-prereqs-ubuntu.sh ?

remove the build folder manually (sudo rm -rf build/ ) and try to reconfigure

mb I was running waf from a different directory, now it configures and waf copter actually finishes

BUILD SUMMARY
Build directory: /home/mh/ws/ardupilot/build/sitl
Target               Text     Data  BSS    Total  
--------------------------------------------------
bin/arducopter       1611932  1962  41568  1655462
bin/arducopter-heli  1571036  1962  41376  1614374

but still the sim_vehicle.py -w outputs the same error.

but still the sim_vehicle.py -w outputs the same error.

Does /home/mh/ws/ardu/ardupilot/modules/waf/waf-light exist?

Peter

Yes waf-light is there.

Did you ever get resolution to this I am having the same error.

Servers by jDrones