[ros-users] dynamic_reconfigure in cturtle stuck

Tomas Vanderka tomas_vanderka at tempest.sk
Tue Jan 18 19:19:57 UTC 2011


Ken Conley wrote:
> On Mon, Jan 17, 2011 at 5:28 PM, Tomas Vanderka
> <tomas_vanderka at tempest.sk> wrote:
>   
>> 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.
>>     
>
> What's the reproducible steps for this? I ran the talker.py and
> restarted the listener.py and it always printed both subscribers.  I'm
> on Python 2.6, so that trends towards this being a Python 2.7 issue
> (or something else on your setup), but I want to make sure that I
> understand the intent of the test.
>   
Yes that's exactly what I was doing. When I restart the listener.py it 
randomly displays both, one or none of the talker topics. And it never 
happens if I put that sleep between subscribtions in listener.py.

-- 
Tomas Vanderka
TEMPEST a.s.
Galvaniho 17/B, 821 09 BRATISLAVA
Phone: +421 905 571 691




More information about the ros-users mailing list