Ask Your Question
0

rosserial_arduino: Serial port read failure

asked 2015-05-29 11:19:41 -0600

updated 2015-06-02 12:57:56 -0600

I am using Arduino Mega with maxbotix (three in number) sensors. I get the following error: Serial Port read returned short (expected 37 bytes, received 9 instead). [WARN] [WallTime: 1432915999.770362] Serial Port read failure

  1. I don't think it is an issue of what sensors type I am using.
  2. I compiled rosserial from source and also tried using the binary but the error remains.
  3. I also changed the serial_node.py (though advised against changing the source) but did not help.
  4. I added the line #include<wire.h> (someone suggested) but no positive results
  5. I have tried changing the baud rate and currently I am using 9600 but does not help.

Does anyone know what the issue is? Also, why despite the warning am I still able to get the data from ROS publisher?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2015-06-02 12:27:23 -0600

updated 2015-06-02 12:56:57 -0600

I also tried running the ultrasound example code in ros_lib. I still get the error. I am running my code at 57600 and 9600, it runs at both the baud rate. I am totally confused now, Can someone help?

edit flag offensive delete link more

Comments

difficult to say without any code to look at. You are using different sensors from the one in the example - do they operate in the same way with the same commands ?

nickw gravatar imagenickw ( 2015-06-02 13:38:23 -0600 )edit

Yes they operate exactly in the same way. The example is also written for maxbotix sensors.

I changed the timeout from 5 to 10 in serialclient.py, it has reduced the frequency of error by quite a lot.

jaghvi gravatar imagejaghvi ( 2015-06-02 14:55:18 -0600 )edit

I also changed the published bytes in node_handle.h to 1024 but that also did not help. I am running out of solutions now

jaghvi gravatar imagejaghvi ( 2015-06-03 13:57:25 -0600 )edit

Did you land up finding a solution to this?

miguel gravatar imagemiguel ( 2015-07-26 05:32:24 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-05-29 11:19:41 -0600

Seen: 547 times

Last updated: Jun 02 '15