What is the current recommended CAN implementation to develop robotics applications that include 10+ VESC ESCs?
The default VESC CAN implementation is defined in the “comm_can.c” and includes quite a few functions (comm_can_init, comm_can_set_baud, comm_can_transmit_eid, comm_can_transmit_sid, comm_can_set_sid_rx_callback, comm_can_send_buffer, comm_can_set_duty, comm_can_set_current, comm_can_set_current_brake, comm_can_set_rpm, comm_can_set_pos, comm_can_set_current_rel, comm_can_set_current_brake_rel, comm_can_ping, comm_can_detect_apply_all_foc, comm_can_conf_current_limits, comm_can_conf_current_limits_in, comm_can_conf_foc_erpms, comm_can_detect_all_foc_res, comm_can_detect_all_foc_res_size, comm_can_detect_all_foc_res_clear)
New to the firmware this year is UAVCAN (libcanard) and it has 2 commands implemented RPMCommand (calls mc_interface_set_pid_speed) and RawCommand (calls mc_interface_set_duty).
It looks like out of the box the standard implementation of the UAVCAN does not include position control. It only includes RPMCommand, RawCommand and Status.
https://github.com/UAVCAN/public_regulated_data_types/tree/master/uavcan/equipment/esc
UAVCAN is also a new standard in itself.
How mature and tested is the UAVCAN protocol for communication with VESC ESCs?
Any suggestions and comments would be appreciated.
Bump for visibility. Same question. There is a new UAVCAN Arduino library which looks interesting...
https://github.com/107-systems/107-Arduino-UAVCAN/
Is there any example code for using VESC with UAVCAN?
Hi Hugo,
We are currently running our drones with PX4 + UAVCAN + VESC. No code changes needed, though there were some issues in setting it up.
Autonomous Control Lead
Skypull SA
@Ricardo, are you running them using RPM control or Duty control? how do you tell the VESC which type of control you want?
@Ricardo, I'm also trying to use PX4 + UAVCAN + VESC 6.6 Duo but for some reason I continue to get commands from the PX4 after disabling/disarming the motors. Nothing that wold spin the motor but continue to draw current. Did you have this problem or know how to eliminate it?
Thanks, Ben
Hello Ricardo,
Can you tell me how did you connect your flight controller to VESC? CAN port? PPM?
Also, what were the main settings to be applied besides enabling the uavcan?
Thank you.