Fail Running Sitl with Cygwin

I am trying to run sitl in cygwin using …/Tools/autotest/sim_vehicle.py --map --console at ~/ardupilot/ArduCopter
And I get this error:
Waf: Leaving directory `/home/gusta/ardupilot/build/sitl’
Build failed
-> task in ‘objs/AP_AHRS’ failed (exit status 1):
{task 123145293410664: cxx AP_AHRS_NavEKF.cpp -> AP_AHRS_NavEKF.cpp.0.o}
[’/usr/bin/g++’, ‘-std=gnu++11’, ‘-fdata-sections’, ‘-ffunction-sections’, ‘-fno-exceptions’, ‘-fsigned-char’, ‘-Wall’, ‘-Wextra’, ‘-Wformat’, ‘-Wshadow’, ‘-Wpointer-arith’, ‘-Wcast-align’, ‘-Wundef’, ‘-Wno-unused-parameter’, ‘-Wno-missing-field-initializers’, ‘-Wno-reorder’, ‘-Wno-redundant-decls’, ‘-Wno-unknown-pragmas’, ‘-Werror=format-security’, ‘-Werror=array-bounds’, ‘-Werror=uninitialized’, ‘-Werror=init-self’, ‘-Wfatal-errors’, ‘-Werror=unused-but-set-variable’, ‘-O3’, ‘-include’, ‘ap_config.h’, ‘-Ilibraries’, ‘-Ilibraries/GCS_MAVLink’, ‘-I.’, ‘-I…/…/libraries’, ‘-I…/…/libraries/AP_Common/missing’, ‘-DSKETCHBOOK="/home/gusta/ardupilot"’, ‘-DCONFIG_HAL_BOARD=HAL_BOARD_SITL’, ‘-DCONFIG_HAL_BOARD_SUBTYPE=HAL_BOARD_SUBTYPE_NONE’, ‘…/…/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp’, ‘-c’, ‘-o/home/gusta/ardupilot/build/sitl/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp.0.o’]
SIM_VEHICLE: Build failed
SIM_VEHICLE: Killing tasks
SIM_VEHICLE: kill_tasks failed: a bytes-like object is required, not ‘str’

Do you have any idea @amilcarlucas?

Forget cygwin, use WSL and Ubuntu
https://ardupilot.org/dev/docs/building-setup-windows10.html

I was following this guide, that says I have to use cygwin for running sitl for windows
https://ardupilot.org/dev/docs/sitl-native-on-windows.html#

Although cygwin works, it is old tech. WSL gives you native unix enviroment under windows and makes your life much easier. Check it out.

@Eosbandi I am very new to this situation of enviroments, virtual machines and prompt/terminal linux commands.Like until other day I didn’t know you could use git on a windows.

What I want to do is use mavproxy, dronekit,and mission planner to control and observe my drone with scripts and use sitl for tests/simulations.

Could you please elaborate, and if possible, could you kindly give a walkthrough of how could I achieve that using wsl? I just looked but in the ardupilot wiki, there is no sitl tutorial using wsl, it says to use cygwin, and like I said, I am a total newbie, I don’t know if its just a matter of using the same steps from cygwin with wsl.

Once you installed WSL it become identical to Linux. You can use https://ardupilot.org/dev/docs/setting-up-sitl-on-linux.html guide.

but how would work to connect to the autopilot, from what I saw, there is no USB functionality in WSL2 for example.

You said you want to do SITL.

Yeah, I want to use Sitl , but also I want to use dronekit too.

dronekit is just a bunch of python libraries you can run then under any python (including Win64 native python)

Ok I followed the wiki article for wsl, and I read the articles for dronekit, sitl and mav proxy.I want to confirm somethings:

1.In the Dronekit installation says python 3 is not supported and should use 2.7. I looked over release notes, and the latest one has python 3 basics, then I searched around and found there is one version further that was released, the 2.9.2 in https://pypi.org/project/dronekit/ that has python 3 as programming language. So, can I use python 3 or not?

  1. Regarding Ubuntu, I keep reading or hearing people saying that is best to use one version instead of other, is there a right version? 14.04, 16.04. 18.04, 20.04?

  2. Regarding versions, should I download the latest ardupilot version or should an older one?

  1. you need to try python 3 yourself

  2. 20.04

  3. Use ArduCopter 4.0.6-rc2

Okay, sorry for my ignorance in these subjects, still a newbie in this drone universe. If I may ask some more, just to confirm, if I want to connect the sitl to mission planner, the mission planner can be the one I have in windows, or do I have to download and install one in wsl?