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

rosserial_arduino Processing Messages

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

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

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 str_msg.data 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

Comments

Can you describe the issues your experiencing?

Dustin gravatar image Dustin  ( 2012-03-21 06:27:52 -0600 )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 -0600 )edit

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

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

1 Answer

Sort by ยป oldest newest most voted
0

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

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

Stats

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

Seen: 581 times

Last updated: Mar 21 '12