[ros-users] Another question about policy based synchronizer

Aditya Gadre agadre at vt.edu
Mon Oct 18 17:03:35 UTC 2010


Hi Ken,

Thank you very much for your email. That explains the discrepancy. 
However, when I comment out the code that increments the sequence 
number, it stays 0. Does this mean the the sequence number is actually 
only usable on the subscriber side where it gets set to appropriate value?

Thanks,
- Aditya

On 10/18/2010 12:57 PM, Ken Conley wrote:
> Hi Aditya,
>
> The sequence number is not a user-settable field. We hope to make it
> user-settable in the future, but in our previous attempt to do so, the
> feedback from ros-users was not to.
>
> HTH,
> Ken
>
> On Mon, Oct 18, 2010 at 9:28 AM, Aditya Gadre<agadre at vt.edu>  wrote:
>    
>> I have a working test code for policy based (approximate time) synchronizer
>> in which one node publishes two data messages and the other node runs a
>> synchronizer. One message is published at 1Hz and the other at 0.5Hz. For
>> each message, I increment the relevant sequence number in the header.
>> However, when these messages are received by the node running the policy
>> based synchronizer, the sequence numbers are off by 1, although the time
>> stamps match perfectly.
>>
>> For example, following output shows a simple run -
>>
>> Publisher log:
>> [ INFO] [1287418571.114515026]: Starting test_policy_synchronizer_publisher
>> node.
>> [ INFO] [1287418571.122496486]: Publishing AHRS data: time =
>> 1287418571.122447, seq = 1
>> [ INFO] [1287418572.122643642]: Publishing AHRS data: time =
>> 1287418572.122516, seq = 2
>> [ INFO] [1287418572.122956042]: Publishing Alasca data: time =
>> 1287418572.122883, seq = 1
>> [ INFO] [1287418573.122685477]: Publishing AHRS data: time =
>> 1287418573.122559, seq = 3
>> [ INFO] [1287418574.122935718]: Publishing AHRS data: time =
>> 1287418574.122809, seq = 4
>> [ INFO] [1287418574.123219204]: Publishing Alasca data: time =
>> 1287418574.123158, seq = 2
>> [ INFO] [1287418581.122753362]: Shutting down
>> test_policy_synchronizer_publisher node.
>>
>> Synchronizer node log:
>> [ INFO] [1287418573.123472169]: ----------
>> [ INFO] [1287418573.123744969]: Received message set
>> [ INFO] [1287418573.123947997]: AHRS: timestamp = 1287418572.122516, seq = 1
>> [ INFO] [1287418573.124106258]: Alasca: timestamp = 1287418572.122883, seq =
>> 0
>> [ INFO] [1287418575.122839197]: ----------
>> [ INFO] [1287418575.122900518]: Received message set
>> [ INFO] [1287418575.122951782]: AHRS: timestamp = 1287418574.122809, seq = 3
>> [ INFO] [1287418575.123003883]: Alasca: timestamp = 1287418574.123158, seq =
>> 1
>>
>> Comparing time stamps of sent and received messages, I see that the sequence
>> numbers in the synchronizer node are off by 1 (if sent message seq = 3 then
>> received message seq = 2). I am not sure why this discrepancy is popping up.
>> I would appreciate any help in this regard! I have attached source code for
>> both nodes.
>>
>> Thank you.
>> - Aditya
>>
>> _______________________________________________
>> ros-users mailing list
>> ros-users at code.ros.org
>> https://code.ros.org/mailman/listinfo/ros-users
>>
>>
>>      
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>    



More information about the ros-users mailing list