Integrating Odometry with TagSLAM for Continuous Position

70 views
Skip to first unread message

yusuke sakamaki

unread,
Oct 20, 2023, 1:32:21 AM10/20/23
to tagslam
Hello, Doctor Bernd

I'm working with TagSLAM and I want to input odometry information so that I can get pose estimates even when there are no tags visible in the camera. When I don't set the odometry input in tagslam.yaml (as in attachment 1), I can only get pose estimates when tags are visible. However, when I do set up the odometry input in tagslam.yaml (as in attachment 2), TagSLAM stops working entirely, whether tags are visible or not.

Could you help me understand how to correctly configure the tagslam.yaml file to use odometry input and still get pose estimates in both scenarios?

(Note: I'm consulting with ChatGPT for assistance.)
cameras.yaml
tagslam.yaml (Attachment 2)
camera_poses.yaml
tagslam.yaml (Attachment 1)

Bernd Pfrommer

unread,
Oct 20, 2023, 6:50:15 AM10/20/23
to tagslam
Where do you get the odometry from?
It is crucially important that the timestamps of the odometry are synchronized with the images. This is typically the case when the odometry is computed from the camera images itself, i.e. if the source of odometry is VIO *from the same camera* that is used as input for the tag detector. In this scenario, the ROS header time stamps of the detected tags naturally coincide with the odometry header time stamps.
In case your odometry comes from a different source that is unsynchronized you can set "use_approximate_sync: true"  in your tagslam.yaml file (right now it's set to "false"). Then tagslam will force the  odometry time stamps to align with the camera time stamps  as well as possible. Tagslam will update at the frequency of the lower of odometry or tag detections. Also see the caveat about synchronization. https://berndpfrommer.github.io/tagslam_web/caveats/

yusuke sakamaki

unread,
Oct 22, 2023, 9:15:06 PM10/22/23
to tagslam
Thank you for your response.

Regarding the question, "Where do you get the odometry from?" I'm considering using odometry derived from the rotation of the wheels of the mobile robot. However, I anticipate drift while using this odometry.

As for the suggestion, "In case your odometry comes from a different source that is unsynchronized you can set 'use_approximate_sync: true' in your tagslam.yaml file (right now it's set to 'false').", I tried setting 'use_approximate_sync' to 'true', but it did not work.

To check for synchronization, I will refer to the caveat about synchronization and plan to output the timestamps of the odometry and camera to a CSV file or similar, and compare them to see if they match.

2023年10月20日金曜日 19:50:15 UTC+9 bernd.p...@gmail.com:

Bernd Pfrommer

unread,
Oct 23, 2023, 4:32:52 PM10/23/23
to tagslam
If your odom comes from the wheels, then there is no way it will be synchronized with the camera images. Do you know what frequency your camera is running, and what frequency your wheeled odometry is publishing at? The use_approximate_sync flag should have worked. Please post more debugging output for that case, maybe there is something obvious I can spot. You can also send me a rosbag with the data.

yusuke sakamaki

unread,
Oct 24, 2023, 3:02:13 AM10/24/23
to tagslam
I checked the frequencies with 'rostopic hz' as you pointed out and found them to be different.

Odometry: approximately 100Hz
Camera image: approximately 30Hz

After re-recording the bag file to make it available, I realized that the issue was due to an incorrect frame_id. As a result, the system is now able to estimate its position even when the tag is not visible in the camera, thus resolving the issue I raised. Thank you for your assistance.

However, there seems to be a discontinuity in the estimated position when transitioning from the tag being visible to not visible. I suspect there might be an issue with the coordinate transformation, and I plan to continue investigating this.
2023年10月24日火曜日 5:32:52 UTC+9 bernd.p...@gmail.com:
Reply all
Reply to author
Forward
0 new messages