How to use UAVCAN in PX4

Hello, I want to write an application in my PX4. But I find few reference on the Internet. I tried to write my application in PX4/src/examples, like the official guide(https://docs.px4.io/master/en/modules/hello_sky.html) To check if I can use the UAVCAN or CAN in my PX4. But it occurs wrong when use the uavcan_tx or can_tx function directly.

Is there some demo or code-level reference? Thanks.

Perhaps you better ask this question on the PX4 forum instead: