Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
ROS Robotics Projects

You're reading from  ROS Robotics Projects

Product type Book
Published in Mar 2017
Publisher Packt
ISBN-13 9781783554713
Pages 452 pages
Edition 1st Edition
Languages
Concepts

Table of Contents (20) Chapters

ROS Robotics Projects
Credits
About the Author
Acknowledgements
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Getting Started with ROS Robotics Application Development Face Detection and Tracking Using ROS, OpenCV and Dynamixel Servos Building a Siri-Like Chatbot in ROS Controlling Embedded Boards Using ROS Teleoperate a Robot Using Hand Gestures Object Detection and Recognition Deep Learning Using ROS and TensorFlow ROS on MATLAB and Android Building an Autonomous Mobile Robot Creating a Self-Driving Car Using ROS Teleoperating a Robot Using a VR Headset and Leap Motion Controlling Your Robots over the Web

Chapter 3. Building a Siri-Like Chatbot in ROS

Artificial intelligence, machine learning, and deep learning are getting very popular nowadays. All these technologies are linked, and the common goal is to mimic human intelligence. There are numerous applications for these fields; some of the relevant ones are as follows:

  • Logical reasoning: This will generate logical conclusions from existing data. Reasoning using AI techniques is widely used in areas such as robotics, computer vision, and analytics.

  • Knowledge representation: This is the study of how a computer could store knowledge fragments like our brains do. This is possible using AI techniques.

  • Planning: This concept is heavily used in robotics; there are AI algorithms such as A* (star) and Dijkstra for planning a robot's path from its current position to a goal position. It is also heavily used in swarm robotics for robot planning.

  • Learning: Humans can learn, right? What about machines? Using machine learning techniques, we can train...

Social robots


In simple words, social robots are personal companions or assistive robots that can interact with human beings using speech, vision, and gestures. These robots behave like pets that can express emotions like us and can communicate their emotions using speech or gestures.

Nowadays, most social robots have an LCD display on their heads, actuators for movement, speakers and microphone for communication, and cameras for perception.

Here are some images of popular social robots:

Figure 1: Famous social robots

Let's learn about them:

  • Kismet (a): This is a social robot from MIT by Dr. Cynthia Breazeal and team, made in the 1990s. Kismet can identify people and objects and simulate different emotions. Kismet was just a research robot, not a commercial product.

  • Jibo (b): Jibo was conceived by Dr. Cynthia and team in 2014. Jibo has a rotating head with a screen, and it can communicate with people using speech recognition and can recognize them using perception techniques.

  • Pepper (c): Pepper...

Building social robots


A service or social robot may have capabilities to perceive the world using inbuilt cameras, interact with humans using speech and make decisions using artificial intelligence algorithms. These kinds of robots are a bit complicated in design, we can see a typical building block diagram of a social robot in the following figure.

Figure 2: Block diagram of a typical social robot

The robot has sensors such as tactile sensor, camera, microphone, and touch screen and will have some actuators for its movement. The actuators will help the robot to move its head or body. There may be mobile service robots which has extra motors for navigation.

Inside the software block, you may can find modules for perception which handle camera data and finding necessary objects from the scene, speech recognition/synthesis, artificial intelligence modules, robot controller modules for controlling the actuators, decision-making node which combine all data from sensors and makes the final decision...

Prerequisites


Here are the prerequisites for doing this project:

  • Ubuntu 16.04 LTS

  • Python 2.7

  • PyAIML: AIML interpreter in Python

  • ROS Kinetic

  • The sound_play ROS package: text-to-speech package in ROS

Let's get start with AIML.

Getting started with AIML


AIML (Artificial Intelligence Markup Language) is an XML-based language to store segments of knowledge inside XML tags. AIML files help us store knowledge in a structured way so that we can easily access it whenever required.

AIML was developed by Richard Wallace and the free software community worldwide between 1995 and 2002. You may have heard about chatter bots such as Artificial Linguistic Internet Computer Entity (A.L.I.C.E.) and ELIZA. AIML is the base of these chatter bots. The dataset of the A.L.I.C.E. chatter bot is available under the GNU GPL license, and there are open source AIML interpreters available in C++, Python, Java, and Ruby. We can use these interpreters to feed our input to the knowledge base and retrieve the best possible reply from it.

AIML tags

There is a set of AIML tags to represent knowledge inside files. The following are some of the important tags and their uses:

  • <aiml>: Each AIML file starts with this tag and ends with the <...

Questions


  • What are the various applications of AI in robotics?

  • What is AIML and why is it used?

  • What is a pattern and template in AIML?

  • What is PyAIML and what are its functions?

Summary


In this chapter, we discussed building a ROS package to make a robot interactive using artificial intelligence. Using this package, we can talk to a robot and the robot can answer your queries, like human-to-human interaction. The entire chapter was about building this communication system using AIML, which is the main component of this project. We discussed AIML tags, how to work with AIML files using Python, and ultimately, how to build a ROS package based on AIML for an interactive robot. In the next chapter, we will discuss interfacing boards with the ROS.

lock icon The rest of the chapter is locked
You have been reading a chapter from
ROS Robotics Projects
Published in: Mar 2017 Publisher: Packt ISBN-13: 9781783554713
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}