Welcome to the Hello GRID tutorial! This guide will walk you through setting up and running your first GRID session using the GRID Enterprise platform.

By default, all commands in this tutorial are executed on the local machine. If you are using a remote machine, you must specify it explicitly using the @<machine_name> syntax.

Getting Started

In this tutorial, you will:

  • Initialize the GRID Enterprise platform.
  • Set up and start a GRID session using the AirGen simulator using the CLI.
  • Access the simulation, and write some sample code to capture and visualize data.
  • Stop and terminate the session.

Setup and Initialization

Step 0: Ensure prerequisites

Before starting this tutorial, ensure that you have GRID Enterprise installed on your local machine. If you haven’t already installed GRID Enterprise, refer to the installation guide for detailed instructions. After installation, please make sure your ‘resource configuration’ file is set up correctly - you should have received this file during onboarding.

Step 1: Initialize the GRID Platform

The first step is to log into the GRID platform and initialize the containers. Open your terminal and run the following command:

grid

You can sign in using the provided credentials. Login using the command login and then initialize the containers using init.

This command spins up the necessary containers on your local machine, preparing the environment for your session.

If the containers do not already exist, the images will be downloaded, and the containers will be started. Please note that this process may take a few minutes.

Starting Your First Session

Step 2: Start Your First GRID Session

Let’s now start a session that runs a pre-configured simulation. Execute the following command in your terminal:

session start hello_grid

This starts a session named hello_grid. Because we did not explicitly specify a session configuration, GRID will use a sample configuration file to start the session. As the console output shows, this configuration file resides at ~/.grid/sample_session_config_airgen.json.

Step 3: Open the Simulation

After the session starts, open the simulation in your browser with the open command:

open sim @local

Step 4: Open the Notebook Interface

You can also open the notebook interface for the session with:

open nb @local


Step 5: Open Visualization

Similarly, to visualize the data using rerun, use the following command:

open hello_grid viz

Step 6: List Active Sessions

To check all active sessions, use the following command:

session list

Create a notebook

Now that we have the session running, let’s create a notebook to interact with the simulation. To do this, go to the notebook interface and click on New in the top right to create a new notebook.

Data Capture and Visualization

With our development environment setup, let’s go ahead and write a simple script to capture data and visualize it on rerun.

from grid.robot.wheeled.airgen_car import AirGenCar
robot = AirGenCar()

import airgen, rerun as rr 
image = robot.getImage("front_center", "rgb")

from grid.utils.logger import log 
log("rgb_image", image)

The expected output of the above code would be the image captured by the drone’s front center camera and displayed on rerun.

Step 7: Try to use an AI model

You can also use pre-trained AI models for computer vision, vision-language, SLAM, point tracking, and more. To use an AI model, you can import it and use it in your code. Let us try to use an object detection model to detect objects in the image captured by the robot.

from grid.model.perception.detection.owlv2 import OWLv2

det_model = OWLv2(use_local=True)
det_model.run(image.data, "ball")

Step 7: Stop the GRID Session

Once you’re finished with the session, stop it with:

GRID # session stop hello_grid

This will stop the hello_grid session without terminating the containers.

Step 8: Terminate the GRID Containers

Finally, to clean up your environment, terminate the containers by running:

GRID # terminate

This stops all running containers on your local machine.

Congratulations!

You’ve completed the Hello GRID tutorial. You’ve successfully logged in, started a session, opened a simulation, and cleaned up your environment. This is the beginning of what you can achieve with GRID Enterprise. Explore the advanced features like running sessions on remote machines, mounting custom storage, and integrating your own AI models.


Next Steps

  • Now that we have successfully set up the development environment, you can explore the AirGen, Isaac, and AI Models sections to dive deeper into the capabilities of the GRID Enterprise platform.