The GRID Robot API provides a unified interface for controlling different types of robots, whether simulated or real. This abstraction allows you to write code that works seamlessly across different robot form factors and environments.
# Get camera image from real robotfrom grid.robot.wheeled.jetbot import JetBotrobot = JetBot()rgb_image = robot.getImage("front_center", "rgb")# Get camera image from simulated robotfrom grid.robot.wheeled import AirGenCarcar = AirGenCar()rgb_image = car.getImage("front_center", "rgb")