Petoi Doc Center
🇺🇸English
🇺🇸English
  • Welcome to Petoi Doc Center
  • Getting Started Guide
  • 🙋‍♂️FAQ(Frequently Asked Questions)
  • Petoi robot joint index
    • Joint Pins on NyBoard
      • Nybble
      • Bittle
    • Joint Pins on BiBoard V0
      • Bittle X
      • Bittle X+Arm
    • Joint Pins on BiBoard V1
      • Bittle X
      • Bittle X+Arm
      • Nybble Q
  • Bluetooth Connection
    • BiBoard
    • NyBoard
  • Upload Firmware
    • NyBoard
    • BiBoard V0
    • BiBoard V1
  • Joint Calibration
  • Infrared Remote
    • Remote Controller
  • Mobile App
    • Introduction
    • Calibrator
      • Nybble
      • Bittle
    • Controller
  • Desktop APP
    • Introduction
    • Firmware Uploader
      • NyBoard
      • BiBoard V0
      • BiBoard V1
    • Joint Calibrator
      • NyBoard Preparation
      • BiBoard Preparation
      • Nybble
      • Bittle / Bittle X
        • Bittle (NyBoard)
        • Bittle X (BiBoard V0)
        • Bittle X (BiBoard V1)
      • Bittle X+Arm
        • BiBoard V1
        • BiBoard V0
    • Skill Composer
      • NyBoard Connection
      • BiBoard Connection
      • Interface
        • Nybble
        • Bittle / Bittle X
        • Bittle X+Arm
    • Tools
  • Block-based programming
    • Petoi Coding Blocks
      • NyBoard Preparation
      • BiBoard Preparation
    • Block-based Coding Curriculum - Learn Quadruped Robotics for Beginners
    • Python coding mode in Mind+
    • Generic Arduino Uno Blocks
    • Install Mind+ on Chromebook
  • Arduino IDE
    • Upload Sketch for NyBoard
    • Upload Sketch for BiBoard
    • Calibrate the joints with Arduino IDE
    • Serial Monitor
    • C++ Curriculum: Learn Quadruped Robotics for Beginners
    • Install Arduino IDE on Chromebook
  • Free Curriculum
    • 📚Download
  • APIs
    • 🖇️Serial Protocol
      • Feedback servos
      • Nested task queue and signal generator
    • 🐍Python API
    • 🐛8266 MicroPython controller
      • Run MicroPython on ESP8266
      • Setup WebREPL
      • Using the ESP-NOW protocol
    • 🦎8266 Arduino C Controller
    • ©️C++ API
    • 🍓Raspberry Pi serial port as an interface
      • For BiBoard V1
    • 💻Set up Development Environment on Chromebook
    • 🤖ROS
  • Nyboard
    • Overview
    • NyBoard V1_0
    • NyBoard V1_1 & NyBoard V1_2
  • BIBOARD
    • BiBoard V0 Guide
    • BiBoard Extension Hat
    • Demo Applications
      • 1.GPIO port
      • 2.Serial port
      • 3.Analog-digital converter
      • 4.Digital-Analog Converter
      • 5.EEPROM (Electrically Erasable Programmable read only memory)
      • 6.Gyro IMU(MPU6050)
      • 7.Infrared remote control
      • 8.PWM(Pulse Width Modulation)
      • 9.Servo(under construction)
      • 10.Classic Bluetooth serial port SPP
      • 11.Bluetooth low energy (BLE) serial port pass-through
      • 12.File system SPIFFS
      • 13.Add hardware partition configuration option in Arduino IDE
      • 14.Play MP3
      • 15.The usage of Wi-Fi OTA(Over-The-Air)
    • BiBoard V1 Guide
  • Communication Modules
    • Introduction (For NyBoard)
    • USB Uploader (CH340C or CH343G)
    • Dual Mode Bluetooth
    • WiFi module ESP8266
      • ESP8266 + Python Scripts Implement wireless crowd control
  • Extensible Modules
    • Introduction
    • MU Camera
    • Ultrasonic Sensor
    • Light Sensor
    • Touch Sensor
    • Gesture Sensor
    • PIR Motion Sensor
    • IR Distance Sensor
    • Voice Command Module
    • Petoi AI Vision Module
    • Advanced development and application of AI vision modules
      • Model Training
      • Model quantification
      • Model deployment
      • Training on the COCO DIY dataset
    • Robot Arm
      • Upgrade your older Bittle/Bittle X for the robotics arm gripper
    • 🎮Joystick with Micro:Bit
  • Applications
    • Melody Creation
    • Skill Creation
    • OpenCat Imitation Tutorial
    • Programmable Puppet Character
    • Tutorial for simulating Bittle In Isaac Sim
  • History
    • Upload Sketch For NyBoard (software 1.0)
  • Technical Support
    • 💾Supporting Application and Software
    • 🔧Burn Bootloader for NyBoard
    • 🛠️Useful Tools
    • 🔋Battery
  • Useful Links 🕸
    • 🔭Home of Petoi Robots
    • 🛒Shop Coding Robots
    • 💿GitHub of OpenCat
    • 🎪PetoiCamp (Forum)
    • 📽️Petoi Robot Videos
    • 📬Users' repositories
Powered by GitBook
On this page
  • 1. Run on a regular computer (Mac/Linux)
  • 2. Run on the Jetson Nano 2GB Developer kit

Was this helpful?

Export as PDF
  1. Applications

OpenCat Imitation Tutorial

Let the robot be your Avatar!

PreviousSkill CreationNextProgrammable Puppet Character

Last updated 2 years ago

Was this helpful?

In this tutorial, we will introduce how to use the Ailia in python language to implement an OpenCat robot to imitate various human body movements.

To clone or download the code from the GitHub repository, you can clone the code with the following command:

git clone https://github.com/PetoiCamp/OpenCat-Imitation

1. Run on a regular computer (Mac/Linux)

Requirements

  • Python 3.6 and later

  1. Open the Anaconda Prompt (Windows) or the Terminal (Linux / macOS) and enter the following commands to create and activate a virtual environment (the environment name is "venv", and can also be customized to other names): conda create --name venv conda activate venv

  2. Use the USB uploader or Bluetooth module to connect the robot and power it on. The computer needs to be connected to a camera device.

  3. Run the following command to start the OpenCat Imitation program:

cd {your file directory}/OpenCat-Imitation/
# set python import path
export PYTHONPATH=$PWD:$PWD/serialMaster
python opencat_imitation/imitation.py -v0

You can execute run.sh within OpenCat-Imitation/ with your shell command directly. It wraps up the above commands.

2. Run on the Jetson Nano 2GB Developer kit

You may want to run the demo on a Jetson Nano to experiment with some GPU features.

The developer kit uses a microSD card as a boot device and for main storage. It’s important to have a card that’s fast and large enough for your projects; the minimum requirement is a 32GB UHS-1 card. Many projects with Jetson Nano 2GB Developer Kit will utilize swap space on the MicroSD Card due to only 2GB physical memory. For this reason, we recommend 64GB or larger microSD cards. High-endurance microSD cards are also recommended.

2. Use a network cable to connect the Jetson Nano development board to a router or other computer hosts so that it can access the Internet.

pip install -r requirements.txt

4. Install the relevant python library files using the following command:

sudo apt install python3-pip
sudo apt install python3-matplotlib
sudo apt install python3-scipy
pip3 install cython
pip3 install numpy
sudo apt install nvidia-jetpack
pip3 install dataclasses
pip3 install pyserial

To connect the USB uploader, you need to use the following command:

sudo usermod -a -G dialout $USER to increase user rights.

It is recommended to install the IDE. For the specific installation method, please refer to the following link:

Follow to install the Ailia SDK, it will be used for pose detection. The guide mainly includes the following steps: download and install the ailia SDK and the related python library files. When downloading the Ailia SDK, you need to enter the correct email address to receive the download link address and license file. The free license is valid for only one month. The SDK is about 2GB, so it takes time to download. Move the downloaded license file (AILIA.lic) to the directory where bootstrap.py is located ({ailia sdk directory}/python), and then follow the steps to continue installing the Ailia SDK. cd {ailia sdk directory}/python python3 bootstrap.py pip3 install . Download the from this page () to the directory where bootstrap.py is located before running the following command: pip install -r requirements.txt. It may take 30 minutes.

Please refer to to record the system image file () into the microSD card and complete the system initialization.

The system image file link in the user guide () points to JetPack 4.6.1, download and burn it to a microSD card After that, system initialization may fail when the Jetson Nano is started. So we recommend using the earlier version: JetPack 4.6.

3. Clone or download the code from , and install the Ailia SDK according to , the specific method is the same as the above step 3 in Run on the host computer, but NO need to execute the statement:

5. Connect the camera and complete its configuration by referring to .

Please refer to the technical documentation to complete the setup if you use a USB camera to complete the setup.

6. Start the program, please refer to step 4 and 5 of .

Now the OpenCat imitation program can run on the Jetson Nano development board. You can refer to other relevant technical documents to improve the program's performance, such as .

Anaconda3
https://docs.anaconda.com/anaconda/install/
the guide
requirements.txt
https://github.com/axinc-ai/ailia-models
the user guide
JetPack 4.6
https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-2gb-devkit#write
GitHub
the guide
the relevant guide
the relevant technical documentation
Run on a regular computer
enabling openCV to support CUDA acceleration
Demo