A Ground-Truth Acquisition Setup for SLAM Trajectories
SLAMTechnical NotesSLAMVIOsensor fusion
Localization accuracy is an important SLAM metric. Public indoor data sets usually acquire trajectory ground truth with motion-capture systems, but those systems are expensive. Without one, it is difficult to evaluate SLAM using self-collected data. We built a low-cost ground-truth setup: a fixed monocular camera observes planar motion through an ArUco marker fixed to the top of a robot. It measures 2D motion only, not 3D motion.
1. Principle
A downward-facing monocular camera is mounted above the robot and observes an ArUco marker attached flat to its top. The marker pose relative to the robot is known. OpenCV detects the four marker corners in pixel coordinates. Converting those corners to planar coordinates gives the robot’s position and heading.
A 3D world point pw=[x,y,z]T projects onto the image as
The relationship between planar coordinates and pixels is therefore homography H:
xy1=λH−1uv1.(3)
2. Obtaining the homography
Equation (2) gives H from camera intrinsics K and extrinsics T. Estimate T using a planar chessboard target placed above the ArUco marker. PnP estimates target-to-camera transform T′. The chessboard and ArUco planes differ by the target thickness t, so
T=T′10000100001000t1.(4)
This gives T and then H.
3. Computing robot pose
The four marker-corner pixel coordinates are
[uivi],i=1,…,4.(5)
Use (3) to obtain planar world coordinates
[xiyi],i=1,…,4.(6)
The robot position is the marker center:
[xcyc]=41i=1∑4[xiyi].(7)
To estimate the planar heading, average two opposing marker edges:
and the covariance of the measured planar point is
Σxy=∂[u,v]T∂FΣuv(∂[u,v]T∂F)T.(12)
The setup used a Daheng MER-302-56U3C camera (2048×1536), a Kowa LM3NC1M 3.5 mm wide-angle lens, and a camera-to-plane distance of about 2 m. It measured about 4m×3m. With one-pixel extraction accuracy, the measurement accuracy is about 2 mm, sufficient for SLAM trajectory evaluation.
5. Measurement range
A camera facing the measurement plane produces a rectangular measurable region. A tilted camera produces a general quadrilateral. Its size depends on lens field of view, camera height, and camera angle.
To make accuracy uniform, point the camera as directly at the plane as possible. A shorter focal length increases field of view but lowers accuracy. Sufficient accuracy needs a high-resolution camera; lower mounting height needs a short-focal-length lens.
Hartley R, Zisserman A. Multiple View Geometry in Computer Vision. Cambridge University Press, 2003.
Yang D, Bi S, Cai Y, et al. Planar measurement with a monocular large-field-of-view camera based on parallel-plane multi-target calibration. Acta Optica Sinica, 2017.