Any motor can be "compatible" with ROS2. You just may need to make some interface (hardware and/or software) between that motor and ROS2. That being said, I think your question is really 1) How do I interface my motor hardware to my computer running ros2? and 2) How do I control that motor from ros2?
I'm no expert on what packages exist for this, I can only speak to my own experience with my own projects. Depending on what kind of onboard computer you have will change how you'd want to make that interface:
How to Connect Motor Hardware to Ros2 Computer
If your on-board computer has GPIO pins that can produce a PWM (or other) signal to control your servos, then you can just wire your motor driver directly to your on-board computer.
If your on-board computer doesn't have GPIO pins then you can use a micro-controller to interface the hardware and software. I've used arduinos, teensys, flight controllers, etc before with good success here.
How to Control Motor From Ros2
This part kinda depends on what you're needing to do with the motor. If have a motor position sensor like an encoder, or potentiometer, then you may want to work with the ros2_control stack. With ros2_control, you need to provide some urdf and other configuration files, and (most likely) a hardware interface plugin. This hardware interface plugin is responsible for reading feedback from and writing commands to your motor via your GPIO pins, arduino, teensy, etc.
If you don't need the full ros2_control stack, you'll probably want to write some node to accept motor commands via a ros2 topic, service or action, and set the motor control signal accordingly. Again that'l either be via GPIO pins, arduino, teensy, etc
For example, I've been integrating the 3D printed Moveo robotic arm into the MoveIt2 stack. I ended up using a teensy 4.1 with micro-ros to control my motors, and the ros2 control stack with a custom hardware interface plugin to send the right joint positions to the teensy. Micro-ros is great because you can make the micro-controller itself a ros2 node able to publish, subscribe, etc to ros2 via the micro-ros agent.