Previous
Arm with Fixed External Camera
This setup covers a mobile base with sensors mounted on it, such as LIDAR, front-facing cameras, and rear-facing cameras. These sensors are used for navigation, SLAM, and obstacle detection. All sensors are children of the base frame, so their positions update automatically as the base moves through the environment.
world
└── my-base
├── my-lidar (mounted on top)
├── front-camera (front-facing)
└── rear-camera (rear-facing)
The base is a child of the world frame. All sensors are children of the base, so the entire sensor subtree moves with the base.
For a mobile base, the world frame origin is typically the center of the base itself. The frame system tracks the base’s position as it moves, so the world frame serves as the fixed reference that the base moves through.
You do not need to mark a physical location for the world frame origin in the environment. Instead, all sensor positions are defined relative to the center of the base.
In the Viam app, navigate to your machine and click the CONFIGURE tab. Find your base component and click + Add frame.
Since the world frame origin is at the base center, the translation is zero:
{
"parent": "world",
"translation": { "x": 0, "y": 0, "z": 0 },
"orientation": {
"type": "ov_degrees",
"value": { "x": 0, "y": 0, "z": 1, "th": 0 }
}
}
Click Save.
Find your LIDAR component and click + Add frame. Measure the offset from the center of the base to the LIDAR’s sensor origin.
For a LIDAR mounted on top of the base, centered horizontally and 150 mm above the base center:
{
"parent": "my-base",
"translation": { "x": 0, "y": 0, "z": 150 },
"orientation": {
"type": "ov_degrees",
"value": { "x": 0, "y": 0, "z": 1, "th": 0 }
}
}
If the LIDAR is offset forward or to one side, include x and y values. For example, a LIDAR mounted 50 mm forward of center and 150 mm above:
{
"parent": "my-base",
"translation": { "x": 0, "y": 50, "z": 150 },
"orientation": {
"type": "ov_degrees",
"value": { "x": 0, "y": 0, "z": 1, "th": 0 }
}
}
Click Save.
Find each camera component and click + Add frame. Measure the offset from the base center to each camera’s mounting position.
Front-facing camera: For a camera mounted at the front of the base, 200 mm forward and 120 mm above the base center:
{
"parent": "my-base",
"translation": { "x": 0, "y": 200, "z": 120 },
"orientation": {
"type": "ov_degrees",
"value": { "x": 0, "y": 0, "z": 1, "th": 0 }
}
}
The default orientation has the camera looking along the +y axis (forward). If your camera’s optical axis does not align with the base’s forward direction, adjust the orientation accordingly.
Rear-facing camera: For a camera mounted at the back of the base, 200 mm backward and 120 mm above the base center, facing backward:
{
"parent": "my-base",
"translation": { "x": 0, "y": -200, "z": 120 },
"orientation": {
"type": "ov_degrees",
"value": { "x": 0, "y": 0, "z": 1, "th": 180 }
}
}
The 180-degree rotation around the z axis points the camera backward (along -y).
Click Save after adding each camera frame.
If any frame appears in the wrong position or orientation, return to the CONFIGURE tab and adjust the values.
Use TransformPose to confirm the relationships between sensor frames and the base frame.
For example, transform the front camera’s origin (0, 0, 0) from the camera frame to the base frame.
The result should match the camera’s measured offset from the base center.
For details on the TransformPose API, see Frame System Concepts.
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!