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

Revision history [back]

click to hide/show revision 1
initial version

As far as I know, it is not possible to get the sequence number due to the design of how tf works. Since there can be multiple producers of tf info, data can arrive out of order and may not be synchronized. It is the consumer's responsibility to check for the required tf using the timestamp, hence the lookupTransform with associated time (ros::Time(0) for example to get the latest tf)

If it is absolutely necessary to have a sequence number, it is probably best to go back to the producer (in your case, whoever broadcasts /optitrak->/quad) and publish that transform with stamp. But I'm wondering about the necessity of this, since by your tf lookup, you know it is the latest tf, and can just be seq+1 by default.