VESC motor controller

Hello everybody,
First of all, it is my first message on this forum, and I tried to find answers before posting.

I am working on a skid steering rover like vehicle designed to clean nets in the fishing industry:
https://remorarobotics.no/
We use VESC motor controllers ( https://vesc-project.com/ ) and it is working fine: we can control the robot, it behaves as expected.
But we would like to get some informations back from this VESC motor controller: we could get electrical consumption informations as well as number of turns done. On one hand, the number of turns done should enable us to have a kind of wheel_encoder, thus improving the EKF output, leading to a better control of the robot. On the other hand, power consumption would allow us to implement safety fallbacks when the robot get stuck in the net for some reason.
Basically, the motor controller is sending those infos back through UART protocol. There is an open source data logger to log all these datas: GitHub - TechAUmNu/VESC-Logger: A logger for VESC firmware designed to run on an ATTiny1616, which allows saving data to an SD card..
So after this lengthy introduction, my questions are:

  1. How do I define a sensor which will be able to provide both “turn count” (as a wheel encoder would) and “power consumption” ? My first idea was to define a derived class AP_VESC from AP_ESC_Telem_Backend. But basically, I may need to have it also deriving from AP_WheelEncoder_Backend…
  2. Maybe the solution is to have two sensors (one wheel_encoder and one ESC_Telem) defined, with both listening to the same UART messages ?

Any advice, any insight would be very helpful,
Mat

VESC supports UAVCAN. It hasn’t been fully implemented in rover for skid steer but I implemented the changes outlined here AP_UAVCAN - Allow sending negative values over UAVCAN to the ESCs to … · ArduPilot/ardupilot@6c2d025 · GitHub

And it appears to be working for me thus far.

The issue is by default UAVCAN esc in Ardupilot doesn’t support reverse.

Issue:

Hey,
thanks for the answer and sorry for the very late response.
In fact I am trying to do comms in the opposite direction -from ESC to ArduPilot- to get what VESC motor controllers can offer as monitoring features.