anki_vector.objects

Object and Light Cube recognition.

Vector can recognize and track a number of different types of objects.

These objects may be visible (currently observed by the robot’s camera) and tappable (in the case of the Light Cube that ships with the robot).

The Light Cube is known as a LightCube by the SDK. The cube has controllable lights, and sensors that can determine when it’s being moved or tapped.

Objects can generate events which can be subscribed to from the anki_vector.events class, such as object_appeared (of type EvtObjectAppeared), and object_disappeared (of type EvtObjectDisappeared), which are broadcast based on both robot originating events and local state.

All observable objects have a marker of a known size attached to them, which allows Vector to recognize the object and its position and rotation (“pose”). You can attach markers to your own objects for Vector to recognize by printing them out from the online documentation. They will be detected as CustomObject instances.

Vector connects to his Light Cube with BLE.

Module Attributes

OBJECT_VISIBILITY_TIMEOUT

Length of time in seconds to go without receiving an observed event before assuming that Vector can no longer see an object.

LIGHT_CUBE_1_TYPE

LIGHT_CUBE_1_TYPE's markers look like 2 concentric circles with lines and gaps.

Classes

Charger(robot, object_id, **kw)

Vector's charger object, which the robot can observe and drive toward.

CustomObject(robot, archetype, object_id, **kw)

An object defined by the SDK observed by the robot.

CustomObjectArchetype(custom_type, ...)

An object archetype defined by the SDK.

CustomObjectMarkers()

Defines all available custom object markers.

CustomObjectTypes()

Defines all available custom object types.

EvtObjectAppeared(obj, image_rect, pose)

Triggered whenever an object is first visually identified by a robot.

EvtObjectDisappeared(obj)

Triggered whenever an object that was previously being observed is no longer visible.

EvtObjectFinishedMove(obj, move_duration)

Triggered when an active object stops moving.

EvtObjectObserved(obj, image_rect, pose)

Triggered whenever an object is visually identified by the robot.

FixedCustomObject(robot, pose, x_size_mm, ...)

A fixed object defined by the SDK.

LightCube(robot, **kw)

Represents Vector's Cube.

ObservableObject(robot, **kw)

The base type for anything Vector can see.