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

Messages lost between rospy and roscpp

asked 2012-05-19 04:16:53 -0600

K Chen gravatar image

I encountered a strange problem of losing some messages between roscpp node and rospy node. I can see my roscpp node publishing my defined message using rostopic echo, but the rospy node sometimes cannot receive them(sometimes it can). I tried to reproduce the problem but just end up with nothing.

The only clue I can get is when this happen, I use rxgraph to see the ros node graph, and it prints:

"unknown node reported: unknown node /XXX"

/XXX is the name of my rospy node. The rospy node uses 3 threads and it calls rospy.spin() in the main thread.

I am using electric under ubuntu 11.10. There are more than 10 nodes running when this problem happen.

Thank you for any help or suggestions.

edit retag flag offensive close merge delete

Comments

1

Could you provide more details or a reproducible example? Otherwise it is extremely hard to comment on what might be going wrong.

piyushk gravatar image piyushk  ( 2012-05-19 12:15:44 -0600 )edit

Unfortunately I cannot, the only clue is provided above. So what does this warning mean? (unknown node reported: unknown node). I will try to reproduce the problem as far as I can.

K Chen gravatar image K Chen  ( 2012-05-19 15:26:04 -0600 )edit

Finally I find out that it was not message dropping, but a latency of messages(about ~2 seconds or more), and my rospy node mistakenly drops them out because I thought it was old data. Thanks for helping.

K Chen gravatar image K Chen  ( 2012-05-20 16:47:03 -0600 )edit

Please help me close the question.

K Chen gravatar image K Chen  ( 2012-05-20 16:48:13 -0600 )edit

Please post your solution (or explanation of the problem) as an answer. After about a week or so, you should be able to "accept" that answer and it will show this question as answered. You may also want to try this on Fuerte and 12.04 and see if the problem is still present.

Eric Perko gravatar image Eric Perko  ( 2012-05-21 02:01:14 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-05-22 01:39:26 -0600

K Chen gravatar image

Finally I find out that it was not message dropping, but a latency of messages(about ~2 seconds or more), and my rospy node mistakenly drops them out because I thought it was old data.

edit flag offensive delete link more

Comments

1

What size was your subscriber queue and how long does your callback take?

Eric Perko gravatar image Eric Perko  ( 2012-05-22 06:46:51 -0600 )edit

I am using "message_filters::sync_policies::ApproximateTime" to sync kinect and 1394 camera data, the queue size of both I set are 5, and the Synchronizer's queue size is 3(because I want it to drop old images). The callback won't take time because it only pushes them into my own process queue

K Chen gravatar image K Chen  ( 2012-05-22 21:57:02 -0600 )edit

Question Tools

Stats

Asked: 2012-05-19 04:16:53 -0600

Seen: 738 times

Last updated: May 22 '12