Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Configuring Camera Locations

Mason Vogt edited this page Mar 16, 2023 · 5 revisions

Every robot should have a unique cameras.json file to describe where the cameras are on the robot. The formatting is listed below

{
    "cameras" : [
        
        {
            "name": "USB Webcam", -> Can be anything, used for logging
            "type": "Small_USB_Camera", -> Must match a camera type in the directory `camera_params/`
            "port": 2, -> Port recognized by OpenCV, use the `tools/camera_port_scanner.py` script to get IDs
            "robot_pose": [ -> Transform matrix to describe camera location relative to robot origin in meters. <br>
Only edit the values listed as 0's
                [1, 0, 0, `X`],
                [0, -1, 0, `Y`], The center of this matrix is a rotation matrix. More information can be found on this page https://en.wikipedia.org/wiki/Rotation_matrix
                [0, 0, -1, `Z`],
                [0, 0, 0, 1]
        }
    ]
}
 # Camera placed facing forward, half a meter to the left of center, 3/4 meters up, .1 meters forward
    [1, 0, 0 -0.5],
    [0, 1, 0, 0.1],
    [0, 0, 1, 0.75],
    [0, 0, 0, 1]

Clone this wiki locally