0
$\begingroup$

Rosanswers logo

Hi,

I have a srv that contains a msg, which contains a ROS Header. I have two static variables inside main: one with a message and one with a service (containing request/response and wrapped inside the request the message of the previous type).

When I publish several messages, the seq-field of the Header is increased.

When I execute a service call, the sequence number is not increased.

Bug, misunderstanding or bad luck?

using ROS Electric...

Greetings Marvin


Originally posted by mavin2k on ROS Answers with karma: 1 on 2012-07-15

Post score: 0


Original comments

Comment by mavin2k on 2012-07-16:
I'm surprised by this behaviour, because of the difference between "topic" and "service call" where both have the same magic "Header". What is this "Header" supposed to do? It should increment the "seq" field every time something goes over the wire -- or not, I don't care. But not sometimes...

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

I agree with @dornhege that this behavior is probably not correct.

But, I suspect the seq field may not be supported in some future transport implementation. So, I would not recommend depending on it.

Perhaps you can accomplish what you need via the header.stamp field.


Originally posted by joq with karma: 25443 on 2012-07-16

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by tfoote on 2012-09-06:
The seq field has been deprecated. It cannot be depended upon to increment depending on the implementation.

$\endgroup$
0
$\begingroup$

Rosanswers logo

From my perspective this would be the correct behavior.


Originally posted by dornhege with karma: 31395 on 2012-07-16

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.