Drone losing position / crashing in Offboard mode
-
@Eric-Katzfey when I do
voxl-inspect-mavlink mavlink_onboard
I am getting
and in mavlink console when I stream Odometry message as you said I am getting no output
when I used -d instead of -u it shows device not running. I tried with different ports
-
Hey @Eric-Katzfey , I think I solved it. I got the odometry stream to VOXL2 from Cube. I had to run
mavlink stream -r 30 -s ODOMETRY -d /dev/ttyS0
after this I got odometry stream on the
voxl-inspect-mavlink mavlink_onboard
-
@Jetson-Nano Great! And is that now allowing you to run the figure 8?
-
@Eric-Katzfey I haven't done the flight test. I'll do the flight test and get back to you.
-
@Eric-Katzfey , I did the flight test and it works fine. Thank you.
But there is a problem, when I am checked 1st time it worked fine, later after a reboot and once again I ran the Mavlink Odometry stream, the terminal was lagging. The terminal with the output of voxl-inspect-mavlink mavlink_onboard this is lagging. The Odometry Hz was somewhere around 5 - 10, all the output in the terminal was lagging, so I though it was some WiFi issue and again tested offboard mode, but this time the drone went back to home.
So I rebooted the system and again ran the mavlink stream and waited for sometime until the lag in the voxl terminal is not there anymore, then when I tested offboard it was fine. I tried both figure eight and trajectory, both worked fine. I will attach the logs, can you please tell what might have caused the lag?
https://logs.px4.io/plot_app?log=93fb987f-c326-4d5d-89bb-2771bcacb3fc
https://logs.px4.io/plot_app?log=593bdb7b-7ce5-45f5-b183-2d0914015162
https://logs.px4.io/plot_app?log=3d8e8bd4-ec6e-4bcf-beea-741dff891ff9
https://logs.px4.io/plot_app?log=d33b6610-af39-4006-b90e-d1fdaad75da7
https://logs.px4.io/plot_app?log=b1ac6a04-0e1a-4049-bc27-dfe9a25224a8
-
And I have one more question @Eric-Katzfey , I have to start the mavlink stream everytime. Is there a way to start the mavlink stream as soon the system is powered on?
-
@Jetson-Nano Yes, there is a way to do that. Probably best to consult the PX4 documentation or ask on the PX4 forum for best way to do that on a Cube Orange.
-
@Eric-Katzfey What about the previous question I asked?
-
@Jetson-Nano I really don't know what would cause that lag. You say it goes away if you wait awhile. How long do you have to wait for that to happen? And what is the baud rate of the UART that connects the CUBE Orange to VOXL 2? It's possible that the UART has too much data going over it and needs a higher baudrate.
-
@Eric-Katzfey The baudrate is 921600, sometimes I'll have to wait for more than 5 minutes and sometimes within seconds it will be ready to fly with required Hz
-
@Jetson-Nano Part of the startup sequence when running with QGC or MP is to upload a full set of parameters. There are hundreds of parameters and this can take quite a while to complete. While this is happening the serial link is inundated with PARAM_VALUE mavlink messages. Once that has been completed then the link will have much less traffic. While it is laggy you can look at the mavlink console and see if it is receiving those PARAM_VALUE messages. That is a possible reason.