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

ros_arduino_bridge with two arduinos

asked 2016-10-05 10:00:50 -0600

anonymous user



i want to use the ros_arduino_bridge package on a Wild Thumper plattform. I have the Dagu T'Rex as motor driver but the encoder function of it is useless for odometry. So i haveto use an Arduino Mega2560 for encoders and odometry.

Now to my question. Is it possible to use both arduino at the same time with the ros_arduino_bridge package ? Or can this package used only with one arduino?

Thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-10-05 11:46:46 -0600

Pi Robot gravatar image

It should be possible to use two Arduino's simultaneously by assigning each node a distinct name and config file in your launch file(s). I don't have my Arduinos in front of me to test, but something like this should work:

   <node name="arduino1" pkg="ros_arduino_python" type="" output="screen" clear_params="true">
      <rosparam file="$(find my_arduino_pkg)/config/arduino1_params.yaml" command="load" />

   <node name="arduino2" pkg="ros_arduino_python" type="" output="screen" clear_params="true">
      <rosparam file="$(find my_arduino_pkg)/config/arduino2_params.yaml" command="load" />

Of course, you need to change the paths to your config files. When subscribing to sensor data connected to arduino1, you would look under the namespace /arduino1/sensor and for arduino2, /arduino2/sensor.

edit flag offensive delete link more


Thanks sounds really great! Will try it tommorrow and give a feedback :)

Do i have to uncomment the encoder function, when i use the rosarduinobridge.ino for the motor controller and the other way around for the mega board to avoid problems (like disturbing each other)?

anonymous userAnonymous ( 2016-10-05 14:26:50 -0600 )edit

After further consideration, I don't believe it is currently possible to do what you want. The trouble is that there can only be one base_controller object that both reads encoder counts and sends motor commands...

Pi Robot gravatar image Pi Robot  ( 2016-10-06 09:17:07 -0600 )edit

Ok, then i have to look for an other option. Thank you very much for your help!

anonymous userAnonymous ( 2016-10-06 09:23:10 -0600 )edit

Question Tools

1 follower


Asked: 2016-10-05 10:00:50 -0600

Seen: 230 times

Last updated: Oct 05 '16