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 "anki_vector[3dviewer]"
To install the Python packages on Windows do py -3 -m pip install --user "anki_vector[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.”
Classes
|
Minimal copy of a Cube’s state for 1 frame of rendering. |
|
Minimal copy of a CustomObject’s state for 1 frame of rendering. |
|
Minimal copy of a Face’s state for 1 frame of rendering. |
|
A view containing the Vector Light Cube 3D Model. |
|
A view containing a cube of unit size at the origin. |
|
Minimal copy of an object’s state for 1 frame of rendering. |
|
Minimal copy of a Robot’s state for 1 frame of rendering. |
|
A view containing the Vector robot 3D Model. |
A view containing a cube of unit size at the origin. |
|
A collection of Vector-specific source data containing views to display. |
|
|
Minimal copy of the World’s state for 1 frame of rendering. |
-
class
anki_vector.opengl.opengl_vector.
CubeRenderFrame
(cube)¶ Minimal copy of a Cube’s state for 1 frame of rendering.
- Parameters
cube (
LightCube
) – the cube object to be rendered.
-
class
anki_vector.opengl.opengl_vector.
FaceRenderFrame
(face)¶ Minimal copy of a Face’s state for 1 frame of rendering.
- Parameters
face (
Face
) – The face object to be rendered.
-
class
anki_vector.opengl.opengl_vector.
LightCubeView
(mesh_data)¶ A view containing the Vector Light Cube 3D Model.
- Parameters
mesh_data (
MeshData
) – Source Mesh Data for the light cube.
-
class
anki_vector.opengl.opengl_vector.
RobotRenderFrame
(robot)¶ Minimal copy of a Robot’s state for 1 frame of rendering.
- Parameters
robot – the robot object to be rendered.
-
class
anki_vector.opengl.opengl_vector.
RobotView
(mesh_data)¶ A view containing the Vector robot 3D Model.
- Parameters
mesh_data (
MeshData
) – Source Mesh Data for the robot.
-
class
anki_vector.opengl.opengl_vector.
UnitCubeView
¶ A view containing a cube of unit size at the origin.
-
class
anki_vector.opengl.opengl_vector.
VectorViewManifest
¶ A collection of Vector-specific source data containing views to display.
-
property
light_cube_view
¶ A precomputed view of Vector’s light cube.
- Return type
-
load_assets
()¶ Loads all assets needed for the view manifest, and precomputes them into cached views.
A precomputable view of the navigation map. This will be updated as new content comes in.
- Return type
NavMapView
-
property
unit_cube_view
¶ A precomputed view of a unit cube.
This is used for representing detected faces.
- Return type
-
property
-
class
anki_vector.opengl.opengl_vector.
WorldRenderFrame
(robot, connecting_to_cube)¶ Minimal copy of the World’s state for 1 frame of rendering.
- Parameters
robot – the robot object to be rendered, which also has handles to the other objects defined in it’s world class.
-
cube_connected
()¶ Is there a light cube connected to Vector
-
cube_connecting
()¶ Is there a current attempt to connect to a light cube