ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Arduino + Dual H Bridge Motor Driver

asked 2013-12-29 03:38:51 -0600

updated 2014-01-28 17:18:54 -0600

ngrennan gravatar image

HI all, I have an Arduino UNO and a dual H bridge MOSFET motor driver. I want to control two motors using this controller and Arduino via ROS(Fuerte/Groovy/Hydro). I can write a sketch to arduino just for run motors (digitalwrite & analogWrite). But I want to know how to communicate Arduino & ROS. Can I use ROSARIA instead of rosserial_arduino? If yes, please give me a clue to write an Arduino sketch.

Motor Driver from ebay, (3-36V-10A-Peak-30A-Dual-Motor-Driver-Module-board-H-bridge-DC-MOSFET-IRF3205)

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2013-12-29 04:35:26 -0600

ReedHedges gravatar image

ROSARIA is specific to Pioneer and other robots from MobileRobots/ActivMedia and the communications protocol is in many ways Pioneer-specific. If you want to use a similar design (robot controller on Arduino communicating with ROS nodes on a PC) it might be easier to use your own, smaller protocol.

Other people who know more about Arduino can give some advice about that, but if you search this site you may find people doing similar projects, or you may find existing code on wiki.ros.org that could serve as an example.

edit flag offensive delete link more
1

answered 2013-12-29 17:02:24 -0600

noonv gravatar image

for example - my ORCP protocol for 4WD robot

edit flag offensive delete link more
0

answered 2013-12-29 09:43:22 -0600

richkappler gravatar image

updated 2013-12-29 09:44:17 -0600

Not sure if this will help you, I'm running pretty much the same setup, using a pair of motors with an Adafruit dual H-bridge motor controller. While I have not yet built that part of the code, I have been able to get a sonar to talk to my Arduino Mega (duh, that's the easy part) and then was able to get the Arduino to publish the sensor data to a ROS topic. I have gone through the tutorials here and had no trouble writing a functioning publisher and subscriber. Based on that, I'm planning on just running the Arduino as a node that will receive motor commands from ROS, and send sensor and odometry data to ROS. Pretty straight forward in theory, the execution at the ROS level has been a little tricky thus far, but at the Arduino no problem at all as long as you are using the proper data types (otherwise the buffer gets filled and rosserial shuts down the connection)

edit flag offensive delete link more

Comments

hey, it's been more than 3 years but I am working on something like this. can you please check my question?

Rai gravatar image Rai  ( 2017-03-10 08:56:32 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2013-12-29 03:38:51 -0600

Seen: 1,899 times

Last updated: Dec 29 '13