Petoi Doc Center
🇹🇭 Thai
🇹🇭 Thai
  • ยินดีต้อนรับสู่ Petoi Doc Center
  • Infrared Remote
    • รีโมทคอนโทรล
  • Mobile App
    • คาลิเบเตอร์และคอนโทรลเลอร์
  • Desktop APP
    • การแนะนำเบื้องต้น
    • ตัวอัปโหลดเฟิร์มแวร์
    • การคาลิเบรทข้อต่อ
    • สกิลคอมโพสเซอร์
  • Arduino IDE
    • อัปโหลด Sketch สำหรับ NyBoard
    • อัปโหลด Sketch สำหรับ BiBoard
    • การคาลิเบรทด้วย Arduino IDE
    • ซีเรียลมอนิเตอร์
  • API
    • 🖇️ซีเรียลโปรโตคอล
    • 🐍คู่มือผู้ใช้ Python SerialMaster
    • 🐛MicroPython คอนโทรลเลอร์
      • การเรียกใช้ MicroPython บน ESP8266
      • ติดตั้ง WebREPL
      • การใช้โปรโตคอล ESP-NOW
    • 🍓การสื่อสารผ่านพอร์ตซีเรียลของ Raspberry Pi
    • 🤖ROS
  • Nyboard
    • NyBoard V1_0
    • NyBoard V1_1
  • BIBOARD
    • คู่มือเริ่มต้นใช้งาน BiBoard ฉบับรวบลัด
    • 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)
  • Communication Modules
    • Introduction
    • USB Uploader (CH340C or CH343G)
    • Dual Mode Bluetooth
    • WiFi ESP8266
      • ESP8266 + Python Scripts Implement wireless crowd control
  • Extensible Modules
    • Introduction
    • MU Camera
    • Ultrasonic Sensor
    • Light Sensor
    • Touch Sensor
    • Gesture Sensor
    • PIR Motion Sensor
  • Applications
    • Skill Creation
    • OpenCat Imitation Tutorial
    • Programmable Puppet Character
  • History
    • Upload Sketch For NyBoard (software 1.0)
  • Technical Support
    • 🛠️Supporting Application and Software
    • 🙋‍♂️FAQ(Frequently Asked Questions)
  • Useful Links 🕸
    • 🔭Official Site of Petoi
    • 💿GitHub of OpenCat
    • 🎪PetoiCamp (Forum)
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