Bug report, cygwin SITL not working

Sorry if this is in the wrong place, mods please move it to somewhere more appropriate. I just want to document some issues I had before moving on, so the info isn't lost.

The autotest functionality never quite worked for me using cygwin in windows 7.

Using version 2.71, autotest flights were always very erratic and always crashed within one of the first few stages of the autotest (as in the plane crashed into the ground). After some investigation, the gyro was not initializing properly. Further investigation showed a bug described as follows.

In AP_HAL_AVR_SITL/SITL_State.cpp, there is a function call _update_ins() at roughly line 254, passing in data originating from jsbsim. All data/passed variables are ok at this point.

However, when the same data is viewed inside called function _update_ins() in  AP_HAL_AVR_SITL/sitl_ins.cpp, the variables sometimes have value NaN (maybe 1 in 50 on average is NaN). This then causes the gyro initialisation to fail as there are always a few NaNs in the accumulated gyro outputs.

There are some mismatches between double and float types in the described function call, however typecasting and/or redefining things didn't help at all. Pretty strange.

That was using gcc 3.4.4-999 (cygwin terminology). I changed to gcc 3.4.4-3 and suddenly the gyro started initialising properly - no more NaNs.

Unfortunately, autotest still didn't really work. Flights were erratic and nearly always crashed (into ground) before finishing. I wasn't able to find the remaining issues.

Today I tried version 2.72. Using a completely clean/untouched copy the autotest flight still fails to finish, crashing about halfway through the flight after some erratic flying.

I've decided to give up on using cygwin and try using ubuntu in a VM. Hopefully that yields better results.

I'm a fan of the project and the codebase seems very solid - I just wanted to document the issues I had trying to run it in cygwin, in the hope that it helps someone.

 

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • I can confirm that the software in the loop simulation runs just fine in ubuntu with no issues. The autotest flight even lands itself! It never got that far under cygwin.

    I have no idea what was causing the strange behaviour in cygwin, but shame it doesn't work. Linux in virtualbox is sluggish on my pc. I'd be interested to know if anyone else got SITL working in cygwin.

  • Developer

    I've started using VMWare to run everything under an ubuntu virtual machine.  It took a while to set-up though!

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…