the room mapping robot - projects @ ru · the room mapping robot final presentation...

20
The Room Mapping Robot Final Presentation Konráð Guðmundsson Ingi Steinn Guðmundsson Gunnar Sigurðsson Guðjón Ingi Gunnlaugsson Department of Computer Science Reykjavik University T-411-MECH November 9, 2012

Upload: lenga

Post on 14-Jul-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

The Room Mapping RobotFinal Presentation

Konráð GuðmundssonIngi Steinn Guðmundsson

Gunnar SigurðssonGuðjón Ingi Gunnlaugsson

Department of Computer ScienceReykjavik University

T-411-MECH

November 9, 2012

Page 2: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Overview

IntroductionRequirementsSolutionsOur solutionDesign

The iRobot Create interfaceController Arduino Software IController Arduino Software IIMPU Arduino Software IMPU Arduino Software IIBill of materials (BOM)

Current StatusSummaryReferences

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 2/20

Page 3: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Introduction

In situations where information is needed about potentiallydangerous or fatal environments, the Room Mapping Robotcan go where a human cannot. It has the potential to map outa room, transmitting the layout back to a computer screenwhere it can be read and interpreted safely without a humanhaving ever gone into the environment in question.A realistic scenario would be, for example, a chemical spill or agas leak in an enclosed environment. Instead of sending in areal person the RMR could be deployed. An operator wouldobserve the data sent back by the RMR to the controllercomputer, eventually resulting in the full layout of the room.Additionally, cameras or additional sensors could be attachedto the RMR so it could send visual imagery back to theoperator, informing the operator of injured persons or potentialhazards.

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 3/20

Page 4: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Requirements

For the RMR to be considered successful (aside from being cheap)it needs to fulfill the following requirements:

1. A way to start the RMR remotely so a person isn’t put inneedless danger.

2. Once started, it should proceed to find the nearest wall anduse that as a starting point.

3. Position itself so it is orthogonal to the wall.4. Follow the wall, adjusting itself when it veers off course,

maintaining its distance from the wall.5. Upon encountering another wall it should be able to realize it

is in a corner, and start tracing the new wall.6. While doing all of the above, send data back to a computer

which interprets the data and creates a map of the room.

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 4/20

Page 5: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Solutions

We are not the first ones to attempt a mapping robot using aRoomba as a template. Many similar projects and experiments canbe found on online. They share a similar goal, to map out a room.The approaches taken are very different and the cost of the projectsas well:

The Roomba SLAM project [1] uses a URG-04LX laser formap generation.The laser [2] alone costs around $2400.Total cost around $3000.The RoombaNet project [3] uses a neural net / network tocontrol the Roomba.Cost is between $250-$350.Data is not interpreted into a map.

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 5/20

Page 6: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Our solution

With our RMR project we’ve tried to combine the requirements weput forward at the beginning of the project, using cheap parts.Skrifa hér um hvers vegna okkar solution er betra eða gæti veriðbetra.

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 6/20

Page 7: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Bill of Materials (BOM)

iRobot Create w. battery and charger $2303-Axis Gyro/Accelerometer IC - MPU-6050 - $203x Sharp Distance Sensor 2Y0A21 (10-80cm) - 3x $12 = $362x Arduino UNO 2x $60Arduino WiFi Shield $85Platform materials $̃15Misc fastening bolts and nuts $5Misc Wires and Connectors $25Total cost: $476

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 7/20

Page 8: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

The iRobot Create

Figure : The iRobot Create

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 8/20

Page 9: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Design: The iRobot Create interface

In order to establish an interface between the iRobot Create andour Arduino we had to build a serial connector which plugged in tothe Roomba. We figured out which pins were needed using theiRobot Roomba spec sheet [4], and fabricated a connector whichwe could use to interface with the Roomba.

Figure : The serial connector

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 9/20

Page 10: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Design: The Platform I

Since we are using a number of different sensors and two Arduinoswe had to fabricate a platform that could hold all the hardware andkeep it in place. The Roomba already had four holes for a mountwhich we wanted to make use of.The platform consists of:

1 10x23cm plexiglass plate

1 5x15 plexiglas plate

3 Aluminum angle bracket mounts

30 screws of different sizes

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 10/20

Page 11: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Design: The Platform II

We measured the distance between them and cut a plate out ofplexiglass which could cover all of them. We also needed anothernarrow plexiglass extension plate for the front IR sensor so we couldmount it as close to the edge of the Roomba as possible.The sensors needed their own independent mounts which wouldthen be attached to the plate. Those were made using threealuminum angle mount brackets. Four holes were drilled into theplate so we could mount it to the Roomba. In addition, we drilledholes for sensor bracket mounts, two Arduinos, and holes for amakeshift breadboard which we then mounted between theArduinos.

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 11/20

Page 12: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Design: The Platform III

Figure : Mounting the platform

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 12/20

Page 13: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Design: Controller Arduino Software I

Using the iRobot spec sheet [4], and Foley’s Roomba library [5] asa reference, we wrote our own Roomba library to issue commandsto the Roomba.Our library includes:

An interface which sends commands to the RoombaPredermined values (bytes) are sent which the Roombainterprets and lets us control it.

A WiFi interface which communicates with our controllercomputer.The WiFi Arduino acts as a server which can receivecommands.

An interface for the IR sensor array.The interface queries the sensors for data when it is needed bythe Roomba.

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 13/20

Page 14: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Design: Controller Arduino Software II

An interface for the MPU6050 accelerometer.The Roomba can query the MPU Arduino for data by sendinga signal to it which returns the current degree the MPU6050senses.

An Arduino sketch which contains all the logic for the mappingfunctions of the Roomba.This sketch uses all of the above to navigate the Roombaalong walls. It also sees to it that the data generated by theRMR is sent back to the controller computer.

This library/sketch resides on the Controller Arduino board.

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 14/20

Page 15: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Design: MPU Arduino Software I

Early on we ran into a problem with our MPU6050 accelerometer.It generated so much data that the host Arduino could not issuecommands to the Roomba or do much of anything else.We solved that problem by adding a second Arduino to theRoomba who’s only job was to read sensor data. Data transfers tothe Controller Arduino are handled through the I2C protocol(Software Serial)The MPU Arduino requires its own bit of software which includes:

A heavily modified version of an example MPU6050 sketch [6].

A software based low pass filter which smooths the datagenerated by the MPU6050 before it is sent to the ControllerArduino. This is needed since the MPU6050 has a tendency tospike while generating data. We enlarged its value buffer,otherwise there were overflow problems.

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 15/20

Page 16: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Design: MPU Arduino Software II

A I2C Software Serial listener which waits for signal from theRoomba and sends the current degree value to the ControllerArduino.

This sketch resides on the MPU Arduino board.

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 16/20

Page 17: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Current Status

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 17/20

Page 18: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

Summary

The project is currently in the idea stage. We have determinedmost of the challenges and problems with the project and are justnow starting to move into development of the RMR. The biggestchallenge is without question the mapping algorithm. A suitablealgorithm must be found to map out the room and a connectionmust be established between the arduino interfacing with theiRobot and a controller computer which accepts mapping data fromthe iRobot and processes it.

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 18/20

Page 19: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

References I

B. Gerkey, “Mapping with the irobot roomba,” March 2006.[Online]. Available:http://www.ai.sri.com/~gerkey/roomba/index.html#links

[Online]. Available: http://www.robotshop.com/ca/hokuyo-urg-04lx-laser-rangefinder-2.html/

B. Adams, “Roombanet,” Jan 25 2006. [Online]. Available:http://people.csail.mit.edu/bpadams/roomba/

“irobot roomba serial command interface (sci) specification.”[Online]. Available: http://www.irobot.com/images/consumer/hacker/roomba_sci_spec_manual.pdf

J. Foley, “arduino-roomba.” [Online]. Available:https://code.google.com/p/arduino-roomba/source/checkout

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 19/20

Page 20: The Room Mapping Robot - projects @ RU · The Room Mapping Robot Final Presentation KonráðGuðmundsson IngiSteinnGuðmundsson GunnarSigurðsson ... Controller Arduino Software I

References II

“Mpu6050 dmp6 sketch.” [Online]. Available: https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/Examples/MPU6050_DMP6/MPU6050_DMP6.ino

K.Guðmundsson, I.S.Guðmundsson, G.Sigurðsson, G.I.Gunnlaugsson, RU The Room Mapping Robot, Final Presentation 20/20