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:
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:
- 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…
- 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,