Set waypoints failed - upload failed: error #13


#1

Hi,

Can you please assist in figuring out why waypoint upload might have failed multiple times?
From our app it failed, but from flytConsole it worked - and the drone flew the waypoints as expected.

I know link quality again may be an issue - but the flytPi was right next to the remote… In any case, I’m attaching logs, and from one of them I see this error:
e[31m[ERROR] [1524811983.507586202]: WP: upload failed: error #13e[0m

Others are clearly timeouts:
e[33m[ WARN] [1524813678.190336809]: WP: timeout, retries left 1e[0m

We also had another issue where commands were sent twice - this is from our software - is it possible if we send too many commands via REST API that maybe pixhawk is busy and not able to take all of them?

I suspect from flytConsole it worked because there weren’t many commands sent one after another.

Before set waypoints we send: waypoint pause, waypoint clear, only then set waypoints.
If you have idea what error #13 is, please share.

The JSON should be correct, it works with the simulator, no issues.

We are also using REST API for telemetry instead of websocket - every 2-3 seconds we get global location, battery, state, others. Do you think this also overloads the connection / pixhawk?

Logs below (log date is not correct, this was today 4th of May). Thanks for the help.

flyt_runlogs_2018-04-27_12-52.log (136 KB)
flyt_runlogs_2018-04-27_12-27.log (1.2 MB)

Also attaching images of the setup (for the last try they were outside- before, the remote, flightPi and laptop were in the trunk, maybe that also doesn’t help). flightPi gets power from the car - via a phone charger that’s rated at 2V 3A - it’s not a power issue this time :slight_smile: .


#2

Sorry for the delay. I will look into this issue and get back to you ASAP.


#3

Error #13: MAV_MISSION_INVALID_SEQUENCE.

For more info, check out ‘MAV_MISSION_RESULT’ of this link -> http://mavlink.org/messages/common.

Pixhawk’s compute power can handle much more than this. Ideally, this should not be an issue. But Pixhawk’s waypoint manager can accept waypoints from two separate sources simultaneously, which might be causing this issue. Both of your calls, are trying to send a list of WPs, and due to poor link quality, the order of the WPs gets garbled up. The poor link quality is aggravating the issue, and that’s why you may not be facing this issue in FlytSim.


#4

OK, thanks for the feedback.

I will fix the issue of us sending duplicate commands, try again without propellers - in the office - and then maybe try a real world test tomorrow again - I made changes to the code to wait for 3 seconds - without making any other call, then make the set_waypoints call - hopefully this fixes the issue.

I assume if we had a wired connection between pixhawk and flytPi, everything would be better, right?

Thanks again.


#5

Yes. That is correct.


#6

So I did another test today in the office - 2 out of about 6 times the waypoints uploaded, and the other times failed - with error #13.

Could it be that we issue waypoint clear just before set - and the pixhawk internally sets an empty array or something?

In any case, we will try the set waypoint multiple times from code, and we will get the success rate up. I’ll also try from postman and see if it’s the same result.

Also - flytConsole didn’t show any logs on UI - I downloaded them using FileZilla - and all logs have the date: 27th of April - does flytOS need internet to get the correct date? we’ve been running it without.

Attaching latest log, and screenshot of ui with no logs.

flyt_runlogs.log (113.6 KB)


#7

In the shared runlog file, I observe:

  • you have sent Waypoint_set API 4 times,
  • out of which, only once did it get successfully executed,
  • twice it failed with error : error #13
  • once it failed with error : general error

From FlytConsole, can you set the waypoints, and check its success rate. Unfortunately, our Solo is not in a working state right now, and hence, I cannot do this testing.

The logs are dated according to the system time. If your device is capable of running a correct system time without internet, then it would work just fine. In case it is unable to do so you would have to connect to internet once so that the device syncs its clock.

Does this happen on a regular basis? I have observed this to occur when there is poor connectivity between your laptop/desktop and the device running FlytOS.


#8

Hi, just an update:

We updated the code to follow the following sequence - when we want to set waypoints, we pause other calls, we wait 3 seconds, try a call, if it didn’t work, wait 3 more seconds, try a call - we do this 6 times before giving up.

Using the above method, we managed today to fly a waypoint mission from our app - everyone was excited.

Regarding the logs, the flytOS is connected to my laptop via direct ethernet cable - I set the IPs manually, the connection is the best possible - direct wired connection. I think it got confused due to the date / time issue. I will erase all of them and try again.

Our next step would be to run the python script from flytPi device. I assume we can install any python modules on flytOS like pika - for rabbitMQ connection.

For now, we can continue like this, until maybe our client will purchase another drone. Thanks for the help.

Regards,
Alex.


#9

Amazing!!!

FlytOS is just Ubuntu16.04 with ROS and other dependencies installed. Any software which is supported by Ubuntu and RPi would work on FlytOS as well.


#10

thanks, i got it to work by using cron as root, and the @reboot schedule for running a command.


#11