sim_vehicle.sh to sim_vehicle.py

1,035 views
Skip to first unread message

Randy Mackay

unread,
Aug 16, 2016, 2:50:46 AM8/16/16
to drones-...@googlegroups.com

 

     For people using SITL, you may notice recently that sim_vehicle.sh has been renamed to sim_vehicle.py.  I wasn’t involved in the change but as far as I can tell, from a user point of view, it acts exactly the same as the old .sh version.

 

     One issue that I hit while attempting to use the new .py version was that it initially failed to build and complained:

Missing configuration file 'c:\Users\rmackay9\Documents\GitHub\r9-ardupilot\build\px4-v2\ap_config.h' reconfigure the project!

 

     The resolution was easy though, I just had to delete the /ardupilot/build directory and run the sim_vehicle.py command again.

 

-Randy

Cameron Owen

unread,
Aug 20, 2016, 6:01:11 PM8/20/16
to drones-discuss
Hey Randy,

This extension change caused me some headache as well. The problem is following the tutorial (Running SITL on Windows) verbatim but replacing the ".sh" with ".py" give me the following error:
"could not configure a C++ compiler! (complete log in ../ardupilot/build/config.log)"
"The project was not configure: run "waf configure" first!"

I have attached a screen shot of the errors. I have also found I can't get the export command to run automatically but I'm kicking that issue down the road as manually entering it seems to work.

Regards,

Cameron
Arducopter_SITL_Sim_Error.png

Peter Barker

unread,
Aug 20, 2016, 7:18:11 PM8/20/16
to drones-discuss
Does the make-based build system work on your system?

If so, you should be able to use it using "-s make" as an argument to sim_vehicle.py.
Which C++ compiler were you expecting the waf build system to use?  It obviously hasn't found it....

Peter

Cameron Owen

unread,
Aug 22, 2016, 8:04:40 PM8/22/16
to drones-...@googlegroups.com
G'day Pete,

What needs to be assumed here is that there is no knowledge of what is going on. What I'm trying to achieve is to get a simulated drone running to test my ground station. Basically, as far as cygwin and it's compilers go, I have simply followed the steps in the tutorial. Previous to the tutorial cygwin was not installed. Is there a step in the tutorial that, if followed correctly, directs the waf build system to the C++ compiler installed during the setup?

I have, in the past, built arducopter firmware using the "make" tutorial and it worked. I'll re-check thats still functioning.

Regards,

Cameron

--
You received this message because you are subscribed to a topic in the Google Groups "drones-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drones-discuss/2zYugvVZmMM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drones-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Barker

unread,
Aug 22, 2016, 9:35:43 PM8/22/16
to drones-discuss
Could you paste the content of that file that was mentioned, please? (./ardupilot/build/config.log)


On Sunday, August 21, 2016 at 8:01:11 AM UTC+10, Cameron Owen wrote:

Cameron Owen

unread,
Aug 23, 2016, 10:53:41 PM8/23/16
to drones-...@googlegroups.com
Hey Peter,

The Config reads as:

# project  configured on Sun Aug 21 07:49:20 2016 by
# waf 1.9.2 (abi 99, python 2070af0 on cygwin)
# using /home/Cameron/ardupilot/modules/waf/waf-light configure --board sitl
#
----------------------------------------
Setting top to
/home/Cameron/ardupilot
----------------------------------------
Setting out to
/home/Cameron/ardupilot/build
----------------------------------------
Autoconfiguration
enabled
----------------------------------------
Setting board to
sitl
----------------------------------------
Checking for 'g++' (C++ compiler)
find program=['g++', 'c++'] paths=['/usr/local/bin', '/usr/bin', '/cygdrive/c/Program Files (x86)/Intel/iCLS Client', '/cygdrive/c/Program Files/Intel/iCLS Client', '/cygdrive/c/ProgramData/Oracle/Java/javapath', '/cygdrive/c/WINDOWS/system32', '/cygdrive/c/WINDOWS', '/cygdrive/c/WINDOWS/System32/Wbem', '/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0', '/cygdrive/c/Program Files (x86)/IVI Foundation/VISA/WinNT/Bin', '/cygdrive/c/Program Files/IVI Foundation/VISA/Win64/Bin', '/cygdrive/c/Program Files (x86)/IVI Foundation/VISA/WinNT/Bin', '/cygdrive/c/Program Files (x86)/IVI Foundation/IVI/bin', '/cygdrive/c/Program Files/IVI Foundation/IVI/bin', '/cygdrive/c/Program Files (x86)/Microsoft SQL Server/80/Tools/Binn', '/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn', '/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/DTS/Binn', '/cygdrive/c/Program Files/MATLAB/R2010a/runtime/win64', '/cygdrive/c/Program Files/MATLAB/R2010a/bin', '/cygdrive/c/Program Files/TortoiseSVN/bin', '/cygdrive/c/Program Files (x86)/QuickTime/QTSystem', '/cygdrive/c/Program Files/nodejs', '/cygdrive/c/Program Files (x86)/FIELDSTAR Open Office', '/cygdrive/c/px4/Python27', '/cygdrive/c/Program Files (x86)/Intel/Phone Flash Tool Lite', '/cygdrive/c/Python27', '/cygdrive/c/Python27/Scripts', '/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/DAL', '/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL', '/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/IPT', '/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT', '/cygdrive/c/Program Files (x86)/Skype/Phone', '/cygdrive/c/CooCox/CoIDE_V2Beta/gcc/bin', '/cygdrive/c/CooCox/CoIDE_V2Beta/bin', '/cygdrive/c/WINDOWS/system32/config/systemprofile/.dnx/bin', '/cygdrive/c/Program Files/Microsoft DNX/Dnvm', '/cygdrive/c/Program Files/Microsoft SQL Server/130/Tools/Binn', '/cygdrive/c/Program Files/UrgBenri', '/cygdrive/c/altera/14.0/modelsim_ase/win32aloem,C', '/Program Files (x86)/VideoLAN/VLC', '/cygdrive/c/Users/Cameron/AppData/Roaming/npm', 'HOME/ardupilot/Tools/autotest', '/home/Cameron/ardupilot/Tools/autotest'] var='CXX' -> ['/usr/bin/g++']
['/usr/bin/g++', '-dM', '-E', '-']
err: g++: error: spawn: No such file or directory

from /home/Cameron/ardupilot: Could not determine the compiler version ['/usr/bin/g++', '-dM', '-E', '-']
not found
from /home/Cameron/ardupilot: could not configure a C++ compiler!

Regards,

Cameron


--

Peter Barker

unread,
Aug 23, 2016, 11:00:48 PM8/23/16
to drones-discuss
That seems to show pretty clearly that /usr/bin/g++ does not exist.

That file should have been installed when you installed cygwin.  The instructions actually include a picture with gcc-g++ highlighted as to-be-installed (http://ardupilot.org/dev/docs/sitl-native-on-windows.html)

Could you fire up the cygwin installer and ensure gcc-g++ is marked as to be installed, please?

Peter
To unsubscribe from this group and all its topics, send an email to drones-discus...@googlegroups.com.

Cameron Owen

unread,
Aug 24, 2016, 7:00:09 AM8/24/16
to drones-...@googlegroups.com
Hey Pete,

This is what I see in referecne to Cygwin installer:



To unsubscribe from this group and all its topics, send an email to drones-discuss+unsubscribe@googlegroups.com.

Peter Barker

unread,
Aug 24, 2016, 7:28:20 AM8/24/16
to drones-discuss
Well, darn.  That looks correct :-/

*Does* /usr/bin/g++ exist?  (ls /usr/bin/g++)

If that file does not exist, Try uninstalling/reinstalling the gcc-g++ package using the cygwin tool.

Peter

Cameron Owen

unread,
Aug 24, 2016, 7:40:06 AM8/24/16
to drones-...@googlegroups.com
Hey Pete,

The directory" /usr/bin/g++" doesn't exist. However "/bin/g++" does
.

To unsubscribe from this group and all its topics, send an email to drones-discuss+unsubscribe@googlegroups.com.

Peter Barker

unread,
Aug 24, 2016, 5:55:02 PM8/24/16
to drones-discuss
OK, I note that in the cygwin tool you have 5.3.0-5 installed; try installing 5.4.0-1 - it really shouldn't make a difference, but....

What does "cygcheck -l gcc-g++" return?

Peter

Cameron Owen

unread,
Aug 24, 2016, 7:49:35 PM8/24/16
to drones-...@googlegroups.com
Hey Pete,

Ok I'll try that. 

For your reference I have attached the response from the cygcheck command.

Regards,

Cameron

To unsubscribe from this group and all its topics, send an email to drones-discuss+unsubscribe@googlegroups.com.
CygwinG++Response.txt

Holger Steinhaus

unread,
Aug 29, 2016, 10:49:15 AM8/29/16
to drones-discuss
I really like the clearly readable output of the new sim_vehicle.sh script.

But I see a strange issue here (Fedora Linux 23): from time to time (every 3rd or 5th build), the script recompiles everything after regenerating  MAVLink  headers without any reason (never ever touched the XMLs). Is there any known fix for that anoying and extremely time-consuming behaviour? The recompilation is not related to any source changes, even after Ctrl-C-ing a running simulation and immediately restarting it can trigger the problem.

Holger

Peter Barker

unread,
Aug 29, 2016, 7:37:19 PM8/29/16
to drones-discuss
I'm not able to replicate thie behaviour here.

Can you replicate the behaviour just with the waf configure and waf build commands?

Is it possible your clock is shifting?

Lucas De Marchi

unread,
Aug 29, 2016, 9:04:00 PM8/29/16
to drones-discuss

Maybe we are passing "clean" to waf and it's removing the generated headers? Waf is not affected by clock drift since it actually hashes each dependency


--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discuss+unsubscribe@googlegroups.com.

Cameron Owen

unread,
Aug 29, 2016, 10:12:21 PM8/29/16
to drones-...@googlegroups.com
Hey Pete,

As an update I actually got the simulator fully functional however not per the WINDOWS SITL  tutorial. I instead installed the the bash terminal for windows 10 (http://www.zdnet.com/article/ubuntu-and-bash-arrive-on-windows-10/) then followed the LINUX SITL tutorial instead. The only catch with this method was, to get the map and console working, I also needed to install Xserver (https://sourceforge.net/projects/xming/). After that it all worked well.

I didn't try reinstalling Cygwin and don't really need to at this point.

Regards,

Cameron

To unsubscribe from this group and all its topics, send an email to drones-discuss+unsubscribe@googlegroups.com.

Lucas De Marchi

unread,
Aug 30, 2016, 12:22:09 AM8/30/16
to drones-discuss
On Mon, Aug 29, 2016 at 11:12 PM, Cameron Owen <cameron...@gmail.com> wrote:
Hey Pete,

As an update I actually got the simulator fully functional however not per the WINDOWS SITL  tutorial. I instead installed the the bash terminal for windows 10 (http://www.zdnet.com/article/ubuntu-and-bash-arrive-on-windows-10/) then followed the LINUX SITL tutorial instead. The only catch with this method was, to get the map and console working, I also needed to install Xserver (https://sourceforge.net/projects/xming/). After that it all worked well.


Nice, so in windows 10 we have a much better environment that can actually be used.  I was wondering if we would be able to build ardupilot there, now I have the answer :). Thanks.


Lucas De Marchi

Cameron Owen

unread,
Sep 18, 2016, 9:54:57 PM9/18/16
to drones-discuss
Hey Pete,

A new problem came up. I tried to get the sim running on another computer following the exact same setup I used for the first. I now get the attached error when trying to run the sim_vechicle.py.

Any thoughts?

Regards,

Cameron
Sim Error.txt

Peter Barker

unread,
Sep 18, 2016, 10:03:39 PM9/18/16
to drones-discuss
Please check that "mavproxy.py" is in your path.

Peter
Reply all
Reply to author
Forward
0 new messages