Robotics StackExchange | Archived questions

rosserial_arduino: Serial port read failure

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 (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?

Asked by jaghvi on 2015-05-29 11:19:41 UTC

Comments

Answers

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?

Asked by jaghvi on 2015-06-02 12:27:23 UTC

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 ?

Asked by nickw on 2015-06-02 13:38:23 UTC

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.

Asked by jaghvi on 2015-06-02 14:55:18 UTC

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

Asked by jaghvi on 2015-06-03 13:57:25 UTC

Did you land up finding a solution to this?

Asked by miguel on 2015-07-26 05:32:24 UTC