The VisualServoing
class provides core functionality for this module.
If True, inference call is run on the local VM, else offloaded onto GRID-Cortex. Defaults to True.
This model is currently not available via Cortex.
from grid.model.navigation.visualservoing import VisualServoing
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 = VisualServoing(use_local = True)
delta_yaw, velocity = model.run(
(100, 100),
{
"width": 640,
"height": 480,
"fov": 90,
"camera_orientation_euler_pry": (0, 0, 0),
},
)
print(f"delta_yaw: {delta_yaw}, velocity: {velocity}")
This code is licensed under the Apache 2.0 License.