Table Of ContentSystem for Self-Navigating Autonomous
Robots
Thor Eivind Svergja
Andersen
Mats Gjerset Rødseth
Master of Science in Cybernetics and Robotics
Submission date: June 2016
Supervisor: Tor Engebret Onshus, ITK
Norwegian University of Science and Technology
Department of Engineering Cybernetics
Summary
ThepurposeofthethesiswastobuildanArduino-basedrobot,whoseintendedusewas
tomapunknownareas,aswellastodevelopaserverapplicationthatcontrolsseveral
robotsandusesthegatheredinformationtoformamapofthearea. Additionally,the
wirelesscommunicationintheexistingsolutionwastobeupdatedusingstate-of-the-art
technology.
AnArduino-robotwasdesignedandbuiltusingmaterialsacquiredfromSparkfun,Elfa
DistrelecandtheCyberneticWorkshopsatNTNU.Therobotprovidesthesamefunctional-
ityasexistingrobots,butduetoanencoderthatgotbrokenduringthefinalweekofthe
thesis,thepositionestimatesdoesnotwork.
ThecommunicationprotocolwasupdatedfromBluetoothtoBluetoothSmart, using
nRF51-donglesdevelopedbyNordicSemiconductor.Thesoftwarerunningontheserver-
donglewasdevelopedintheCprogramminglanguage.
Bystudyingtheexistingserverapplication,writteninMATLAB,thegroupgotaninsight
intothesystemfunctionality.Mostofthesamefunctionalitywasimplementedinanew
serverapplicationusingtheJavaprogramminglanguage.Thesystemarchitecturewas
designedusingmodulesthattookcareofoneareaofresponsibilityeach.
ThegroupdevelopedaGraphicalUserInterface(GUI)forthesystemduringadesign
process. Usingwell-knownprinciplesandguidelinesduringthedesignphaseledtoa
GUIthathasthehumanperceptioninmind.Theuserinterfacewasdevelopedusingthe
intuitiveGUI-builderinNetBeans,andthegoalwastoinheritmostofthefunctionality
fromtheexistingsolutionbutprovidetheinformationinamoreuser-friendlyway.
i
ii
Sammendrag
Prosjektetsgjennomføringvardeltinnitretemaer.EnArduino-basertrobotskullebygges
forbrukikartleggingavukjenteområder. Videreskulleenserverapplikasjonutvikles
medmulighetforåkontrollereflereroboterisanntid,samtåkunnebrukeinformasjo-
nenrobotenesamlettilådanneetfelleskartavdataene. Itilleggskulledentrådløse
kommunikasjonenfradeneksisterendeløsningenoppdaterestilåbrukenyereteknologi.
EnArduino-robotbledesignetogbygdvedåbrukematerialerogdelerfraSparkFun,Elfa
DistrelecogdekybernetiskevekstedenevedNTNU.Robotentilbyrdensammefunksjon-
alitetensomdeeksisterenderobotene,mendadenenehjul-enkoderenbleødelagtiløpet
avdensisteukenavprosjektet,fungererikkeposisjonsestimeringiroboten.
KommunikasjonsstandardenbleoppdatertfraBluetoothtilBluetoothSmart,vedåbruke
nRF51-donglerutvikletavNordicSemiconductor.Programvarensomkjørerpåserverdon-
gelenbleutvikletiprogrammeringsspråketC.
Vedåstuderedeneksisterendeserverapplikasjonen,skrevetiMATLAB,tilegnetgruppen
segeninnsiktisystemetsfunksjonalitet.Mestepartenavdensammefunksjonalitetenble
implementertiennyserverapplikasjonutvikletiJava.Systemarkitekturenbledesignet
vedhjelpavmoduler,oghvermodulhaddehvertsittunikeansvarsområde.
Gruppenforetokenomfattendedesignprosessforåutvikledetgrafiskebrukergrensesnittet
tilsystemet. Vedåbrukevelkjenteprinsipperogretningslinjerunderutformingen,ble
brukergrensesnittetdesignetmedmennesketsoppfattelsesevneifokus.Brukergrensesnittet
bleutvikletvedhjelpavenGUI-builderiutviklingsverktøyetNetBeans,ogmåletvarå
implementereallfunksjonalitetenfradeneksisterendeløsningen,menpresenteredenne
påenmerbrukervennligmåte.
iii
iv
Conclusion
DuringtheMasterThesis,thegrouphasdevelopedaserverapplicationandaGraphical
UserInterfaceinJava,softwareforannRF51-dongleinC,aswellasbuiltanArduino-
robot. Thedifferentpartsoftheprojectseemstobegoodsolutionstotheproblem
descriptionthegroupmadeatprojectstart.
ChoosingJavaasprogrammingplatformfacilitatedaclearstructureofthecodeand
providedfunctionalityfordividingthesystemintomodules.Theserverapplicationis
developedintermsoftheguidelinesin“CodeComplete”,andisstructuredinaway
thatmakesiteasyforfutureprojectstounderstandandfurtherdevelopthesoftwareby
addingnewfunctionality.Thecodeisgeneralised,sothatitispossibletoaddrobotswith
differentspecificationsthantheonesalreadyexisting,e.g.arobotwithmorethanfour
infraredsensors.Theserverapplicationinheritsmostofthefunctionalityimplemented
inprevioussolutions,however,inourimplementationthesystemisprocessingdataand
controllingtheconnectedrobotsinreal-time.
Theuserinterfaceisdevelopedduringadesignprocesswherethehumanperception
has been in focus. The process has helped the group focus on the aspects that are
importantwhendesigningagraphicaluserinterface,andthefinalproductinheritsmost
ofthefunctionalityprovidedintheprevioussolutions,butpresentstheminamore
user-friendlyway.
ChoosingBluetoothSmartascommunicationprotocolenabledfast,short-rangeand
lowpowerconsumingcommunication.Theprotocolwasnotknowntothegroupsat
beforehand,butbystudyingthestandard,thegroupsmanagedtoimplementitintothe
system.Theserver-donglereceivesandprocessesfivemessagespersecondfromeach
robotconnected,anddeliversupdateandstatusmessagestotherobotdependenton
theserverapplicationstate.Thecommunicationrangesuitedforthesystemislessthan
15metersbetweentheserverandtheconnectedrobots,thistoensurethatallmessages
arereceived.
Thegrouphasbuiltanewrobot,increasingtheexistingcollectionofrobots.Therobot
usesanArduinoasthemicrocomputeranditisbuiltusingthesamewheels, gears,
infraredsensors,towerandintertialmeasurementunitastheAVR-robot. UsingAVR-
dudeenabledtheArduino-robottousethesamereal-timeoperatingsystemasrunning
ontheAVR-robot,withouthavingtorewritetoomuchofthecode. Oneofthewheel
v
encoders got damaged during the last week of the project, and therefore it cannot
estimateitspositionatthispointintime. Otherthanthebrokenencoder,therobot
worksasintendedandisthereforesuccessfullybuiltandimplemented.
Duringtheprojectperiod,thegrouphasgainedusefulexperienceregardingproject
managementandimplementation.As“SystemforSelf-NavigatingAutonomousRobots”
isapartofasystemconsistingofthreedependentprojects,thekeytosuccesshasbeen
communicationandcooperation.Regularconversationsandmeetingswithboththe
employerandtheothergroupsworkingwiththesystemhaveenabledeffectivesolving
ofanychangestotheprojecttasks.UsingGitasversioncontroltoolforthedeveloping
ofthesoftwaremadeitpossibleforseveralgroupstoworkonthesameapplication.
Comparedtothescopeoftheproject,thegroupispleasedwiththetechnicalresult.The
solutionmeetsalltherequirementsoftechnicalfunctionalityandthesolutionseems
tobeamodernisedsolutioncomparedtothepriorimplementationsofthesystem.
UpdatingthecommunicationstandardfromBluetoothtoBluetoothSmart,rebuilding
theserverapplicationfromMATLABtoJava,andbuildinganewrobotbasedonan
Arduinomicrocomputercanallbesaidtoextendthesysteminaprovidentway.
vi
Acknowledgements
Thismasterthesisendsatwo-yearMaster’sdegreeprogrammeforCyberneticsand
Robotics at The NorwegianUniversity ofScienceandTechnology, Trondheim. The
thesisconstitutesthebasisforevaluationofthesubject“TTK4900TekniskKybernetikk,
Masteroppgave”,anditcounts30pforeachstudent.
AspecialthankstooursupervisorandemployerTorEngebretOnshus, professorat
TheDepartmentofEngineeringCybernetics. Onshushasfacilitatedagooddialogue
throughouttheprojectperiodandhaslaidasolidfoundationfortheimplementationof
thisproject.
Thegroupwouldliketothankthetwoothercooperatingparties,ErlendEseandEirik
Thon,forgreatteamwork.Withoutourclosecooperationduringtheprojectperiod,the
resultingproductwouldnothavebeenasgoodasitbecame.
Further,athankgoesouttotheguysatboththeCyberneticsMechanicalWorkshop
andtheCyberneticsElectronicWorkshop.TheMechanicalWorkshophasprovidedus
withmechanicalparts,whiletheElectronicWorkshophasprovidedasafeenvironment
forbuildingandsolderingtherobot,aswellaselectronicpartsneededthroughoutthe
projectperiod.
FinallywewouldliketothanktheguysatofficeB117,forprovidingasocialandengaging
workingenvironment.
“Donotseektofollowinthefootstepsofothers,instead,seekwhatthey
sought.”
-MatsuoBasho
.................................... ....................................
MatsGjersetRødseth ThorEivindSvergjaAndersen
matsroedseth@hotmail.no te@svergja.com
vii
viii