You are here

UAVCAN Versus Default VESC CAN Implementation

7 posts / 0 new
Last post
toma
Offline
Last seen: 6 months 3 weeks ago
Joined: 2019-06-09 21:19
Posts: 7
UAVCAN Versus Default VESC CAN Implementation

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.

KirkusMaximus
Offline
Last seen: 5 months 2 weeks ago
VESC Free
Joined: 2019-08-19 05:57
Posts: 11

Bump for visibility.  Same question.  There is a new UAVCAN Arduino library which looks interesting...

https://github.com/107-systems/107-Arduino-UAVCAN/

hugo-a-garcia
Offline
Last seen: 3 years 7 months ago
Joined: 2019-11-19 16:49
Posts: 1

 

Is there any example code for using VESC with UAVCAN?

RicardoMarques
Offline
Last seen: 3 years 11 months ago
Joined: 2020-01-21 16:28
Posts: 1

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

jmachuca77
Offline
Last seen: 3 years 3 months ago
Joined: 2020-09-03 21:24
Posts: 10

@Ricardo, are you running them using RPM control or Duty control? how do you tell the VESC which type of control you want?

bayetan
Offline
Last seen: 1 month 2 weeks ago
VESC Free
Joined: 2019-08-30 02:40
Posts: 14

@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

gjesusTec
Offline
Last seen: 2 years 4 months ago
Joined: 2021-11-29 18:27
Posts: 3

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.