Expand description
Metric size, position and speed of objects standing on the ground (Phase 3
of docs/object_metric_slam_plan.md, moving objects).
An object that moves while the camera moves cannot be triangulated: its rays do not meet. Ground contact places it anyway:
- The ground is found from the VIO’s static scene points in the
gravity-aligned world (z up).
PathGroundfollows the camera’s path: the camera moves over the ground, so a point’s height is measured from the camera where it passed nearest, which keeps roads that climb or fall sharp.estimate_ground_heightis the flat-ground version. - Each frame (
place_on_ground): the ray through the middle of the 2D box’s bottom edge meets the ground at the object’s foot. That fixes its distance, and the box’s rays cut at that distance give its height and width. “Bottom” is the edge lowest in the world, so a camera mounted sideways works as well as an upright one. - The ground under the object (
place_on_local_ground): stairs, a ramp or a kerb can put an object on another level than the camera’s ground, which makes it look small and near (a lower level) or large and far (a higher one). The ground moves to the layer of scene points under the object’s placed foot until it settles. - Over a track (
summarize_ground_track): the median size, the path of the foot, and the velocity of a line fitted to it, weighted by how far each foot can be off; a velocity within that noise is still.
The scale comes from the camera’s metric height above the ground, so it is as good as the VIO’s. The object must touch the ground where the box ends: anything carried, stacked or seen over an edge breaks it.
Structs§
- BoxRays
- World-frame rays through a 2D box: the middles of its four edges and its four corners.
- Ground
Observation - An object placed on the ground in one frame.
- Ground
Params - Settings of
estimate_ground_height,PathGroundandplace_on_local_ground. - Ground
Track - An object’s track on the ground.
- Ground
Track Params - Settings of
summarize_ground_track. - Ground
View - One view of an object: where the camera was and the rays of its box.
- Path
Ground - The ground along the camera’s path. The camera moves over the ground, so
a scene point’s height is measured from the camera where it passed
nearest: on a road that climbs or falls, the ground then lies at one
depth below the path, the camera’s height above it. That height is found
for each stretch of the path (
path_stretchmetres either way), so a camera whose height changes (a hand lowering it) is followed too. The ground under any spot is the camera’s height below the nearest point of the path.
Functions§
- estimate_
ground_ height - The ground’s height (world z): the mean height of the points in the
densest
bin-high layer belowlowest_camera_z - min_below_camera. - place_
on_ ground - Place an upright object standing on the ground
z = ground_z, seen fromcamera_centerthrough the rays of its 2D box.Noneif the camera is not above the ground or the box’s bottom edge does not point down. - place_
on_ local_ ground - Place an object’s views on the ground under it. Starting from
ground_z, the views are placed (place_on_ground), and the ground moves to the densest layer of thelocal_neighboursscenepointshorizontally nearest to the median foot (withinlocal_radius, below the lowest camera), while that layer lies more thanlocal_min_shiftaway (a few rounds at most). Nearest points rather than all within a radius, so that over steps the ground walks down (or up) one step at a time. Returns the ground used and the placed views;Noneif no view could be placed. - plausible_
height - Rough height ranges of COCO classes that stand on the ground, in metres. The height is what ground contact measures best (the width depends on the side the object is seen from). Only for flagging implausible estimates, never to set a scale.
- summarize_
ground_ track - Median size, and the velocity of the path, from at least three frames
spanning
min_seconds.