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

rosserial issu

asked 2016-07-19 09:38:15 -0600

ghaith gravatar image

updated 2016-07-23 16:06:47 -0600

hi i am trying to build map and every thing work more than great but after about 2 min when i launch my full launch and start building map this error occur i hope any one can help me:

Traceback (most recent call last):
  File "/home/owner/catkin_ws/src/rosserial/rosserial_python/nodes/serial_node.py", line 82, in <module>
    client.run()
  File "/home/owner/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 492, in run
    self.requestTopics()
  File "/home/owner/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 389, in requestTopics
    self.port.flushInput()
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 500, in flushInput
    termios.tcflush(self.fd, TERMIOS.TCIFLUSH)
termios.error: (5, 'Input/output error')
[arduino_serial_node-28] process has died [pid 15529, exit code 1, cmd /home/owner/catkin_ws/src/rosserial/rosserial_python/nodes/serial_node.py __name:=arduino_serial_node __log:=/home/owner/.ros/log/568d6e0e-4db5-11e6-b8da-08edb9727491/arduino_serial_node-28.log].
log file: /home/owner/.ros/log/568d6e0e-4db5-11e6-b8da-08edb9727491/arduino_serial_node-28*.log

and some time i got this:

[WARN] [WallTime: 1468937973.677735] Serial Port read returned short (expected 313 bytes, received 296 instead).
[WARN] [WallTime: 1468937973.678236] Serial Port read failure:

i hope any one can help . i tried to increase buffer size for publisher 1024 and for subscriber 512 10publisher and 10 subscriber i reduce the bud rate into 57200. publish imu data and encoder , subscribe to cmd motor.

update 1: sorry i forget to say the type of my Arduino it's mega 2650. and when i compile the file it's just use like 11% from the ram. i hope any one can help with this issue.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-07-22 13:54:50 -0600

Mark Rose gravatar image

What kind of Arduino board are you using? I stopping using rosserial because its relatively high RAM usage caused instability on a Leonardo-compatible board. For various reasons, it's difficult to reduce the memory usage significantly, so a Mega (or Teensy 3.x, especially) might be a more realistic platform. I didn't have any connectivity issues at 57600 baud, but had some stack/heap/static collision problems, depending on how the Arduino code was written. How many bytes of RAM are shown as free when you compile the code?

Also, check that your message types exactly match between the ros::Publisher definition and the call to publish(). The way the template methods are defined in rosserial does not cause the compiler to make sure they match. This code compiles, for example, but generates an error like the one you are seeing:

ros::Int16 int16msg;
ros::Int32 int32msg;
ros::Publisher myPub("~topic", &int16Msg);
...
myPub.publish(&int32Msg);

I've switched to using ros_arduino_bridge because of the memory issues (since I don't have the option of moving to an Arduino board with more RAM).

edit flag offensive delete link more

Comments

hi thanks for your answer. and i update the information.

ghaith gravatar image ghaith  ( 2016-07-23 16:07:33 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-07-19 09:38:15 -0600

Seen: 531 times

Last updated: Jul 23 '16