Ask Your Question
0

Definition of message field type frame_id std_msgs/Header?

asked 2018-06-08 12:44:03 -0600

thinwybk gravatar image

What values are possible for the message field frame_id in std_msgs/Header messages? From the message type definition it is not clear to me if it is allowed to be "0" and "1" or "no frame" and "global frame".

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2018-06-08 15:13:30 -0600

gvdhoorn gravatar image

Any string value is actually valid.

The comments on the field in the msg defs are wrong / confusing: I believe that 0 and 1 were valid values way-back-when, but very quickly it was realised that they actually don't make much sense (what does "the global frame" actually mean? etc).

These days valid values are strings, and those strings are supposed to be TF frame names (but that is not enforced anywhere (I'm also not sure how that would have to be done)).

edit flag offensive delete link more

Comments

I think rviz maps the messages based on frame_id matching the tf frame name. This is sort of enforcement if you want to use rqt

kunaltyagi gravatar imagekunaltyagi ( 2018-06-11 03:55:03 -0600 )edit

That would not be just RViz, but the general purpose of the frame_id.

But that is at best implicit, and not enforced anywhere (ie: invalid values are not rejected, they'll just result in problems in consuming nodes).

gvdhoorn gravatar imagegvdhoorn ( 2018-06-11 14:41:49 -0600 )edit

I do not care about rviz here. The answer given is exactly what I was looking for. Thx.

thinwybk gravatar imagethinwybk ( 2018-06-11 15:34:41 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-06-08 12:44:03 -0600

Seen: 302 times

Last updated: Jun 08 '18