ros_comm icon indicating copy to clipboard operation
ros_comm copied to clipboard

rostopic pub -f does not substitute times or headers

Open pierrefranklin opened this issue 3 years ago • 1 comments

rostopic pub time and header substitution does not work with yaml file messages. For example:

rostopic pub -s -r 10 /test sensor_msgs/Temperature -f msg.yaml

with msg.yaml as

header:
  seq: 0
  stamp: now
  frame_id: ''
temperature: 0.0
variance: 0.0

results in a fixed timestamp.

In comparision,

rostopic pub -s -r 10 /test sensor_msgs/Temperature "header:
  seq: 0
  stamp: now
  frame_id: ''
temperature: 0.0
variance: 0.0"

updates the timestamp correctly.

Tested on Ubuntu 18.04, ros melodic.

pierrefranklin avatar Dec 10 '22 19:12 pierrefranklin

Confirmed on noetic and with "auto" as well. It seems to be duplicate of https://github.com/ros/ros_comm/issues/2062 and appears to be a known issue with a fix https://github.com/ros/ros_comm/pull/2063 but the author did not yet re-target to noetic, so the fix is not merged. Kindly ping to @pavloblindnology

guihomework avatar Jan 03 '23 18:01 guihomework