cozmo.util

Utility classes and functions.

Functions

angle_z_to_quaternion(angle_z)

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

degrees(degrees)

Returns an cozmo.util.Angle instance set to the specified number of degrees.

distance_inches(distance_inches)

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

distance_mm(distance_mm)

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

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

Returns a cozmo.util.Pose instance set to the pose given in quaternion format.

pose_z_angle(x, y, z, angle_z[, origin_id])

Returns a cozmo.util.Pose instance set to the pose given in z angle format.

radians(radians)

Returns an cozmo.util.Angle instance set to the specified number of radians.

rotation_quaternion(q0, q1, q2, q3)

Returns a Rotation instance set by a quaternion.

rotation_z_angle(angle_z)

Returns a class:Rotation instance set by an angle in the z axis

speed_mmps(speed_mmps)

Returns an cozmo.util.Speed instance set to the specified millimeters per second speed

Classes

Angle([radians, degrees])

Represents an angle.

Distance([distance_mm, distance_inches])

Represents a distance.

ImageBox(top_left_x, top_left_y, 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.

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

An alias for Quaternion

Speed([speed_mmps])

Represents a speed.

Timeout([timeout, use_inf])

Utility class to keep track of a timeout condition.

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)