9
Toward a Design for Teaching Cognitive Robotics Oskars J. Rieksts and Matthew D. Tothero Kutztown University [email protected] and [email protected] ABSTRACT Teaching cognitive robotics presents special challenges for universities with budget limitations. We discuss the key concepts to be taught, we specify the hardware and software desiderata, and propose a solution. KEY WORDS Robotics, embodied cognition, . . ? . . 1. Introduction Design and implementation of robotics is advancing at a breakneck speed. And embedded software plays a significant role. Thus, courses in robotics software, especially cognitive robotics, belong in the curriculum of all computer science departments. Obtaining affordable robots to support such courses presents a special problem to smaller universities. To properly teach cognitive robotics the robot used should meet several criteria. Among them are these. The design must take into account the principles of embodied cognition, permit the incorporation of the agent- principal paradigm, permit the construction of a clear ontology, and permit the construction of a clear epistemology. In addition, the ontological and epistemological structure must allow the formation of concepts which support the required agent-principal interaction. Agent, to be fully functional as an agent must be able to operate within its prescribe environment . . . this leads to a recognition of the importance of embodied cognition. 2. Embodied Cognition The important role of embodiment in the cognition is now widely recognized by philosophers [1] [2], psychologists [3] [4] and roboticists [5] [6]. The natural question to ask is – what are the properties a robot must have in order to facilitate teaching embodied cognition is a robotics course? This question is best answered by focusing on four basic concepts – perceive, conceive, believe and achieve – and their interplay in cognitive robotics. 2.1. Perceive The embodied robot is equipped with sensors which provide sensa (sensory data). The process of receiving sensa, processing them and internalizing the informational content is perception. 2.2. Conceive The cognitive robot must have a conceptual apparatus. It must be able to formulate concepts and maintain them

ENTER TITLE HERE (14-POINT TYPE SIZE, UPPERCASE, BOLD …faculty.kutztown.edu/rieksts/robotics/paper-v6.doc  · Web viewThe client/server scripts were written in Python 3. The Finch

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ENTER TITLE HERE (14-POINT TYPE SIZE, UPPERCASE, BOLD …faculty.kutztown.edu/rieksts/robotics/paper-v6.doc  · Web viewThe client/server scripts were written in Python 3. The Finch

Toward a Design for Teaching Cognitive Robotics

Oskars J. Rieksts and Matthew D. TotheroKutztown University

[email protected] and [email protected]

ABSTRACTTeaching cognitive robotics presents special challenges for universities with budget limitations. We discuss the key concepts to be taught, we specify the hardware and software desiderata, and propose a solution.

KEY WORDSRobotics, embodied cognition, . . ? . .

1. Introduction

Design and implementation of robotics is advancing at a breakneck speed. And embedded software plays a significant role. Thus, courses in robotics software, especially cognitive robotics, belong in the curriculum of all computer science departments. Obtaining affordable robots to support such courses presents a special problem to smaller universities.

To properly teach cognitive robotics the robot used should meet several criteria. Among them are these. The design must take into account the principles of embodied cognition, permit the incorporation of the agent-principal paradigm, permit the construction of a clear ontology, and permit the construction of a clear epistemology. In addition, the ontological and epistemological structure must allow the formation of concepts which support the required agent-principal interaction.

Agent, to be fully functional as an agent must be able to operate within its prescribe environment . . . this leads to a recognition of the importance of embodied cognition.

2. Embodied Cognition

The important role of embodiment in the cognition is now widely recognized by philosophers [1] [2], psychologists [3] [4] and roboticists [5] [6]. The natural question to ask is – what are the properties a robot must have in order to facilitate teaching embodied cognition is a robotics course?

This question is best answered by focusing on four basic concepts – perceive, conceive, believe and achieve – and their interplay in cognitive robotics.

2.1. Perceive

The embodied robot is equipped with sensors which provide sensa (sensory data). The process of receiving sensa, processing them and internalizing the informational content is perception.

2.2. Conceive

The cognitive robot must have a conceptual apparatus. It must be able to formulate concepts and maintain them in a conceptual framework. We will refer to these cognitive units as cognita. These cognita must be related to the real world and to its set of possible actions.

2.3. Believe

The cognitive robot must have an awareness of the world, of itself, and of its relationship to the world. Since it can never have perfect knowledge, it must have storehouse of what it believes to be true and a method for adding to, subtracting from, and correcting that storehouse.

2.4. Achieve

We assume that the robot is designed and constructed for a purpose. There are a set of actions and tasks that it is expected to perform; i.e., there are things it must achieve.

3. The Eight Laws of Cognitive Robotics

When designing a robot for the purpose of teaching, as also when assessing a robot’s usefulness for that purpose, these four aspects of the robot must bear a certain relationship to each other. We will call these the Laws of Cognitive Robotics. Keep in mind that they are laws in the sense of design principles, not laws in the absolute sense.

These laws are stated in the negative. For example, the first law is: The cognitive robot cannot conceive what it cannot perceive.

3.1. Cannot conceive what it cannot perceive

Sensory suite (the receipt and processing of sensa) must support cognitive unit of the robot. If a chair is to be in its

Page 2: ENTER TITLE HERE (14-POINT TYPE SIZE, UPPERCASE, BOLD …faculty.kutztown.edu/rieksts/robotics/paper-v6.doc  · Web viewThe client/server scripts were written in Python 3. The Finch

ken, sensory apparatus must be capable of sending sufficient data to recognize a chair. Or, more likely in the case of simpler teaching robots, if large, small and medium objects are to be in its ontology, robot must be capable of detecting objects unequivocally and determining rough sizes.

Shapiro [2] states, “The properties of an organism’s body limit or constrain the concepts an organism can acquire. That is, the concepts on which an organism relies to understand its surrounding world depend on the kind of body it has.”

3.2. Cannot perceive what it cannot conceive

Since perception is not only receiving sensa, but also processing it, there must a cognitive repository for that data. And the sensory apparatus should also be guided by the robot’s cognitive framework. If it is to perceive a round ball, it needs to have the concept “round ball.”

3.3. Cannot perceive what it cannot believe

The purpose of receiving and processing sensa is to ascertain information about the world. There must be a tight coupling of world and mind. Percepts must inform the robot’s epistemology.

3.4. Cannot believe what it cannot perceive

As pointed out by the proponents of embodied cognition, the knowledge structures of the robot must be directly tied to its sensory suite. A unit of knowledge must be either directly verifiable perceptually; or it must be verifiable via a line of reasoning proceeding from percept to knowledge. Noe’s [1] concept of action in perception is that “to be a perceiver is to understand, implicitly, the effects of movement on sensory stimulation.”

3.5. Cannot conceive what it cannot believe

By Ockham’s Razor, cognita should be directly connected to potential units of knowledge. There is no need to supply the robot with the notion of Santa Claus.

3.6. Cannot believe what it cannot conceive

Epistemological entities should be directly connected to cognita. A robot cannot gain knowledge about the color of round balls if it has no concept of ‘ball’ and of shape and of color.

3.7. Cannot achieve what it cannot conceive

Behaviors should be connected to cognita. Within the agent-principal paradigm discussed below, we want the

robot to act in a purposeful and deliberate manner. If we ask it to go down the hall into the 3rd room on the left, we must design its conceptual apparatus to comprehend that directive.

3.8. Cannot conceive what it cannot achieve

Applying Ockham’s Razor again, it is fruitless to fill the robot’s head with all sorts of useless knowledge. Or, as Rodney Brooks [7] said, “Elephants don’t play chess.”

4. The Agent-Principal Paradigm

The most effective model for the cognitive robot is the agent-principal paradigm (A-P, for short). The robot, as the agent, works under the direction of the principal. Thus, it is not entirely autonomous but, as a cognitive entity, it is capable of carrying out broad directives on its own.

This paradigm has a number of important implications for the cognitive robot. We explore them by looking at two examples/metaphors.

4.1. Hunter-hunting dog metaphor

Ideally, the hunter and the hunting dog work as a team. The advantage is that each makes a unique contribution to the team precisely because of their differences. Among these is the mismatch between visual and olfactory capabilities in dog and man. Humans have a more highly developed visual cortex; dogs have a more extensive olfactory cortex. They have very different perceptions and understanding of the world. One could even say, from a purely philosophical perspective, that they exist in separate worlds. Yet, though each has its own unique ontology and epistemology, there is sufficient overlap for them to achieve common goals.

4.2. Eisenhower-Roosevelt example

During World War 2, when Eisenhower was appointed Supreme Allied Commander, he was given this directive from President Roosevelt, “You will invade the European continent and defeat the Nazi war machine.” Here we see the essence of the P-A relationship. A broad directive was given by the principal (Roosevelt) with details to be filled in by the agent (Eisenhower).

5. Implementing the A-P Paradigm

There is no need to try to give a robot the exact same ontology and epistemological structure as that of humans. In fact, that would be counterproductive, since it would actually limit the robot’s usefulness within the agent-

Page 3: ENTER TITLE HERE (14-POINT TYPE SIZE, UPPERCASE, BOLD …faculty.kutztown.edu/rieksts/robotics/paper-v6.doc  · Web viewThe client/server scripts were written in Python 3. The Finch

principal structure. With a vast array of sensors available for robot design, the robot’s ability to perceive things that humans cannot (e.g., RFID signals) can be extremely useful. And seeking to reproduce within the robot all human-like qualities can become a fool’s errand. No hunter would lament that he cannot sit evenings and discuss the relative merits of this or that rifle.

The key, then, is to find the right niche for the robot to inhabit, develop the area of overlap which allows agent and principal to establish shared goals, and create a system of communication capable of passing directives to the robot and of passing information back and forth between agent and principal.

5.1. The Finch

The Finch (Figure 1) is a robot designed for the educational setting. Quoting from their website [8], “The Finch is a new robot for computer science education. Its design is the result of a four year study at Carnegie Mellon's CREATE lab.” As it was designed for education and could accommodate the Raspberry Pi onboard, we started our investigations with this robot. It was also the robot being used in a robotics course taught by the first author.

Figure 1: The Finch, as it comes out of the box

Using a shell design from FinchRobot we placed the Raspberry Pi in piggyback fashion on the Finch (Figure 2). As described below, the agent software resided on the Pi and the principal software on a laptop. A client-server architecture provided the A-P communication system.

5.2. Raspberry Pi onboard

Raspberry Pi provides the mobile setup. It has 100% functionality compared to a normal desktop computer. It is SSH enabled for communication with other devices – in

this case the laptop housing the principal. It is FTP enabled for easy file access.

The operating system is Debian, which comes standard with all Raspberry Pis. We chose to use Python 3, which was loaded and installed on the Pi.

5.2. Client-server architecture

The key to A-P architecture was to completely separate agent functionality from that of the principal, yet to maintain the ability to communicate both ways. This was implemented with a client-server architecture. The client (i.e., the principal) resided on the laptop. The server (i.e., the agent) resided on the Pi.

The server handles directives from the principal and sends responses back. Meanwhile, the server has direct communication with the hardware components by executing the Finch API in Python (one of the many languages supported by Finch).

Figure 2: The Finch with onboard Raspberry Pi

Page 4: ENTER TITLE HERE (14-POINT TYPE SIZE, UPPERCASE, BOLD …faculty.kutztown.edu/rieksts/robotics/paper-v6.doc  · Web viewThe client/server scripts were written in Python 3. The Finch

5.3. Setup details

A battery pack was used to charge the mobile Finch setup. And, since both robot and Pi needed power, a USB hub was used to split power sources.

To connect the Finch to the onboard computer, a wireless adapter was used implementing wifi communication. The client/server scripts were written in Python 3. The Finch provides Python libraries for communicating with the hardware.

One of our goals was a cognitive awareness of the robot’s space and the objects in it. For this we decided to use a graph database (GDB). We found that Raspberry Pi did not have sufficient computing power to handle neo4j, so OrientDB was used instead. This turned out to be a good choice since it also provides an online GUI allowing us to view the graphs created by the robot.

6. Our Mythical Man-Month Moment

A classic essay in computer science, The Mythical Man-Month [9], written by Turing Award recipient Frederick Brooks, describes the hard lessons he learned from mistakes as director of IBM’s OS360. In a sense, Finch is our mythical man-month moment. It was our experience with the Finch which led to the formulation of the 8 Laws of Cognitive Robotics (Section 3, above).

6.1. Problems with Finch

We found that we could not endow the Finch with the requisite cognitive capabilities within the context of A-P due to its physical limitations. For example, we could not establish even a simple ontology of a few basic objects and of their relationship in space. Finch’s IR sensor was sporadic, sometimes detecting the presence of an object, sometimes not.

The two wheel design with trailing USB cable made it impossible to establish an anchor point for spatial awareness. It could not leave a point of origin, go a short distance, turn 180 degrees, and then come back to that point – or even its general proximity. Even if we would attempt to establish an object for Finch to set out from and come back to, Finch could not reliably detect the presence of that object, much less recognize it as the same object. In other words, with respect to the first law (Section 3.1 above) its perceptual abilities were insufficient to form the basis for concepts of objects in its experiential space. And, with respect to the 7th and 8th

laws (Sections 3.7 and 3,8, above), Finch could not operate within the A-P paradigm because it could not

conceive of the actions necessary to carry out tasks due to perceptual and performance insufficiencies.

6.2. Lessons learned

After numerous failed attempts it became clear that another solution was required. But what features should the better solution exhibit? It was at this point that we formulated the 8 Laws of Cognitive Robotics (Section 3, above). As enunciated by the proponents of embodied cognition, there is an intimate connection between the physical body and its cognitive abilities. In real world terms, two bedrock principles emerged – any sensors had to give reliable results and any effectors had to create predictable actions, within reason. We say within reason because nothing is 100% reliable. But the physical components must be at least reliable to accommodate Brooks’ dictum, “the world is its own best representation.” [5]

7. Seeking Better Hardware

With that in mind, we began to seek hardware solutions which would meet those criteria; but would also be within reach, financially, of the budgets of computer science departments in mid-sized universities. Building a robot from scratch was too daunting a task, especially within our time constraints. So we settled on two robot kits, Initio from 4tronix and DiddyBorg from PiBorg, both of which were designed to work with Raspberry Pi. We found that each has its advantages and disadvantages.

Page 5: ENTER TITLE HERE (14-POINT TYPE SIZE, UPPERCASE, BOLD …faculty.kutztown.edu/rieksts/robotics/paper-v6.doc  · Web viewThe client/server scripts were written in Python 3. The Finch

Figure 3: 4tronic Initio with onboard Raspberry Pi

7.1. Initio

The body of the Initio (Figure 3) is plastic and it comes with some components pre-built. The instructions provided were rather unclear making its assembly harder than otherwise necessary.Sensors are provided. The ultrasonic sensor used for collision detection which is very accurate, as compared to the IR sensor of the Finch. It is mounted on a pan and tilt wheel which we use to get the location, relative to the robot itself, of detected objects. With four wheels, a heavier body, and more accurate propulsion, it can achieve the goal of reliability in moving about its environment.

7.3. DiddyBorg

The DiddyBorg (Figure 4) is the most expensive of the three robots. And it comes with no sensors. On the other hand, it has a very durable construction and, with six wheels it has good stability and strong propulsion. Although building it requires skill such as soldering, the instructions were clean and to the point.

Figure 4: PiBorg DiddyBorg with onboard Raspberry Pi

The absence of sensors is not a problem as it has ample provision for adding sensors. An ultrasonic sensor compatible with Raspberry Pi is in hand and replicating the A-P with the client-server setup is in the works.

8. Experiences

At this point in time we are in the experimental stage with both the Initio and the DiddyBorg. In their current form neither of them support Python 3, so it because necessary,

Page 6: ENTER TITLE HERE (14-POINT TYPE SIZE, UPPERCASE, BOLD …faculty.kutztown.edu/rieksts/robotics/paper-v6.doc  · Web viewThe client/server scripts were written in Python 3. The Finch

due to incompatibilities between the two version of Python, to rewrite the software in Python 2, not without difficulties.

8.1. Sensors

Comparing infrared (IR) to ultrasonic sensors, IR has difficulty picking up dark objects. On the other hand, ultrasonic sensors sometimes detect “ghosts” (non-existent objects) are prone to spectral reflectance problems. The pan and tilt of the Initio (which can also be transferred to the DiddyBorg) allows the 4tronix robot to utilize the ultrasonic sensor much like how a security camera works. The sensor is set to pan back and forth from -90 degrees to 90 degrees and back. The angle at which an object is detected is then be used to determine which side the object is on (right, left). This is a very useful feature that overcomes the sensors inability to “see” anything outside of its 30 degree limit.

8.2. Power supply

Both the 4tronix and DiddyBorg use rechargeable batteries for their power supply. This creates certain problems. Recharging takes on the order of days. Also, when batteries start running low on power, the entire system does not shut down; the services begin to shut down one by one leading to erratic behavior. For example, the SSH might shut down while other parts of the robot continue to operate.

9. Future Directions

Having made the transition to Initio and DiddyBorg we will experiment with their ability to implement the A-P paradigm, comparing and contrasting their suitability for teaching cognitive robotics within a computer science curriculum. Since both allow for expansion, we will add sensors testing their contribution to a robot’s cognitive capabilities. Among the sensors of interest are those which allow for a localized version of GPS.

Among our goals is to create a physical layout of a room and plot objects. Then, if the robot detects an object again, it can check the layout (grid) to see if it already exists. This can be done without a location sensor if the robot is reasonably accurate in its movement and its sensors can be used to verify its location in space.

We will also explore the use of a GDB for creating a topological map and a hybrid metrical/topological one, in the sense of Kuipers’ Spatial Semantic Heirarchy [9].

References

[1] A. Noe. Action in perception (Cambridge, MA: MIT Press, 2005).

[2] L. Shapiro. Embodied cognition (New York, NY: Routledge, 2011).

[3] D. Pecher and R.A. Zwaan. Grounding cognition (Cambridge: Cambridge University Press, 2010).

[4] G.M. Stratton, The spatial harmony of touch and sight, Mind, 8(32), 1899, 492-505.

[5] R.A. Brooks. Intelligence without representation. Artificial Intelligence 47 (1991), 139–159.

[6] H. Moravec. Robot: Mere machine to transcendant mind (Cambridge: Cambridge University Press, 2010).

[7] R.A. Brooks, Elephants don’t play chess, Robotics and Autonomous Systems 6 (1990) 3–15.

[8] http://www.finchrobot.com/

[9] B. Kuipers, Spatial Semantic Heirarchy, Artificial Intelligence, 1-2 (2000), pp. 191-233.