Skip to main content
This guide demonstrates how to create a robot that can detect specific objects using computer vision and navigate towards them. The example works with both simulated and real robots.

Overview

The detect and navigate example combines:
  • Object detection using OWLv2 model
  • Robot movement control
  • Real-time camera feed processing
  • Velocity-based navigation

Core Components

Detection Model

We use the OWLv2 model for object detection:

Box Center Calculation

This function calculates the center point of detected objects and checks if they’re too close:

Velocity Calculation

This function determines how the robot should move based on the target’s position:

Main Control Loop

The main loop continuously:
  1. Captures images from the robot’s camera
  2. Detects the target object
  3. Calculates required movement
  4. Controls the robot’s motion

Robot Setup

Simulated Robot (Isaac Quadruped)

For simulation environments, use the Isaac Quadruped configuration:

Real Robot (Go2)

For physical robot deployment, use the Go2 configuration:

Running the Example

  1. First, ensure you have GRID installed and set up properly.
  2. Choose your robot type:
  1. Define your target object:
  1. Run the main loop:
The robot will start searching for the specified object, and once detected, it will navigate towards it while maintaining a safe distance.
Remember to stop the robot if it gets too close to the target object or if you need to interrupt the operation.