ROS tool box's cantransform() and gettransform() still trigger on a stale tf.
조회 수: 1 (최근 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.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!