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

rosserial_arduino Processing Messages

asked 2012-03-20 03:38:40 -0500

updated 2012-07-02 13:41:42 -0500

mjcarroll gravatar image

We are trying to set up a publisher/subscriber that will pull in data from a computer (publishing) that is sending drive commands (direction/speed) to the Arduino to control a UGV. We are also looking to have the Arduino send back information (battery_status, turn angle, speed, etc) and we are having issues with getting everything to work.

I know this is probably a really stupid question but is there a way that I can print out my to the Arduino serial monitor to make sure that I am actually getting that data and that I am not messing up on that 1st basic step?

edit retag flag offensive close merge delete


Can you describe the issues your experiencing?

Dustin gravatar image Dustin  ( 2012-03-21 06:27:52 -0500 )edit

I am having issues getting the information to "ping" back to the sending computer. I am trying to make sure that the arduino is indeed getting what I am sending. So I send the information in a String and i try to pull that data and then have the arduino broadcast it again to prove that it got it.

BadRobot gravatar image BadRobot  ( 2012-03-22 02:41:50 -0500 )edit

In that case did my answer about creating a debug publisher make sense?

Dustin gravatar image Dustin  ( 2012-03-22 07:19:29 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-03-21 06:27:20 -0500

Dustin gravatar image

It appears the rosserial_python node is looking for data coming over the serial line to be in a specific format. As such you could not send raw debug information on the same serial port. If your Arduino has more than one serial port, as with the Mega, then you could use Serial to send your debug data to the serial monitor and then use Serial1 to publish and subscribe.

Alternatively you could create a debug topic and republish to it any data received. From there you could execute the following command to see the data being published to that topic (assuming the topic is called 'debug'):

rostopic echo debug
edit flag offensive delete link more

Question Tools


Asked: 2012-03-20 03:38:40 -0500

Seen: 545 times

Last updated: Mar 21 '12