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

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

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

Bhargav gravatar image

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

ahendrix gravatar image

Hi I am very new to ROS. I was going through this tutorial: http://wiki.ros.org/navigation/Tutori...

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.

EDIT ::

I have found a way to do this but have little problem with it. Posted a question relating it on this link. [http://answers.ros.org/question/190424/problem-with-subscribing-a-custom-message-publishing-topic/]

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

edit retag flag offensive close merge delete

Comments

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

Similarly, you can take a look at ros_arduino.

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

2 Answers

Sort by ยป oldest newest most voted
0

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

Andromeda gravatar image

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

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: https://github.com/ros-drivers/rosser... 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

Comments

1

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 -0500 )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 -0500 )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 -0500 )edit

I have the code no more

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

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

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 [http://answers.ros.org/question/190424/problem-with-subscribing-to-a-custom-message-publishing-topic/]

edit flag offensive delete link more

Comments

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 -0500 )edit

I've updated the question appropriately

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

Question Tools

1 follower

Stats

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

Seen: 2,442 times

Last updated: Aug 19 '14