ROS tool box's cantransform() and gettransform() still trigger on a stale tf.
4 ビュー (過去 30 日間)
古いコメントを表示
I am using Apriltag_ros, and this publishes a tf transform between the camera and the Apriltag. I have collected a number of datasets to use to do landmark slam, and i wish to use this tf transforms to get the relitive location of the apriltags. To extract this camera -> tag transform i use canTransfom() to see if the transfom is avalible and then gettransform() to extract the relitive location.
This works well until the apriltags are no longer detected and the camera -> tag tf stops being published and goes stale. However cantransform remains true, and getransform() seems to just extract the last published transform.
Is there anyway to prevent this? Thanks a lot for any help you can provide me with.
0 件のコメント
回答 (1 件)
Josh Chen
2023 年 12 月 13 日
Hi Mattew,
It sounds like this might be related to the 'BufferTime'. By default, the buffer time for buffering transformations is 10. Can you try specifying the buffer time to a smaller value and see if it helps?
Thanks,
Josh
4 件のコメント
Josh Chen
2023 年 12 月 18 日
I just tried this on my side as well, looks like rosbagreader also doesn't give the option to set the buffer range.
Well, I guess one thing you can try to replace 'canTransform' is to write a function to read all '/tf' messages from the bag file, based on difference between odomObjs{i}.Header.Stamp the msg.Transforms.Header.Stamp information, return boolean to indicate whether such transform is valid.
参考
カテゴリ
Help Center および File Exchange で Network Connection and Exploration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!