Recover pose, field of view and lens of the knocked overhead camera of SO-101 bench cell BC2-2235 from 36 stills at 256 x 192 (cubes on surveyed spots and held in the jaws)
harbor run -t reactive-labs/overhead-camera-bc2-2235harbor download reactive-labs/overhead-camera-bc2-2235A maintenance crew replacing the lamp above BC2-2235 leaned a ladder against the overhead camera bracket at 12:27. The camera did not fall, but the bracket was loosened and tightened again, and the pick jobs that locate parts from this camera have been missing by a few millimetres since. The lens has a zoom ring with no lock screw, and the technician found it turned after the knock, so the field of view is not the drawing value either. Rebuild the camera entry of the unit file so that the simulated overhead camera sees the cell the way the real one does.
The cell, the simulator and the unit file format are described in /app/CELL_SHEET.md. The records are in
/app/data/:
unit.json: the unit file as it stands. The arm was re-zeroed last month and its joint_offset and base are
right. The camera entry is missing, so it is at its drawing values.spots.csv: surveyed spots on the cell, in metres in the world frame. surface_z is the height of the surface
the spot is on: 0.000 for marks on the table top, 0.006 for the jig plate JP-1 (on the table's locating pins,
centre at (0.200, 0.000), edges square to the world axes; Dij spots are over its divots) and 0.004 for the tray
floor.overhead/: the 36 stills the overhead camera saved to its card that day (256 x 192 PNG, 14:15:42 to 15:30:14).
After the re-mount the technician ran a calibration session. For some stills the arm was parked in its rest pose
and the technician set the three 25 mm cubes (red, blue, green) by hand on surveyed spots, one cube per spot; for
the others the arm held one cube in its jaws at a logged pose while the other cubes sat on spots. The jig plate
was on its pins all day. The lamp over the cell has no fixed exposure setting, so brightness varies between
stills.overhead/session.csv is the technician's log, one row per still: the image file, the time the still was saved
(hh:mm:ss, same day), the six encoder readings of the arm at that moment, and where each cube was. A cube entry is
a spot id when the cube was set on that spot by hand. Cubes were set to about a millimetre and squared to the
table edges by eye. jaws means the arm held that cube: the cube is then centred on the jaw tip point (site
gripperframe) with its faces square to the jaw frame. off means the cube was not on the table. When no cube is
held, the arm is parked in its rest pose.Work out the overhead camera of this unit and write /app/out/unit.json, containing at least
{"overhead_cam": {"pos": [x, y, z], "rpy": [roll, pitch, yaw], "fovy": fovy_deg, "k1": k1, "k2": k2}}
with the meaning the simulator gives these values (benchcell.cell.build_model and cam_quat). pos is the
camera's optical centre in the world frame, in metres. fovy is the full vertical field of view in degrees. The
orientation is the drawing orientation turned by rpy (radians): in the drawing the camera looks straight down
(along world -z), with the image's right edge towards world -y and its top edge towards world +x; that frame is then
rotated about the world x axis by roll, then about the world y axis by pitch, then about the world z axis by yaw
(fixed axes, in that order, so the rotation matrix is Rz(yaw) Ry(pitch) Rx(roll) applied to the drawing frame). The
camera model is MuJoCo's pinhole (square pixels, principal point at the image centre) followed by the radial lens
model of the cell sheet, k1 and k2 in overhead_cam, each within -0.3 to 0.3 (a missing k1 or k2 counts as
0). Other keys in the file are ignored by the check.
The cell's jobs locate parts on the table and parts carried in the jaws up to 150 mm above it. The check projects a hidden set of points over the table, from the table top up to 150 mm above it, into a 320 x 240 image through your camera and through the unit's real camera, and measures the distance between the two image positions. The points are split into two halves, below and above 75 mm. Each half gets full marks at a mean distance of 0.2 px or less and none at 1.0 px or more, linear in between; the score is that of the worse half.