ArduPlane SITL build failing on Ubuntu 18.04

I’m trying to build ArduPlane locally so I can get SITL up and running. So far I’ve cloned the repo, configured waf, and built waf plane. I’m getting two issues.

  1. When I run sim_vehicle.py --map --console -f plane compilation succeeds, but I get

    [Run MavProxy] An exception has occurred with command: ‘mavproxy.py --map --console --out 127.0.0.1:14550 --out 127.0.0.1:14551 --master tcp:127.0.0.1:5760 --sitl 127.0.0.1:5501’
    [Errno 2] No such file or directory

mavproxy was installed successfully via pip install mavproxy

  1. If I add --osd, I don’t even get a successful build. I see

    [147/669] Compiling libraries/AP_Gripper/AP_Gripper_EPM.cpp
    In file included from …/…/libraries/AP_Filesystem/AP_Filesystem_ROMFS.cpp:21:0:
    …/…/libraries/AP_Math/AP_Math.h: In instantiation of ‘decltype (((one < two) ? one : two)) MIN(const A&, const B&) [with A = unsigned int; B = int; decltype (((one < two) ? one : two)) = unsigned int]’:
    …/…/libraries/AP_Filesystem/AP_Filesystem_ROMFS.cpp:100:49: required from here
    …/…/libraries/AP_Math/AP_Math.h:209:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
    return one < two ? one : two;
    ^
    compilation terminated due to -Wfatal-errors.
    cc1plus: some warnings being treated as errors

Waf: Leaving directory `/home/noah/code/ardupilot/build/sitl’
Build failed
-> task in ‘objs/AP_Filesystem’ failed (exit status 1):
{task 140387936722512: cxx AP_Filesystem_ROMFS.cpp -> AP_Filesystem_ROMFS.cpp.0.o}
(run with -v to display more information)
SIM_VEHICLE: Build failed

Looks like people haven’t had this issue on 18.04 in the past. Not sure what I’m doing wrong. Is there a earlier more stable tag I should check out on git?

I’m using Ubuntu 18:

Can you run the which mavproxy.py command and post the output? It could be that Ubuntu cannot find mavproxy in your system path.

Yep, I get that error too in the latest master. Worth reporting this on Github

mavproxy.py is not on my path. Where does it normally live, and what command should have put it on my path?

I added the sign-compare compilation issue here.

Did you configure waf like so?:

 ./waf configure --board sitl --debug --enable-sfml --sitl-osd

It’s working for me

No, but when I try with that configuration command, it then fails to build with ./waf plane, same error. Are you on 18.04, latest ardupilot from master?

Depends how you installed it. If you used pip install mavproxy --user, then it lives in the ~/.local/bin/ folder.

To put it on your system path, add this to your ~.bashrc file:

export PATH=$PATH:~/.local/bin

EDIT: Fixed folder locations.

1 Like

Thank you, I didn’t do the --user flag so I guess that was important. I got other paths from ardupilot automatically added to my .profile so it’s weird that it missed mavproxy.

The sign bug got fixed over in the git repo so I’m all up and running!

Hi,

I’ve got this same error on Ubuntu 16.04 LTS.
Would you please be able to elaborate as to how you were able to fix this?

Thanks in advance :slight_smile:

I manually added ~/.local/bin to my path as stephen mentioned.

Hello, I don’t know exactly how to use the forum sorry if I wrote it wrong. I’m getting this error when installing ardupilot on 18.04 ubuntu.

SIM_VEHICLE: Start
SIM_VEHICLE: Killing tasks
SIM_VEHICLE: Starting up at SITL location
SIM_VEHICLE: WAF build
SIM_VEHICLE: Configure waf
SIM_VEHICLE: “/home/droneseverler/ardupilot/modules/waf/waf-light” “configure” “–board” “sitl”
Setting top to : /home/droneseverler/ardupilot
Setting out to : /home/droneseverler/ardupilot/build
Autoconfiguration : enabled
Checking for program ‘python’ : /usr/bin/python
Checking for python version >= 3.6.9 : 2.7.17
The python version is too old, expecting (3, 6, 9)
(complete log in /home/droneseverler/ardupilot/build/config.log)
SIM_VEHICLE: (Configure waf) exited with code 256
SIM_VEHICLE: Killing tasks

Please help me.

have you solved the problem?
i have same problem, while compiling it’s failed.
this error appear while im running sim_vehicle.py --map --console in directory ardupilo/ArduCopter
using ubuntu 18, jetson nano. Thx
[ 923/1181] Compiling libraries/AP_Motors/AP_MotorsMatrix.cpp
…/…/libraries/AP_Logger/AP_Logger_Backend.cpp: In member function ‘bool AP_Logger_Backend::Write_VER()’:
…/…/libraries/AP_Logger/AP_Logger_Backend.cpp:578:5: sorry, unimplemented: non-trivial designated initializers not supported
};
^
compilation terminated due to -Wfatal-errors.

Waf: Leaving directory `/home/nano/ardupilot/build/sitl’
Build failed
→ task in ‘objs/AP_Logger/ArduCopter’ failed (exit status 1):
{task 547944786184: cxx AP_Logger_Backend.cpp → AP_Logger_Backend.cpp.3.o}
(run with -v to display more information)
SIM_VEHICLE: Build failed
SIM_VEHICLE: Killing tasks

1 update python ```
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6

2  ```
Go to ./ardupilot/modules/waf and in the file waf-light change first line: #!/usr/bin/env python to #!/usr/bin/env python3