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

Definition of message field type frame_id std_msgs/Header?

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

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

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

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


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 image kunaltyagi  ( 2018-06-11 03:55:03 -0500 )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 image gvdhoorn  ( 2018-06-11 14:41:49 -0500 )edit

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

thinwybk gravatar image thinwybk  ( 2018-06-11 15:34:41 -0500 )edit

Question Tools



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

Seen: 1,402 times

Last updated: Jun 08 '18