DPVSLAM

class grid.model.perception.slam.dpv_slam.DPVSLAM(*args, **kwargs)

DPV-SLAM: Visual SLAM Model

This class implements DPV-SLAM using loop closure for globally consistent trajectory estimation and mapping.

Credits:

https://github.com/princeton-vl/DPVO

License:

This code is licensed under the MIT License.

__init__(calib=array([320, 320, 320, 240]))

Initializes the DPV-SLAM model.

Parameters:

calib (np.ndarray) -- Camera calibration parameters.

Return type:

None

run(image)

Runs DPV-SLAM to predict the camera pose and build a map.

Parameters:

image (np.ndarray) -- The input RGB image.

Returns:

The predicted pose as a 1x6 tensor.

Return type:

np.ndarray

terminate(reconstruct=False)

Terminates the prediction routine, performs global optimization, and clears the keyframes.

Parameters:

reconstruct (bool) -- If True, display the reconstructed sparse map as a point cloud in Rerun.

Returns:

A tuple containing the predicted

camera poses and the reconstructed sparse map.

Return type:

Tuple[np.ndarray, np.ndarray]