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

How to pass data to a node from an arduino board using rosserial?

asked 2014-08-15 18:07:40 -0600

Bhargav gravatar image

updated 2014-08-19 20:07:01 -0600

ahendrix gravatar image

Hi I am very new to ROS. I was going through this tutorial:

Here i wanted to pass my vx, vy and th values from a arduino board using rosserial. Is it possible to do so? How to do it? The rosserial node publishes string msg, so i want to use it in this odometry publishing node.


I have found a way to do this but have little problem with it. Posted a question relating it on this link. []

It would be great if you can help me with it.

edit retag flag offensive close merge delete


ahendrix gravatar image ahendrix  ( 2014-08-15 19:39:30 -0600 )edit

Similarly, you can take a look at ros_arduino.

tonybaltovski gravatar image tonybaltovski  ( 2014-08-19 20:33:40 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-08-19 16:50:41 -0600

Andromeda gravatar image

updated 2014-08-19 16:51:36 -0600

Bhargav, I wrote some weeks ago a small server/client program with Arduino. It is not more complicated than a pub/sub application. I used the example in this link: I found it very useful and I could run a server on Arduino and a clinet in the PC and viceversa. I used it as servo controller. From the PC I could send the exact value to drive the servos. I m not at home now, but if you want I can send you tomorrow evening my code as example. Regards

edit flag offensive delete link more



hi, would you mind sending me the example? I am doing something very similar, but have been struggling with it for a few days now.

mugenzebra gravatar image mugenzebra  ( 2014-08-26 16:30:12 -0600 )edit

yes of course, it is really simple but it works. How can I contact you? Your email is not visible to me.

Andromeda gravatar image Andromeda  ( 2014-08-27 11:56:54 -0600 )edit

@ Andromeda: I'm just learning to control a rc car via ros and arduino, so your code would be great help. How can I contact you ( pm ? ) ... thanks very much ...

scriptwriter gravatar image scriptwriter  ( 2016-07-01 08:33:25 -0600 )edit

I have the code no more

Andromeda gravatar image Andromeda  ( 2016-08-02 00:44:19 -0600 )edit

answered 2014-08-19 15:00:23 -0600

Bhargav gravatar image

I solved this problem by referring to the publisher subscriber tutorial. Used rosserial to publish a node from arduino and a used a subscriber node to listen to these parameters. You can have a look at this answer []

edit flag offensive delete link more


In ROS parlance, parameters refer to the values you use to configure a node externally, usually during startup. You might want to edit the title or delete this question altogether to prevent confusion.

paulbovbel gravatar image paulbovbel  ( 2014-08-19 15:35:41 -0600 )edit

I've updated the question appropriately

ahendrix gravatar image ahendrix  ( 2014-08-19 20:07:22 -0600 )edit

Question Tools

1 follower


Asked: 2014-08-15 18:07:40 -0600

Seen: 2,410 times

Last updated: Aug 19 '14