How to modify ros_arduino_bridge to work with different motor controller?

asked 2019-02-15 21:17:07 -0600

geistmate gravatar image

updated 2019-02-15 21:17:46 -0600

Hi,

I am using ros_arduino_bridge to try to control a differential drive robot. I want to use this package on ROS Kinetic on Ubuntu 16.04.1. https://github.com/hbrobotics/ros_ard...

My programming is still introductory so I just need some help figuring out where I am supposed to modify the code in order use my own custom motor driver, the Sparkfun Mega Moto Shield. All that is noted there is to comment out the #USE_BASE but not much after that. I have been searching and found this other question that has somewhat helped. https://answers.ros.org/question/6083...

The answer to that question stated he created new functions in the encoder_driver.cpp and motor_driver.cpp: readEncoder(), resetEncoder(), resetEncoders(), initMotorController(), setMotorSpeed() and setMotorSpeeds().

Are these the only things that I would need to change in order to get this package working with my Arduino Mega + Monster Moto Shield?

I have a code for my Monster Moto Shield already that can read encoder counts, and another one that drives basic motor movements, all based on my own pin definitions with my Arduino Mega, but they look completely different from how the codes are written in the package given, so it is quite intimidating trying to figure out where to start.

If you have any advice or tips that could direct me to modifying this package, I would greatly appreciate it.

Best,

Matthew.

edit retag flag offensive close merge delete