Ask Your Question

Stamped std_msgs

asked 2011-04-12 10:01:35 -0500

Enrique gravatar image

I wonder if there is a simple way to have std_msgs messages with a std_msgs::Header. For example, suppose you want to have an Stamped version of a std_msgs::Float64MultiArray.

Or, on the contrary, do I have to create such Stamped version by defining a new message type (e.g. StampedFloat64MultiArray), as explained here?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-04-12 11:35:31 -0500

kwc gravatar image

updated 2011-04-12 13:27:14 -0500

tfoote gravatar image

You have to create a new message type.

We don't plan to offer our own "Stamped" versions of the std_msgs as Header itself is a bit too tied to a particular implementation of coordinate frames (it's only in std_msgs for historical reasons).

The contents of std_msgs are designed to be building blocks not standalone messages. A well designed ROS message will stand alone and can be processed regardless of where it came from. The topic can add semantic meaning but should not be necessary for interpreting the data. For example the sensor_msgs/LaserScan contains all the information required to process it as a laser scan regardless of the topic. Whereas a message of StampedFloat cannot be interpreted w/o knowing the context of what the message is representing.

edit flag offensive delete link more



Any improvement planned on this in the future?

It is a problem if you want to plot data from another machine and the machine is not time synchronized. (and you compare it with something which has time stamps)

AReimann gravatar imageAReimann ( 2016-03-23 20:35:18 -0500 )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


Asked: 2011-04-12 10:01:35 -0500

Seen: 3,030 times

Last updated: Apr 12 '11