Controlling DC motors with a PCA9685 servo board and TB6612 DC motor driver using ROS

Controlling DC motors with a PCA9685 servo board and TB6612 DC motor driver using ROS

Greetings all. A few months ago I posted about programming a robot car kit with ROS in order to gain practical experience with robotics, and to put on a robotics resume. I downloaded ROS Noetic onto the Pi, as well as a package for controlling the PCA9685 servo board which the servos connect to. I was able to directly control the servo motors controlling the camera movement and steering servos by publishing to the ROS topic /servos_absolute. However, the two DC motors that make the robot car move are connected to a TB6612 motor driver which is connected to the PCA9685. Publishing to the topic for this didn’t work. Does anyone know how I can control the DC motors using ROS?

Here are links to the tutorials I was using, the package for controlling the PCA9685, and a diagram of the robot car’s wiring.https://varhowto.com/install-ros-noetic-raspberry-pi-4/https://gitlab.com/bradanlane/ros-i2cpwmboardhttps://www.youtube.com/watch?v=iLiI_IRedhI&t=474s

https://preview.redd.it/pmf5ljfrc4h61.jpg?width=3000&format=pjpg&auto=webp&s=41b5b38a0a6a68af24d58370a009e065e45848e4

submitted by /u/BKHalpin
[link] [comments]