Message filter headerless warning with custom message type
I generated my custom message as following:
uint32 num_object
nav_msgs/Odometry custom
This is a part of the output when echoing a topic using my custom message:
---
num_object: 1
custom:
header:
seq: 0
stamp:
secs: 1636331652
nsecs: 425379753
frame_id: "base_footprint"
child_frame_id: 'base_link'
pose:
pose:
position:
.......
Here, the only part I'm not updating is a seq value. I provide the stamps using rospy.Time.now()
I'm using ApproximateTimeSynchronizer to synchronize the custom message with another nav_msgs/Odometry message which has a header information:
pose_sub = message_filters.Subscriber('/something', Pose)
odom_sub = message_filters.Subscriber('/odom', Odometry)
ts = message_filters.ApproximateTimeSynchronizer([pose_sub, odom_sub], 5, 0.2)
ts.registerCallback(self._callback)
When I run the code, it shows a following warning:
[WARN] [1636331628.465729]: Cannot use message filters with non-stamped messages. Use the 'allow_headerless' constructor option to auto-assign ROS time to headerless messages.
I'm not sure what is causing this issue even if I provided most data in the header. Does seq value also matter when using the ApproximateTimeSynchronizer?