did some further tests of the UAVCAN implementation in AC3.6-dev
I can’t say I’m pleased with what I see
config: AUAV-X2 and a pixracer, spektrum satellite connected, and an uc4h SLCAN adapter via uavcan, AC3.6-dev of today
procedure: power up flight controller, press safetey switch, disarm with transmitter stick, move transmitter stick, all on the bench
the findings have been essentially identical for both the AUAV-X2 and pixracer, so the below holds for both even though it’s shown just for one
finding 1:
settings essentially as default, except of course with CAN_P1_DRIVER = 1 to enable uavcan
during startup only StatusNodes are seen (= OK)
after pressing the saftey switch the equipment.actuator.ArrayCommand and equipment.esc.RawCommand appear, with a relatively low rate (= OK)
after disarming the rate of the Array and Esc commands increase
with no stick movement (e.g. Throttle near middle) it settles at ca. 400 f/s, which corresponds to ca. 50 Hz update rate (= looks OK)
however, when moving e.g. the throttle and yaw stick, the update rate goes wild, reaching high’s as large as above 2500 f/s in few cases, but almost always way above 400 f/s !!!
this does not look OK to me
(2000 f/s would be an update every 4 ms, and why should the rate fluctuate that wildly???)
comment: I have seen this not only today, but see this for while, so it should be “real” and easy to reproduce
finding 2:
since I was actually only interested in the equipment.actuator.ArrayCommand, I disabled the esc command by setting
CAN_D1_UC_ESC_BM = 0
but left
CAN_D1_UC_SRV_BM = 255
during startup only StatusNode are seen (= OK)
after pressing the saftey switch the equipment.actuator.ArrayCommand appears (=OK)
but it immediately appears at a rate of 2000 f/s (= 400 Hz) !!!
note the parameter SERVO_RATE = 50 (which according to the docs is 50 Hz)
summary:
there is obviously a serious issue with keeping the rate of emission, the fluctuations should not be as wild as they are IMHO, and there shouldn’t be such a cross correlation between actuator and esc
adding in the issues with the uavcan gps handling I can’t help than to conclude that the uavcan implementation is far from anything usable, I guess I find it inappropriate that there are a couple of PRs for adding new nodes even though not even the basics work.
It seems that with the uavcan-for-hobbyists project I jumped into the uavcan game months (years?) to soon. My mistake.
Cheers, Olli
btw, if any one doubts the uc4h SLCAN adapter, which is valid to do, I can produce experimental evidence that it easily handles a continuous stream of 1800 frames/s (that’s that fast that the UavcanGUI bogs down significantly)