anki_vector.util

Utility functions and classes for the Vector SDK.

Functions

angle_z_to_quaternion(angle_z)

This function converts an angle in the z axis (Euler angle z component) to a quaternion.

block_while_none([interval, max_iterations])

Use this to denote a property that may need some delay before it appears.

degrees(degrees)

An Angle instance set to the specified number of degrees.

distance_inches(distance_inches)

Returns an anki_vector.util.Distance instance set to the specified number of inches.

distance_mm(distance_mm)

Returns an anki_vector.util.Distance instance set to the specified number of millimeters.

get_class_logger(module, obj)

Helper to create logger for a given class (and module).

parse_command_args([parser])

Parses command line arguments.

radians(radians)

An Angle instance set to the specified number of radians.

read_configuration(serial, name, logger)

Open the default conf file, and read it into a configparser.ConfigParser If serial is not None, this method will try to find a configuration with serial number serial, and raise an exception otherwise.

setup_basic_logging([custom_handler, ...])

Helper to perform basic setup of the Python logger.

speed_mmps(speed_mmps)

anki_vector.util.Speed instance set to the specified millimeters per second speed.

Classes

Angle([radians, degrees])

Represents an angle.

BaseOverlay(line_thickness, line_color)

A base overlay is used as a base class for other forms of overlays that can be drawn on top of an image.

Component(robot)

Base class for all components.

Distance([distance_mm, distance_inches])

Represents a distance.

ImageRect(x_top_left, y_top_left, width, height)

Defines a bounding box within an image frame.

Matrix44(m00, m10, m20, m30, m01, m11, m21, ...)

A 4x4 Matrix for representing the rotation and/or position of an object in the world.

Pose(x, y, z[, q0, q1, q2, q3, angle_z, ...])

Represents where an object is in the world.

Position(x, y, z)

Represents the position of an object in the world.

Quaternion([q0, q1, q2, q3, angle_z])

Represents the rotation of an object in the world.

RectangleOverlay(width, height[, ...])

A rectangle that can be drawn on top of a given image.

Speed([speed_mmps])

Represents a speed.

Vector2(x, y)

Represents a 2D Vector (type/units aren't specified).

Vector3(x, y, z)

Represents a 3D Vector (type/units aren't specified).