How it works
- While mapping. The Go2 runs an AprilTag detector on its front camera. When it gets a steady view of a tag, it stores the tag’s family, ID, size and pose in the map as a landmark.
- When you stop mapping. The map is finalized with the landmark in it. The robot keeps its pose from the mapping run and goes straight on to navigation, so the tag is not used at this point.
- At the next start. The stack picks the twin’s most recently finalized map and loads its saved localization database. It then watches the camera for a tag that the map knows. A steady sighting gives the robot its pose on the map. Once the map matcher confirms that pose, navigation turns on.
Requirements
- A Unitree Go2 running the Cyberwave Go2 navigation stack (driver, SLAM and Nav2 containers). This is the stack Edge Core starts from the Go2 driver image. If you replaced the twin’s driver entry with a hand-written multi-service
serviceslist, relocalization stays off. - The front camera streaming. The detector uses the same camera feed you see in the dashboard.
- A map made with the tag in view. The tag is only recorded during a mapping run, so a map made before you put the tag up cannot relocalize from it.
Prepare the tag
Tag specification
Get and print a tag
The easiest way is to print the tag from Cyberwave, which draws it at the exact physical size:Add a marker
Set family and size
apriltag_36h11, pick any Marker ID, and set Size to 0.1334. The default is 0.15, which does not match the Go2.Print at size
Measure
Mount it
Printing a tag without Cyberwave
Printing a tag without Cyberwave
apriltag-imgs repository, in the tag36h11 folder. For example, tag36_11_00000.png is ID 0. Each image is only 10 × 10 pixels: one ring of white pixels around an 8 × 8 black-bordered pattern, so the black square takes up 8/10 of the image width. Enlarge the image so the whole image is 16.7 cm wide (16.7 × 0.8 = 13.34 cm), using nearest-neighbour scaling (“no smoothing” or “pixelated”) so the edges stay sharp, then print at 100% and measure as above.Record the tag into a map
Start mapping with the tag in view
Map the site
Stop mapping
/data/map_bundles. The occupancy grid is uploaded to Cyberwave so you can view it and place waypoints. The saved map that relocalization needs is not uploaded, and it is never downloaded back from the cloud.
Relocalize on the next start
Place the Go2 where it can see the tag, then power it up or restart its driver. You do not have to press anything. Once the stack is running:- It selects the twin’s most recently finalized map and loads its saved localization database. The badge shows Localizing.
- It watches the camera for a tag that the map knows. A sighting counts only if it is steady: 3 matching detections in a row, each taken less than 1 s after the last and each with a confidence of at least 0.5. The detections must agree to within 20 cm and 20°.
- It collects at least 2 such sightings that agree to within 30 cm and 15°, then uses them to set its pose on the map. It has 60 seconds from the start of this search to do so.
- It waits until the map matcher has registered against the saved map and the pose has been stable for 5 seconds. If that does not happen within 30 seconds of setting the pose, the start fails.
- The badge changes to Localized and navigation (Nav2) turns on. Waypoint missions and Move Twin work from here.
Limits
- Only the latest map. At start-up the robot always uses the twin’s most recently finalized map. You cannot pick an older map for relocalization. Every new mapping run replaces it, so keep the tag in view at the start of each run.
- Maps stay on the edge computer. If you wipe
/etc/cyberwave/ros2_go2_driver, reinstall the edge computer or move the twin to new hardware, the saved map is gone. The occupancy grid in the cloud is not enough to relocalize from, so you have to map again. - One robot per map. Each saved map belongs to the twin that made it. A second Go2, even in the same site, has to make its own map.
- The tag must not move. The landmark is saved in map coordinates. If you move or rotate the tag after mapping, the robot starts from a wrong pose.
- Go2 only, for now. Other quadrupeds and rovers do not have AprilTag relocalization yet.
apriltag_36h11, and set size to 0.1334. The marker’s default
size of 0.15 m does not match what the robot expects.Troubleshooting
Open the Logs tab, select the Go2 twin, and search for the lines below.Selected MapBundle is not ready for fiducial seeding yet
Selected MapBundle is not ready for fiducial seeding yet
MapBundle is not fiducial-ready: fiducial_landmark_missingmeans no tag was recorded during mapping. The tag was out of view, not seen steadily, or not atag36h11tag. A tag with no white margin, or on a dark stand, is often not seen at all.map bundle belongs to another robot instancemeans the saved map was made by a different twin.- A “not found” or file error means the saved map is missing from
/etc/cyberwave/ros2_go2_driver/map_bundles, for example because the folder was wiped.
Loaded N known fiducials from MapBundle, but nothing happens
Loaded N known fiducials from MapBundle, but nothing happens
Fiducial seed observation status lines, the camera is not detecting any tag. The most common cause is a missing white margin: the tag was trimmed to its black square, or it sits on a black or dark stand, panel or frame. The detector then cannot find the square’s outline, even when the tag is large and sharp in the camera feed. Other causes are a tag that is out of view, too far away or too small in the image, washed out by glare, or printed blurry.Fix. In the camera feed, check that the black square is surrounded by white on all four sides, with nothing dark touching it. If not, back the tag with white card so that at least 1.7 cm of white shows all round. Then move the robot to 1–2 m from the tag, facing it squarely, and replace glossy or blurry prints.Fiducial seed observation status: reason=...
Fiducial seed observation status: reason=...
reason says why it is not accepted yet:unknown_fiducial: the tag in view is not one recorded in this map (different ID or family). Use the tag that was up during mapping.low_confidence: the tag’s corners do not match a flat square well. This usually means a curled or glossy print, motion blur, or a steep viewing angle.stability_threshold_not_met: the robot has fewer than 3 matching detections so far. Normal for the first moments. If it never clears, the robot or the tag is moving.fiducial_size_mismatch: the robot’s configured tag size differs from the size saved with the map.stable_known_fiducial: a steady sighting was accepted.
Collected stable fiducial seed candidate, then an error
Collected stable fiducial seed candidate, then an error
Fiducial seed session stopped without publishing an initial pose, the sightings did not agree, or the tag left the view before the 60-second window closed. Sightings that disagree usually mean the print is the wrong size, so the distance is wrong each time, or the tag is not flat.Fix. Measure the black square again (13.34 cm) and remount the tag flat. Restart the driver with the robot still and the tag in view.No fiducial seed reached consensus before the cold-start deadline
No fiducial seed reached consensus before the cold-start deadline
Fiducial seed completed but RTAB-Map map->odom did not become stable
Fiducial seed completed but RTAB-Map map->odom did not become stable
Cannot transform fiducial ... during mapping
Cannot transform fiducial ... during mapping