from grid.model.perception.slam.dpv_slam import DPVSLAM
car = AirGenCar()

# We will be capturing an image from the AirGen simulator 
# and run model inference on it.

img =  car.getImage("front_center", "rgb").data

model = DPVSLAM(use_local = True)
result = model.run(image=img)
The DPVSLAM class implements DPV-SLAM using loop closure for globally consistent trajectory estimation and mapping.
class DPVSLAM()
use_local
boolean
default:true
If True, inference call is run on the local VM, else offloaded onto GRID-Cortex. Defaults to True.
calib
np.ndarray
default:"True"
The camera calibration matrix of shape (4,)(4,). Defaults to np.array([320, 320, 320, 240]).
This model is currently not available via Cortex.
def run()
rgbimage
np.ndarray
required
The input RGB image of shape (M,N,3)(M,N,3).
Returns
np.ndarray
The predicted pose as a 1x6 array.
from grid.model.perception.slam.dpv_slam import DPVSLAM
car = AirGenCar()

# We will be capturing an image from the AirGen simulator 
# and run model inference on it.

img =  car.getImage("front_center", "rgb").data

model = DPVSLAM(use_local = True)
result = model.run(image=img)
This code is licensed under the MIT License.