-
Notifications
You must be signed in to change notification settings - Fork 5
msg: header
Salvo Virga edited this page Aug 28, 2018
·
5 revisions
A Header usually represents meta-information of another type of message. Adding a Header to another type MSG, makes what is called a MSGStamped. That is a version of MSG that also has a header. 💡
This is the same concept extensively used in ROS.
A simple_msgs::Header
contains:
- a sequence_number (int): typically used to describe the sequence of messages sent or received.
- a frame_id (string): this is usually the name of the reference frame this message refers to (e.g. a Pose is linked to a certain reference frame).
- a timestamp (long long): defines when the message is generated (usually time from epoch).
You can directly build a header passing the three items:
simple_msgs::Header my_header{0, "root", 1000.0};
or use the setters/getters of its members.