Sending subsequent messages in rosjava leads to message loss [solved]
Hi!
I encountered some problems with the ROSJava listener. I have a very simple node in ROS that sends two subsequent messages through the same publisher/topic. When i'm looking at the topic through "rostopic echo" all messages are send in their order and none is lost. But the ROSJava Listener only gets the first message and occasionally the second. Some of the messages appear to be lost. When i'm putting manually some time in between the two publish attempts the listener starts receiving all messages in order and none is lost.
Heres a log example. Thats what i'm getting on the topic:
data: 1: Message_1
---
data: 1: Message_2
---
data: 2: Message_1
---
data: 2: Message_2
---
data: 3: Message_1
---
data: 3: Message_2
---
data: 4: Message_1
---
data: 4: Message_2
---
data: 5: Message_1
---
data: 5: Message_2
---
data: 6: Message_1
---
data: 6: Message_2
---
data: 7: Message_1
---
data: 7: Message_2
---
data: 8: Message_1
---
data: 8: Message_2
---
data: 9: Message_1
---
data: 9: Message_2
---
data: 10: Message_1
---
data: 10: Message_2
---
data: 11: Message_1
---
data: 11: Message_2
---
data: 12: Message_1
---
data: 12: Message_2
---
data: 13: Message_1
---
data: 13: Message_2
---
data: 14: Message_1
---
data: 14: Message_2
---
data: 15: Message_1
---
data: 15: Message_2
---
data: 16: Message_1
---
data: 16: Message_2
---
data: 17: Message_1
---
data: 17: Message_2
---
data: 18: Message_1
---
data: 18: Message_2
---
data: 19: Message_1
---
data: 19: Message_2
---
data: 20: Message_1
---
data: 20: Message_2
---
data: 21: Message_1
---
data: 21: Message_2
---
data: 22: Message_1
---
data: 22: Message_2
---
data: 23: Message_1
---
data: 23: Message_2
---
data: 24: Message_1
---
data: 24: Message_2
---
data: 25: Message_1
---
data: 25: Message_2
---
data: 26: Message_1
---
data: 26: Message_2
---
data: 27: Message_1
---
data: 27: Message_2
---
data: 28: Message_1
---
data: 28: Message_2
---
data: 29: Message_1
---
data: 29: Message_2
And heres what the listener gets:
INFO: I heard: "1: Message_2"
Aug 23, 2013 1:04:57 PM org.ros.internal.node.RosoutLogger info
INFO: I heard: "2: Message_2"
Aug 23, 2013 1:04:57 PM org.ros.internal.node.RosoutLogger info
INFO: I heard: "2: Message_2"
Aug 23, 2013 1:04:57 PM org.ros.internal.node.RosoutLogger info
INFO: I heard: "3: Message_2"
Aug 23, 2013 1:04:57 PM org.ros.internal.node.RosoutLogger info
INFO: I heard: "4: Message_1"
Aug 23, 2013 1:04:57 PM org.ros.internal.node.RosoutLogger info
INFO: I heard: "4: Message_2"
Aug 23, 2013 1:04:57 PM org.ros.internal.node.RosoutLogger info
INFO: I heard: "5: Message_2"
Aug 23, 2013 1:04:57 PM org.ros.internal.node.RosoutLogger info
INFO: I heard: "6: Message_2"
Aug 23, 2013 1:04:57 PM org.ros.internal.node.RosoutLogger info
INFO: I heard: "7: Message_2"
Aug 23, 2013 1:04:57 PM org.ros.internal.node.RosoutLogger info
INFO: I heard: "8: Message_2"
Aug 23, 2013 1:04:57 PM org.ros.internal.node.RosoutLogger info
INFO: I heard: "9: Message_2"
Aug 23, 2013 1:04:57 PM org.ros.internal.node.RosoutLogger info
INFO: I heard: "10: Message_2"
Aug 23, 2013 1:04:57 PM org.ros.internal.node ...