NAOqi Trackers

Overview | ALRedBallTracker API | ALFaceTracker API | Trackers Sample

What it does

The Tracker modules allow you to make NAO track targets (a red ball or a face).

The main goal of these modules is to establish a bridge between target detection and motion in order to make NAO keep in view the target in the middle of the camera.

How it works

Step by step

A - Starts the tracker by Subscribing to Event TargetDetected from ALTargetDetection module (ALRedBallTrackerProxy::startTracker() or ALFaceTrackerProxy::startTracker()).

B - Waits Event TargetDetected from ALTargetDetection module.

C - When target is detected, sends information to motion of the position of the new target (ALMotionProxy::updateTrackerTarget()).

D - Stops the tracker by Unsubscribing to Event TargetDetected from ALTargetDetection module (ALRedBallTrackerProxy::stopTracker(), ALFaceTrackerProxy::stopTracker()).

Position identification

  • The Tracker modules (ALRedBallTracker, ALFaceTracker) identify the position of target (“Red ball” or “Face”) seen by NAO.
  • It can give the position of the target in FRAME_TORSO (see Spaces about the different spaces).
  • Function getPosition returns the [x, y, z] position of the target (ALRedBallTracker::ALRedBallTrackerProxy::getPosition() or ALFaceTracker::ALFaceTrackerProxy::getPosition()).

Performance and Limitations


This is done assuming an average target size, so it might not be very accurate.

Getting started



Choose the kind of motion tracking using the following api: (ALRedBallTrackerProxy::setWholeBodyOn() or ALFaceTrackerProxy::setWholeBodyOn()).

  • head tracking: the two head’s joint are controlled to reach the target. The tracking area is limited by the limits of NAO joints.
  • whole body tracking: NAO keeps balance autonomously and adapts his posture to track the target.

Main methods

Main methods to use the tracker are startTracker() / stopTracker().

Use Cases

Here are some possible applications (from the simplest to the more ambitious ones) that can be built from NAO’s ability to track a target.

Case 1: Tracking the red ball using the head: Red Ball Tracker Sample

Case 2: Tracking the red ball using the whole body motion: Tracking a red ball with NAO’s whole body

Case 3: Walk toward a person: Tracking a face using the Walk Tracker box