PX4-Autopilot: jMAVSim SITL with Windows Cygwin gets stuck

Installed the Windows Cygwin Toolchain, and attempting to run the JMAVSim. I followed the guide https://dev.px4.io/en/setup/dev_env_windows_cygwin.html. After I start the build and run “make posix jmavsim”, the SITL simulation gets stuck in accessing Sensors. Copy pasting the errors I get on the console jmavsim

ERROR [sensors] Accel #0 fail:  TIMEOUT!
ERROR [sensors] Sensor Accel #0 failed. Reconfiguring sensor priorities.
WARN  [sensors] Remaining sensors after failover event 0: Accel #0 priority: 1
WARN  [sensors] Remaining sensors after failover event 0: Accel #1 priority: 1
ERROR [sensors] Gyro #0 fail:  TIMEOUT!
ERROR [sensors] Sensor Gyro #0 failed. Reconfiguring sensor priorities.
WARN  [sensors] Remaining sensors after failover event 0: Gyro #0 priority: 1
WARN  [ekf2] accel id changed, resetting IMU bias
ERROR [sensors] Accel #0 fail:  TIMEOUT!
ERROR [sensors] Sensor Accel #0 failed. Reconfiguring sensor priorities.
WARN  [sensors] Remaining sensors after failover event 0: Accel #0 priority: 1
WARN  [sensors] Remaining sensors after failover event 0: Accel #1 priority: 1
ERROR [sensors] Gyro #0 fail:  TIMEOUT!
ERROR [sensors] Sensor Gyro #0 failed. Reconfiguring sensor priorities.
WARN  [sensors] Remaining sensors after failover event 0: Gyro #0 priority: 1

Steps to reproduce the behavior:

  1. Install cygwin setup as documented here
  2. build and run the jmavsim as documented. Basically I ran “make posix jmavsim” in the cygwin console

Expected behavior Expect the drone to take off in the SITL

Log Files and Screenshots Always provide a link to the flight log file:

  • Download the flight log file from the vehicle (tutorial).
  • Share the link to a log showing the problem on PX4 Flight Review.

I have attached the screenshot of the cygwin console.

Laptop config: Intel Core i7-7700HQ CPU @ 2.8GHz, 4 cores, 16GB RAM

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (12 by maintainers)

Most upvoted comments

0c5c741b1a63ff90b9137d6327ccdd10fab6c084 likely introduces multiple problems…

  • Thanks to @julianoes’s help we found out that the close() open() for every client here https://github.com/PX4/Firmware/blob/master/platforms/posix/src/px4_daemon/server.cpp#L156-L157 breaks with open returning “device or resource busy”. Recreating the pipe each time with unlink() mkfifo() in between seems to fix it but the next client may already run into an abandonned pipe and therefore has to retry. Then the autostart script runs through and it starts up but:
  • Sensors always says all the sensor data is stale exactly like in the screenshot of OP. When I run listener (also works from an external shell) I see data but the timestamp of the data is always from the exact moment I last ran listener (e.g. if I wait 10 seconds and run listener again the last message on the uorb topic was 10 seconds ago).
  • Also Ctrl+C or the shutdown command write “Exiting…” and “Shuting down” and make the shell unusable but the px4 binary stays open and blocks until I kill it.

So not so many good news yet but I’ll not give up and continue to try and find the causes.

@evgenee So all our instructions assume you want to get the latest version of the master branch from either the PX4/Firmware repo or your clone of that repo. But if that latest version does not work, you might want to go back in time and get an older version that does work.

The way to do that is to get a specific tag release. You can see all the tags and releases here.

So after doing:

git clone https://github.com/PX4/Firmware.git

To get PX4 code at the time a tag was created you do:

git checkout tags/v1.8.0

If you have already built this you might need to run make distclean or similar before building.

There is a note on this at the end of this section: http://dev.px4.io/en/setup/building_px4.html#get_px4_code

Hope that helps. If you get stuck, search google for information on git and tags.