anki_vector.opengl.opengl_vector

This module provides Vector-specific 3D support classes for OpenGL, used by opengl_viewer.py.

Warning

This package requires Python to have the PyOpenGL package installed, along with an implementation of GLUT (OpenGL Utility Toolkit).

To install the Python packages on Mac and Linux do python3 -m pip install --user "wirepod_vector_sdk[3dviewer]"

To install the Python packages on Windows do py -3 -m pip install --user "wirepod_vector_sdk[3dviewer]"

On Windows and Linux you must also install freeglut (macOS / OSX has one preinstalled).

On Linux: sudo apt-get install freeglut3

On Windows: Go to http://freeglut.sourceforge.net/ to get a freeglut.dll file. It’s included in any of the Windows binaries downloads. Place the DLL next to your Python script, or install it somewhere in your PATH to allow any script to use it.”

Module Attributes

VECTOR_MODEL_FILE

The object file used to render the robot.

CUBE_MODEL_FILE

The object file used to render the cube.

LIFT_ARM_LENGTH_MM

The length of Vector's lift arm

LIFT_PIVOT_HEIGHT_MM

The height above ground of Vector's lift arm's pivot

LIFT_ANGLE_IN_DEFAULT_POSE

Angle of the lift in the object's initial default pose.

FORK_PIVOT_X

Pivot offset for where the fork rotates around itself

UPPER_ARM_PIVOT_X

Offset for the axel that the upper arm rotates around.

LOWER_ARM_PIVOT_X

Offset for the axel that the lower arm rotates around.

HEAD_PIVOT_X

Offset for the pivot that the head rotates around.

Classes

CubeRenderFrame(cube)

Minimal copy of a Cube's state for 1 frame of rendering.

CustomObjectRenderFrame(custom_object, is_fixed)

Minimal copy of a CustomObject's state for 1 frame of rendering.

FaceRenderFrame(face)

Minimal copy of a Face's state for 1 frame of rendering.

LightCubeView(mesh_data)

A view containing the Vector Light Cube 3D Model.

NavMapView()

A view containing a cube of unit size at the origin.

ObservableObjectRenderFrame(obj)

Minimal copy of an object's state for 1 frame of rendering.

RobotRenderFrame(robot)

Minimal copy of a Robot's state for 1 frame of rendering.

RobotView(mesh_data)

A view containing the Vector robot 3D Model.

UnitCubeView()

A view containing a cube of unit size at the origin.

VectorViewManifest()

A collection of Vector-specific source data containing views to display.

WorldRenderFrame(robot, connecting_to_cube)

Minimal copy of the World's state for 1 frame of rendering.