Homepage GitHub

UAVCAN execution in px4


(Niranjan) #1

Hi,
I am working on integrating px4 with a freeRTOS system using UAVCAN. I have downloaded the latest firmware from git repository. I found an existing example of UAVCAN with esc. I have few questions regarding it.

  1. From uavcan_main.cpp , two functions in esc.cpp is getting called. First function being

*void UavcanEscController::update_outputs(float outputs, unsigned num_outputs) which is working fine.

The other function being

void UavcanEscController::esc_status_sub_cb(const uavcan::ReceivedDataStructureuavcan::equipment::esc::Status &msg) which is not getting executed at all. Am I missing any particular esc driver over here? if so, can someone please point me in the right direction.

Because when I built it, I build it with only uavcan driver and not with uavcanesc driver.

  1. Is the above scenario is related to build and debug configurations?? cause i am not facing any error while building but the settings are not clearly mentioned for this in the documentation.

  2. Is the above scenario happening cause of missing uavcan driver or esc driver cause I have written a similar function

void UavcanTeste::teste_receive_sub_cb(const

uavcan::ReceivedDataStructuruavcan::equipment::teste::TesteReceive &msg) which has a new CAN message. But this function is also not getting executed like the above one inside esc.cpp

  1. Is it becasue of the hardware dependency ? Cause I use qGroundControl and I have enabled “UAVCAN settings” and others as well. But When I initiate command
    "uavcan start" only update_outputs function from point 1 is getting executed ignoring esc_status_sub_cb from point 1.

Any pointers would be highly helpful. I tried all troubleshooting and looking into forums i could. But I am missing a file or a patch which I am not able to figure out.

Thank you

Thanks and Regards
Niranjan Ravi.