This thread is to discuss the details of getting SITL running on Windows as documented on this wiki page.

Views: 9134

Reply to This

Replies to This Discussion

Bill Bonney mentioned that there are these newer instructions on MAVProxy but those instructions don't include detailed info on how to set-up the system on Windows.  There's info on Linux, Mac .. but no windows.

Rob said this:

I needed to do the following to get the compilation process started:

cd ardupilot/ArduCopter
make configure
cd ..
python ./Tools/autotest/autotest.py build.ArduCopter fly.ArduCopter logs.ArduCopter –map

It ran through a few tests, but I never saw a map. But but I got this error message at the end (which may be normal):

File "/usr/lib/python2.7/dist-packages/pexpect.py", line 836, in read_nonblocking
raise EOF ('End Of File (EOF) in read_nonblocking(). Exception style platform.')
EOF: End Of File (EOF) in read_nonblocking(). Exception style platform.
>>>> RUNNING STEP: logs.ArduCopter at Mon Dec 9 21:43:24 2013
Dumping logs for ArduCopter
Starting sketch 'ArduCopter'
Starting SITL input
bind port 5760 for 0
Serial port 0 on TCP port 5760
Waiting for connection ....
navigating menus
Saved log for ArduCopter to /mnt/hgfs/3drobotics/buildlogs/ArduCopter.flashlog
>>>> PASSED STEP: logs.ArduCopter at Mon Dec 9 21:43:26 2013

It could be that the pyexpect is in dos format when it needs to be in unix format.  running dos2unix on the file might fix it.

When I set-up Ubuntu as part of creating that page I also found that the map didn't appear initially but then magically a day later it started working.  While I was working through the problem with Tridge he asked me to do this:

     mp_slipmap.py

This brought up the map for me.  He then asked me to do these two:

     sudo pip install --upgrade pymavlink

     sudo pip install --upgrade MAVProxy

the first one didn't do anything but the 2nd one did do an upgrade which surprised me because I thought that I'd done that as part of Step #4.

A couple of more steps to add:

1.) make sure that ardupilot code is checked out from git with Unix style end of lines or else do:

dos2unix *.py on all files under the ./Tools/autotest

(I would've thought Ubuntu would've taken care of this during mounting of the NTFS file system.)

2.) put /usr/local/bin in your PATH to access the MAVProxy scripts such as mp_slipmap.py

mp_slipmap.py worked, but the map or copter graphics didn't show up so far while running this script

python ./Tools/autotest/autotest.py build.ArduCopter fly.ArduCopter logs.ArduCopter –map

Its running through the various test scenarios for RTL, geofence, etc., but no map. I have seen these errors:

map set showgpspos 1
Unknown command 'map set showgpspos 1'
RTL> map set showsimpos 1
Unknown command 'map set showsimpos 1'

so maybe the map module wasn't loaded for some reason?

Noticed that MAVProxy also needed pip so I installed:

sudo apt-get install python-dev

sudo pip install pil

...still no map though during the test.

Same here, all work fine but no map.
With the script mp_slipmap.py i see the map.
Try this, go to "Tools\autotest" dir and write here:

autotest.py --map

I see the map in this way, also with ArduCopter.

Ok, i've found the solution here for view the map.
Go to "arducopter" directory and write this:

./Tools/autotest/autotest.py --map build.ArduCopter fly.ArduCopter logs.ArduCopter

This is the correct line, the "--map" switch must be in the right position.
But i use only the VM for all, not the Windows section, i'm a litte OT (LOL), this is my path option:

export PATH=/usr/lib/ccache:$PATH
export PATH=/usr/local/bin:$PATH
export PATH=$PATH:$HOME/ardupilot/Tools/autotest
export PATH=$PATH:$HOME/mavlink/pymavlink
export PATH=$PATH:$HOME/MAVProxy

Cheers, Marco

I've two question please:

1) there's a way to connect the Planner via TCP to the simulation in progress?
I managed to do that through jsbsim of course, but it would be nice to do that while the script is running

2) is possible covert a tlog or flashlog for running my flight inside SITL, like the telemetry log inside the Planner?

I think the issue was more that the double dash (i.e. --) was being converted to a single dash (i.e. -) on the wiki.  I've modified the page a bit so that it doesn't try to do any extra formatting.

Marco,

    Yes, both are possible and I've added some extra instructions at the bottom of the wiki page.  The dataflash logs definitely work but unfortunately I can't get the connection to the mission planner to work immediately.  It may be that I've picked the incorrect IP address.

     Update: it does work!  wiki update again.

Thanks Randy!

HI, newbie problem !

I follow the instruction at:

http://dev.ardupilot.com/wiki/settraing-up-sitl-on-windows/

reached to the place I tries to run the autotest.py:

./Tools/autotest/autotest.py build.ArduCopter fly.ArduCopter logs.ArduCopter --map

but all I get is command not found !

I tried to cd to the directory , and could see the code using vi autotest.py

what am I missing 

Itay

Itay,

     Which directory are you in when running the command?   For me I have the ardupilot code installed in this directory: C:\Users\rmackay9\Documents\GitHub\ardupilot.  So under this I have directories like ArduCopter, ArduPlane, libraries, etc.

     So when I run that command I need to be in the ../GitHub/ardupilot directory.

 

    

Reply to Discussion

RSS

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service