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

ros Header: increasing "seq" in service calls?

asked 2012-07-15 22:41:38 -0500

mavin2k gravatar image

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

edit retag flag offensive close merge delete

Comments

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...

mavin2k gravatar image mavin2k  ( 2012-07-16 03:57:28 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-07-16 04:20:19 -0500

joq gravatar image

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.

edit flag offensive delete link more

Comments

The seq field has been deprecated. It cannot be depended upon to increment depending on the implementation.

tfoote gravatar image tfoote  ( 2012-09-06 19:55:39 -0500 )edit
1

answered 2012-07-16 01:24:13 -0500

dornhege gravatar image

From my perspective this would be the correct behavior.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-07-15 22:41:38 -0500

Seen: 1,332 times

Last updated: Jul 16 '12