Configure `camera_mono` for Visual Odometry

The camera_mono movement sensor model is an experimental model that uses a visual odometry algorithm with dead reckoning to track the position, orientation, linear velocity and angular velocity of the camera’s frame. The camera_mono model can use any single camera within its algorithm.

Navigate to the Config tab of your robot’s page in the Viam app. Click on the Components subtab and navigate to the Create component menu. Enter a name for your movement sensor, select the movement-sensor type, and select the camera_mono model.

Click Create Component.

Creation of an camera_mono movement sensor in the Viam app config builder.

Edit and fill in the attributes as applicable.

{
  "components": [
    {
      "name": "<your-sensor-name>",
      "type": "movement_sensor",
      "model": "camera_mono",
      "attributes": {
        "camera": "<your-camera-name>",
        "motion_estimation_config": {
            <see Vision Service documentation>
        }
      },
      "depends_on": []
    }
  ]
}
{
  "components": [
    {
      "name": "myCamera",
      "type": "camera",
      "model": "webcam",
      "attributes": {
        "video_path": "video0"
      },
      "depends_on": []
    },
    {
      "name": "movementCamera",
      "type": "movement_sensor",
      "model": "camera_mono",
      "attributes": {
        "camera": "myCamera",
        "motion_estimation_config": {
            <see Vision Service documentation>
        }
      },
      "depends_on": [
        "myCamera"
      ]
    }
  ]
}

Attributes

NameTypeInclusionDescription
camerastringRequiredThe name of the camera you want to use for visual odometry.
motion_estimation_configobjectRequiredSee motionestimation.go in RDK.


Have questions, or want to meet other people working on robots? Join our Community Discord.