Vector

Anki is a company whose products always seem to delight.

Codelab Adapter is a software that connect Scratch 3.0 to the open-source hardware, IoT and AI.

We make a Codelab Adapter extension to connect Vector to Scratch 3.0. It just like Cozmo codelab.

Now the Vector extension is built into the Codelab Adapter!

Video tutorial

for Windows

for MacOS/Linux

Tutorial

install codelab_adapter_client

Python >= 3.6

Linux/MacOS user: python3 -m pip install codelab_adapter_client --upgrade --user

windows user: python -m pip install codelab_adapter_client --upgrade --user

Install the SDK on your system

Follow Vector official tutorial: Initial Setup

提醒

如果 Vector 的 IP发生了变化(诸如将Vector 带入新的 wifi 环境),不需要重新认证(python3 -m anki_vector.configure), 只需要修本地改配置文件即可(第一次认证留下的), 配置文件为: ~/.anki_vector/sdk_config.ini

If the following code (hello_world.py) runs smoothly, go to the next step.

'''
MacOS:
    /usr/local/bin/python3 hello_world.py
linux:
    /usr/bin/python3 hello_world.py
Windows:
    python hello_world.py
'''
import anki_vector
from codelab_adapter_client import AdapterNode

def main():
    args = anki_vector.util.parse_command_args()
    with anki_vector.Robot(args.serial) as robot:
        print("Say 'Hello World'...")
        robot.behavior.say_text("Hello World")


if __name__ == "__main__":
    main()

Download Codelab Adapter

Download Codelab Adapter

run it

Open Scratch 3.0

open CodeLab Scratch3

Open extension_vector

Ok!

Enjoy it :)

Tip

Tool for watching the camera feed and test animations of Anki's robot Vector: Vector-Explorer-Tool


Here are some demo cases(just like Cozmo CodeLab):

Vector and Leap Motion

Switch Labo and Vector

Candy Language for Vector

Advanced

You can create your own custom blocks based on the exec block. Almost all Vector SDK API work.