I think there's a good bit of bit-rot on ros-arduino-bridge in a few places and it's in need of a rewrite/refactoring.
I've tried to get it running recently with an ATMEGA2560 and VNH5019 motor controller.
I've been looking at it as a replacement for using rosserial on the Tenacity Rover. I've moved on from the L298N drivers I had initially to VNH5019 shield.
I was able to get it to command the motors, but couldn't get any readings off the encoders, even after changing the pin assignments in the #define statements, or replacing some of the AVR macros in the .h files, but so far no joy.
I've stared at and poked & prodded at the code for a good weekend or so at this point with no success.
Part of the "magic" seems to be that driving the motors, getting encoder counts and thereby driving the internal PID loop, all rests on chip-specific AVR macros used by the ATMEGA 328P.
Those macros address certain GPIOs and certain hardware interrupts specific to the 328P. They're different on the ATMEGA168, 328, 1280 and 2560.
The README and comments in the ros-arduino-bridge code imply that you can just change some pin definitions to get it to work with other boards, but I haven't found that to be the case.
My conclusion, for the time I've had to throw at this so far, is that ros-arduino-bridge is broken out-of-the-box for pretty much anything but the Arduino UNO or other 328P boards.
It's a neat piece of software and I'm sure has helped a lot of people build a lot of robots, but it's also 10 years old and hasn't been kept up.
For my purposes, I've gone back to rosserial, warts and all, because my project(s) need working, rolling robots.
I'm thinking seriously about writing my own bridge code, for say, the Teensy 4.1 , with its built-in Ethernet and running rosserial_tcp over that.
I've got one of these boards running the battery-monitor topics on Tenacity via rosserial_tcp and it's been pretty solid.
'dillo