UbiquityRobotics / fiducials

Simultaneous localization and mapping using fiducial markers.
BSD 3-Clause "New" or "Revised" License
265 stars 135 forks source link

fiducial_slam not updating map.txt upon observing new markers #197

Closed rcywongaa closed 4 years ago

rcywongaa commented 4 years ago

I'm not exactly sure if I'm using fiducial_slam correctly or if I understand completely what it's supposed to do.

I always assumed that on start / with an empty map.txt, fiducial_slam takes the closest marker position and saves it in map.txt. Upon seeing other markers together with this closest marker, it uses the first marker position to build the transform between the 2 markers and appends it into map.txt.

However, it seems that map.txt does not get updated after the first marker is inserted. Is my understanding incorrect?

Below is my launch settings for fiducial_slam

        <param name="map_file" value="$(find localization)/map.txt"/>
        <param name="tf_publish_interval" value="0.2" />
        <param name="publish_tf" value="true" />
        <param name="odom_frame" value="" />
        <param name="base_frame" value="base_link" />
        <param name="map_frame" value="map"/>
        <param name="publish_6dof_pose" value="true"/>
        <param name="read_only_map" value="false"/>
        <param name="do_pose_estimation" value="false"/>
        <remap from="/camera_info" to="/camera1/camera_info"/>

I am using version 0.11.0 as available in the Ubuntu repo under ros-melodic-fiducials

Note I'm using do_pose_estimation false because https://github.com/UbiquityRobotics/fiducials/issues/142 still seems to be happening for me. It seems that fiducial_slam is adding erronous /fiducial_transforms to the existing list published by aruco_detect. I'll create another issue if anyone would like to look into this. Relevant line of code: https://github.com/UbiquityRobotics/fiducials/blob/kinetic-devel/fiducial_slam/src/fiducial_slam.cpp#L128

rcywongaa commented 4 years ago

Realized this is due to #199