[ros-users] dynamic_reconfigure in cturtle stuck

Tomas Vanderka tomas_vanderka at tempest.sk
Tue Jan 18 01:28:27 UTC 2011


On 01/17/2011 08:36 PM, Blaise Gassend wrote:
>> I somehow got dynparam get ... to work once, but i'm not sure what i
>> did, next time i tried it, it got stuck as usual. I tried to run
>> gdb/strace on it and it looks deadlocked waiting on semaphore. I also
>> looked through logs and it seems dead just before subscribing to
>> /dynamic_reconfigure_test_server/parameter_updates. Maybe python2.7 in
>> fedora 14 has something to do with that? The client never gets
>> subscribed>  never gets parameter_updates msg>  waits forever. Any
>> suggestions how I can debug it further?
> Can you try with python 2.6?
>
> Do other python nodes work well?
>
> Have you inserted prints in the dynamic reconfigure client code to try
> to figure out where it is getting stuck?
My point is getting it working under fedora 14 so python-2.7 is a given.

I was playing around a bit with simple python pub/sub examples and it looks like it is some kind of a race condition between multiple succeeding subscriptions under same 
nodehandle/prefix like /a/chatter1, /a/chatter2. It is not limited to dynamic_reconfigure.

It happens with both cpp and python publishers but only with a python subscriber. c++ subscriber always works fine.

I modified src/dynamic_reconfigure/client.py like this
          self._updates_sub      = self._get_subscriber('parameter_updates',...
+        rospy.sleep(1)
          self._descriptions_sub = self._get_subscriber('parameter_descriptions',...

and now it works.

I tested it with talker/listener tutorials modified with attached patch, and it randomly works ok, only with one topic or not at all.

v.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.patch
Type: text/x-patch
Size: 2710 bytes
Desc: not available
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20110118/ef4b1188/attachment-0005.bin>


More information about the ros-users mailing list