Localizing an object
On a deployed box with real arms and wrist cameras, place an object from the AprilTags on it.
Localizing measures where an object really is from the AprilTags printed on it, seen by a wrist camera, and writes that pose into the world. It needs real arms with wrist cameras, so it is available only on a deployed box. The cloud app does not show these controls, and in the cloud sim you place objects by hand (see Building a world).
What the object needs
- Tags on the physical object. AprilTag family 36h11.
- A tag record for the object. Which tags sit where comes with the object type from the mesh database, as
tags.yaml(the object's own set) orunits/<handle>/tags.yaml(one set per physical copy). You cannot record tags yourself; an object type without a tag record cannot be localized. Ask Zeon when you need one.
A type with several physical copies has one tagged unit per copy. In the World Builder, the Tagged unit picker appears next to the object picker when the chosen type has two or more units. The choice is stored on the instance as its tag collection.
In the World Builder
On a deployed box the World Builder shows two more controls:
- Add + Localize next to Add to Scene: add an instance of the picked type at its measured pose.
- Re-localize (hand-guided) in a scene object's row menu: measure an object that is already in the world again.
Both open the localize panel and put the arm in freedrive. Move the arm by hand so its wrist camera sees the tags, and take snaps from a few angles (Take Snap, or Enter; Auto snap takes one when the arm holds still). When the unit was not chosen, the panel identifies it from the tags it sees. Localize solves for the pose and reports the number of detections and tags and the position and rotation uncertainty (Pos σ in mm, Rot σ in degrees). Show overlay draws the object's mesh over the camera image. Place (or Update pose) writes the pose into the world; Cancel leaves it unchanged. Save the world afterwards to keep the pose.
From a skill
localize_object_tags re-measures an object during a run, using the object's current pose as a starting estimate:
from .modules import localize_object_tags, print_log
result = localize_object_tags(plate_id, arm="right")
if not result["success"]:
print_log(f"localization rejected: {result}")The call takes one capture from the wrist camera of arm where the arm stands, so move the arm to a view of the tags first (with move_arm). The pose is written only when the solve is valid, saw at least min_detections tag observations (default 2), and its position uncertainty is within pos_sigma_gate_mm (default 15 mm). The call never raises into the skill: it returns a dict with success, the views, the result, the pose before and after, and moved_mm.
The default printed tag edge is 20 mm when the tag record states no size.
Updated 9 days ago