I would like to use UAVCAN to communicate with an ESC (a VESC actually).
However I can’t start the configuration of UAVCAN ESC in QGroundControl. In the Power tab when I click on “Start Assignement” either I get the message “vehicle not responding to UAVCAN configure command” or “UAVCAN configure command failed”.
I tried with a pixhawk 2.1 and a pixhawk 4.
What can I do to fix it and to setup UAVCAN ?
Any help would be greatly appreciated.
Thanks in advance !
I’m going to ping @PavelKirienko hoping that he can help you.
AFAIK VESC doesn’t support automated ESC index assignment.
First of all many thanks for the reply.
Do you know if there is a way to do it manually ? I tried the 3 options I have on QGC : “Sensors manual config”, “Sensors automatic config” “Sensors and actuators automatic config” and none of them work.
I work on a project (www.skypull.com) where we really need feedback from the controller to the pixhawk, and UAVCAN seems really promising.
Thanks in advance !
I am trying a similar thing. The functions inside esc_main.cpp files are not getting executed when I initiate “uavcan start” command through Mavlink console. Are you facing a similar issue?
Yes, I too changed the uavcan in QGC into three options like you mentioned but nothing helped.
Using Mavlink consol seems to work, the command “uavcan start” works. But then I don’t know what to do, how to establish a connection between the pixhawk and the vesc using Mavlink console ?
How do you know that the functions inside esc_main.cpp files are not getting executed ?
Yes, when I enter “uavcan start” I was not seeing outputs at first. But I then tried “uavcan stop” and “start” again, I could see values being sent from my pixhawk. I am not familiarized with vesc actually.
But in your case , did you create a new DSDL file to send value or so? How are trying to connect to vesc from pixhawk ?
Thanks and Regards
The VESC supports UAVCAN, the pixhawk supports it as well, so I thought it was just a matter of simple settings like baud rate or CAN ID… According to this page: https://dev.px4.io/en/uavcan/node_enumeration.html and this page http://ardupilot.org/copter/docs/common-uavcan-escs.html it seemed straightforward.
So no, I did not create a new DSDL file. Did you do it ? I’m new to CAN connections, I will try to understand UAVCAN more in detail because it is more complex than what I thought, I am currently reading https://uavcan.org/Specification .
In Mavlink consol I have a list of parameter for UAVCAN:
But then I don’t know what to do, everything I tried did not worked.
I set different UAVCAN index for the VESC using VESC tool. I assumed it is its UAVCAN ID but maybe it’s not ? In mavlink I get “ERROR [uavcan] invalid node id” when trying to use any command with VESC_ID.
Also, apparently I am not receiving any information via UAVCAN:
If you have any idea on this problem, or where I could get informations…
Many thanks in advance !
I am not sure how VESC communicate. I created a new CAN message(DSDL file) apart from the existing ones to send my data(say, integer). The broadcast(msg) function is doing the transmission of data from Pixhawk board I guess.
I placed few print statements in my functions and I could see they are running successfully but since I am not mapping data type ID correctly, I am facing issues during transmission. I found a research paper of sending and receiving data through UAVCAN from an author Pedro Bernado Andrade. That’s the only paper I can find.! Please take a look into it.
Hope it helps.
Thanks and Regards
@oliverSKP Forget about DSDL, you don’t need to touch it. VESC may not support the parameter API (I don’t know), but you shouldn’t care. Just configure the ESC index manually on each ESC, in this case you don’t need to be involved with the Mavlink-UAVCAN parameter bridge at all (last time I checked it had stability issues so it may be unusable).
You need the last one.
First of all thank you for your involvment and your help.
Just to clarify, does it mean that the VESC and the pixhawk share the same UAVCAN commands ? Therefore no change in the fw of both pixhawk and vesc are needed ?
Ok I had exactly the same problem and it was just because you could have to set the same BITRATE, for my VESC, it was 500k by default so I moved to the same default value of pixhawk : 1M.
I solved every-thing!
Also you have to order the UAVCAN index from 0 to 3 instead of 1-4.
how did you check the bitrate of your Pixhawk?
I found the parameter
UAVCAN_BITRATE but not the one regarding the Pixhawk.
Hi @desmond13 I’ve carried over the work of @Christoph_Weilenmann and @oliverSKP
The UAVCAN_BITRATE that you mention is the uavcan bitrate of the Pixhawk. What he is saying there is that he checked the bitrate on the ESCs that he was using, and changed the pixhawk one to match it. You could change either one but we’ve had some issues with 1M and have instead changed to 500k
Let me know if that helps
thanks for your reply @RicardoM17. How did he check the bitrate on the ESCs? Are you using the UAVCAN GUI?
Hello @desmond13 . No for VESC you should use the VESC Tool.
You will find more info here in this page I recently updated. Let me know if the info is not clear or sufficient.
@JulianOes this thread can be closed in the meantime. We’ve managed to solve these issues quite a while ago. I assume however that closing or marking as solved won’t hide this thread as it can still be very useful for other people with similar issues.