VOXL ESC FPV 4-in-1 (M0138) Not being detected on FlightCore start
-
When using the later releases (v1.15.0) of px4 software with the voxl_esc library found on the official github (https://github.com/PX4/PX4-Autopilot), when the flight core initially boots, if the ESC is not yet ready (either booted after the flight core or hasn't completed booting by the time the flightcore was ready), the flight core will not detect the ESC and will not be able to drive the motors.
This issue presents itself even when the flight core is powered from the ESC.
It appears to be an ordering problem, if the ESC is powered initially, then power is applied to the flight core this all works correctly. In the ideal configuration, the ESC is providing power to the flight core so powerup order cannot be controlled.
With a mavlink shell, with the ESC/flight core in a not detected state, the voxl_esc task is not running. Manually starting the task with 'voxl_esc start' will then start the process at which point the ESC will be detected and become usable. Looking at the source code (this is still valid on the main and v1.15.0 branches at the time of writing), under src/drivers/actuators/voxl_esc in voxl_esc.cpp, in the VoxlEsc::Run() method we can see that the driver attempts to contact the ESC, if it fails up to num retries, it will then close the task. This doesn't appear to be correct behaviour.
I have implemented a fix on a local branch, but I am unsure of the implications as the firmware that is factory loaded onto the flightcore does not have this issue. Any insights/help would be appreciated! Thanks!
-
@Dracad , you are correct there is a bug, which we also recently caught and fixed.
The ESC takes 1 second to start up because during the initial 1 second, the ESC enters the bootloader mode and waits to see if there is an incoming firmware update. If no firmware update, the bootloader times out after 1s and executes the firmware. This behavior is the same for all ModalAI ESCs.
What happens with Flight Core, it boots much faster than VOXL, so the Flight Core (1 and 2) try to initialize the ESC before the ESC firmware is actually running.
The issue was not present in older PX4 releases because the esc driver was not querying the ESC at the start.
The solution is to delay the start of the
voxl-esc
module by 1.5 seconds, please see commits:https://github.com/modalai/px4-firmware/commit/55742d298bf9241a2af5aa2c7ba3a26788073356
https://github.com/modalai/px4-firmware/commit/1c11e2e0ac3fcc19cb45ab59292b3cf5f4fdb348Thanks for reporting the issue!
Alex
-
This post is deleted! -
Thanks for the reply! Good to know it was a known issue.
One thing, the links you sent point to modalai's fork of the px4 firmware, but alot of changes have been implemented in the mainline PX4 repository. I'd been building off the mainline repo, apologies if this has been answered before or is documented somewhere, is there a document that describes modal ai's release process so I can make sure im grabbing the latest iterations of code?