ALRedBallTracker API

Overview | ALRedBallTracker API | ALFaceTracker API | Trackers Sample


Namespace : AL

#include <alproxies/alredballtrackerproxy.h>

Methods

std::vector<float> ALRedBallTrackerProxy::getPosition()

Returns the [x, y, z] position of the red ball in FRAME_TORSO. This is done assuming an average red ball size (diameter: 0.06 m), so it might not be very accurate.

Returns:An Array of float containing the red ball position [x, y, z].
bool ALRedBallTrackerProxy::isActive()

Return true if the red Ball Tracker is running.

Returns:true if the red Ball Tracker is running.
bool ALRedBallTrackerProxy::isNewData()

Return true if a new Red Ball was detected since the last getPosition().

Returns:true if a new Red Ball was detected since the last getPosition().
void ALRedBallTrackerProxy::setWholeBodyOn(const bool& wholeBodyOn)

If true, the tracking will be through a Whole Body Process.

Parameters:
  • wholeBodyOn – The whole Body state
void ALRedBallTrackerProxy::startTracker()

Start the tracker by Subscribing to Event redBallDetected from ALRedBallDetection module. Then Wait Event redBallDetected from ALRedBallDetection module. And finally send information to motion for head tracking. Note: Stiffness of Head must be set to 1.0 to move!

void ALRedBallTrackerProxy::stopTracker()

Stop the tracker by Unsubscribing to Event redBallDetected from ALRedBallDetection module.