MarsCat - The AI Cat Born From Raspberry Pi

MarsCat - The AI Cat Born From Raspberry Pi

Introduction

Raspberry Pi is a series of small single-board computers(SBCs) developed in the United Kingdomby the Raspberry Pi Foundation in association with Broadcom.

The Raspberry Pi project originally leaned towards the promotion of teaching basic computer science in schools and in developing countries.

The original model became more popular than anticipated, selling outside its target market for uses such as robotics.

MarsCat, an AI robot cat created by Elephant Robotics, is powered by Raspberry PI 3 B(wifi)-Quad-Core ARM Cortex-A53 CPU, 1GB ARM. The API includes Type C (Data Transmission), DC JACK (Charging Cable Interface), HDMI. Learn More

Based on the open-source Raspberry PI, Marscat is able to conduct secondary developments according to geeks' novelty ideas.

Followings are the tutorial and Python scripts for further developments based on a Raspberry Pi, which is the basis for MarsCat research.

 

Preparations

  • Connect monitor, mouse, keyboard
  • Connections: Wifi, ssh, vnc, etc

Account: pi Password: raspberry

  • Disable auto-start function before programming:
cd ~/marsai
./tools/stop-systemd-services.sh
./tools/disable-systemd-services.sh
  • Enable the auto-start function:
cd ~/marsai
./tools/enable-systemd-services.sh
./tools/start-systemd-services.sh


Download the API
cd ~
git clone https://github.com/elephantrobotics/marscatAPI.git
cd marscatAPI
Basic Movements
# file: move/movement.py
# See this file for more functions

import movement

mv = movement.MoveMent()
mv.set_walk(step = 2, speed = 0.7)
...


Touch Test

# file: sensor/touch.py

import touch

tc = touch.Touch()
tc.test_touch()


Demonstrate Eyes

# file: eye/eyedisplay.py

import eyedisplay

eyes = eyedisplay.EyeDisplay()
eyes.display_eye(ball_num = 1, lid_num = 1, ball_type = 'eye_ball', dx = 0, dy = 0)

"""
args:
ball_num --> int:
1~10
# Eyeball size
lid_num --> int:
1~10
# Eyelid size
ball_type --> str:
[eye_ball, ball, face, flip, heat, hug, teaser, voice,
low_power, charging, dizzy, bowlorhungry, sleep
high_temperature, hw_error]
# To select which folder the picture comes from
# eye/eyeball/
dx,dy --> int:
# Coordinates of eyeball
# (0, 0) in the middle
"""


Play Sound
# file: sound/catsound.py

import catsound

s = catsound.CatSound()
s.meow()

Image Recognition
# file: vision/vision_base.py

import vision_base

vision = vision_base.Vision()
vision.test()


It can recognize faces, blue balls, matching cat-friendly sticks and matching QR codes.
Voice Recognition
# file: voice/voice_base.py

import voice_base
voice_base.test_voice()


Select VoiceRecognizes Language
# file: voice/voice_base.py 28
def speak_config(self):
language = "Chinese"

Voice Wake up
Wake up words:
# file: voice/voice_base.py 142row

ACTIVATION_WORDS = [
'HI MARSCAT', 'MARSCAT', 'MASSCAT', 'MASKCAT', 'MARS',
'ASSCAT', 'MASS'
]
# file: voice/voice_base.py 152row
if ff:
Wake up successfully and enter listening mode


The files in voice/corpus/*.dic contain all the recognized words in three languages.

Testing Process

 

 

 

Leave a comment

Please note, comments must be approved before they are published

What are you looking for?