Getting how old a TF is in a python script

Hello,
I am using the find_object_2d package to detect an object in which I am required to get the pose estimation of. assuming the object is a cube and I have saved images with key points taken from each side, meaning each side is its own object and produces its own TF as provided by the package, I need to use these to get the TF of the centre of the cube. I am trying to write a code in which gets the latest side recognised by the sensors TF and make this a parent frame for the TF in the centre. The reason for this is that the TFs don’t move of a detected object even if it’s no longer being detected in this package
If anyone could tell me how I could do this or how I can get the time for when a TF was last updated as a value that would be amazing !

Hi,

I’ve yu already checked the RobotIgniteCourse on perception? You might have the solution there in the chapter of Surface and Object recognition. There you ar edoing just that, as far as I understood your question. There is also another course of ** Deep Learning with Domain Randomization**, where you learn how to getthe position of an object by DeepLearning training f rasping it later. That could help you also.

I looked back at the course and it says something about “decreasing the time you consider a TF obsolete” but does not say how to do this, how would I be able to do this as it would help me a lot

One way would be to get the TF timestamp and check it with the current time.