Thursday, June 25, 2015

Possible Approaches to Robot or Artificial Intelligence

With an engineering not scientific mindset, I am about to vastly simplify an extremely complex subject. With that qualification, there are two main ways we can tackle the problem of creating robot intelligence:
  1. Cognitive Robotics or Symbolic Modelling - attempts to create a model of the world in which everything can be represented by symbols. The robot controller can then parse these symbols in a manner similar to the way that a compiler creates machine code from a high level programming language. This approach suits computers, however reducing the world to symbols is a non-trivial task.
  2. Behavioural Robotics - creates emergent behaviours by having a number of prioritised responses to various situations. For example, a robot could have a behaviour which avoids walls and drops this would be a higher priority than performing a task like following a line or heading towards the brightest light. By layering behaviours on top of each other we create a system which can respond to a changing environment without having to specify what to do in exactly every circumstance.
Symbolic Modelling takes significant computing resources and isn't suited to a cheap micro-controller application. Given our constraints, this makes our choice of approach easy. Behavioural robotics is also the approach which is currently preferred by the academics (for what that is worth). More importantly, a behavioural robot can be built in stages and each behaviour debugged separately. This makes life easier and models how organisms evolve over time with increasing complexity.

The ultimate expression of behavioural robotics is to create artificial neurons which are not intrinsically intelligent but with enough connections create a neural network with emergent intelligence. We wont be attempting to crack that nut.

To design our robot intelligence we will use a behaviour diagram (from the book: Robot Programming : A Practical Guide to Behavior-Based Robotics by  Joe Jones), which looks something like the following diagram. This is a simple way to represent the robot control scheme. Input from sensors are shown on the left, these trigger behaviours which are manifested by the robot doing something (e.g. moving). The correct behaviour will be chosen by the "arbiter" based on priority.


We will develop AVA's behaviour diagram in a subsequent post.

Saturday, June 20, 2015

Introduction & Objectives

Overview

I have always been fascinated by robots and robotics. This blog will document the building of AVA. AVA is intended to be a fully autonomous robot which can react based on a number of layered behavioural patterns. I will go into the philosophy of behavioural based robotics in a subsequent post.

AVA's brains will be built using networked Arduino's. Arduino is an open-source electronics platform based on hardware which comes in a number of configurations based on your requirements and a free Integrated Development Environment (IDE) which allows you to program the microcontroller in C++.

The initial state of my robot prototype is shown in the following (overly dramatic) video.



Because I am using a behavioural approach to controlling the robot, Arduino's should give me sufficient computing power, relatively cheaply. Should I need more processing grunt the design will scale through the addition of a Raspberry Pi or PCDuino.

Even though the Arduino's have a pretty miserable clock speed (usually 16 MHz) compared to modern computer gear (e.g. even an iPhone 6 has a clock speed of 1.4 GHz), they are much better at controlling quickly changing inputs and outputs because that is all that they are doing.

Keeping with the spirit of the Arduino community, any software developed will be provided here with the appropriate permissive licences required for you to use within your own project.

Objectives

  1. Autonomous
  2. Has Voice Recognition and Voice Synthesis
  3. Knows - time, date, temperature, humidity, light level and battery charge.
  4. Will be able to perform the following tasks within a behavioural hierarchy (I will explain this):
  • Find Station and Recharge
  • Follow designated target
  • Remote control (telemetry) via WiFi
  • Patrol (challenge and video)

Micro Controllers

Master Controller



The Arduino's communicate using an I2C bus which requires only 2 wires. The master controller will be an Arduino Mega 2560 (Rev 3). Most of the sensors will connect to the Mega as will the motor control lines, quadrature encoders, voice recognition, voice synthesis and battery monitoring. I have actually used the Freetronics version of the Mega 2560 which is called the EtherMega. The EtherMega is a souped up version of the original design which includes ethernet functionality (which I'm not currently using but hey there is never such a thing as too much functionality and no doubt I will come up with some way to use it in the future). I have used Freetronics versions of the Arduino hardware where I can because of the additional functionality of their designs and to support a local Aussie company. I am going to use the Freetronic version names and official Arduino names interchangeably.

Logging, Sound Output and Input Controller



The next controller on the bus is a Freetronics "Eleven". This is a version of the Arduino Uno and controls the 128 x 128 pixel OLED Shield via the Shield Adapter. This shield includes a micro SD card, piezo buzzer and joystick controller which uses most of the digital input/outputs of the Eleven. The I2C bus connects to two of the analogue pins (A4 and A5) and the joystick position is monitored by two other (A2 and A3).

Interestingly (to me at least), the Eleven communicates with the OLED using a Serial Peripheral Interface (SPI) bus. So this Arduino is using two communication protocols at the same time, not to mention the serial interface used to program the chip via my Mac. The SPI is a 4 wire bus.

This controller will log status to the screen and microSD card, provide audio feedback via the piezo (until voice synthesis is added) and allow me to provide input via the joystick and button.



LCD and Temperature Sensor Controller


I have another Eleven connected on the I2C bus which controls a 2 x 16 character LCD via a LCD and Keypad Shield. This has a DS18B20 temperature sensor connected which uses the LCD to display the current temp. I only added this because I already had one built, but the temperature will come in handy when I add the sonar sensors since the speed of sound is effected by temperature (and barometric pressure). More on this in due course.



Real Time Clock (RTC) Module



To allow behaviours based on the time and date, the robot needs to know what the current date and time is. It is also useful for time stamping log entries. To allow this, there is a Freetronics  RTC module connected to the I2C bus.

I will do a separate post about each of the micro controllers and go into the hardware and setup configurations in depth.

Robot Platform

A robot is not much of a robot if it can't move. For AVA, movement will be provided courtesy of the Arlo Robotic Platform System from Parallax. The Arlo platform can carry up to 27kg so that should be sufficient for what I have planned.

Constructing the platform will be documented here.