EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST …lara.eii.us.es/dcagigas/fdp/EMBEDDED SYSTEMS...

7
EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST ROBOTIC FRAMEWORKS FOR EDUCATION AND RESEARCH Preparation of a low-cost, scalable and powerful robotic framework from ROS and Roomba integration Juan M. Sierra, Second Author Name Institute of Problem Solving, University of Seville, Avda. Reina Mercedes, Seville, Spain f [email protected], s [email protected] Third Author Name Department of Computing, Main University, MySecondTown, MyCountry t [email protected] Keywords: education, research, robotic, framework, integration, low-cost, scalable Abstract: Robotic teaching and research often require a large investment in time and cost. Due to this, in the last years, a set of researchers and teachers have researched about how create or build a good robotic framework or what hardware is the best. We start from their ideas about low-cost and useful robotic environments for education and research. It gets simple functionalities with basic microcontrollers. We pursue to give one more step, we want to obtain, and we do, a full functional moving robotic environment. This paper presents a teaching and research robotic development platform based on the integration of Robotic Operating System (ROS) and iRoomba iCreate robot; its features and advantages, why use it and how to build it. 1 INTRODUCTION There has been a increase of interest in service robots during the last years. A wide range of new products are ready to be exploited by industry. One of the main differences between industrial and service robotics is that industrial robots work in structured environments (i.e. factories) where there is a high control of operations. On the other hand, service robots must adapt themselves to unstructured environments (e.g. office buildings or residential ar- eas) and usually they also have to interact with peo- ple. This obliges to add more sophisticated intelli- gent modules and devices to get their goals.(Daniel Cagigas-Muiz, 2011) In this context, is essential the education and re- search in robotic to provide the step to improve and support this stage of the service robotic. It’s needed to provide a set of students interested by robotic and the mediums to get researches and collaborations with robotic industry. However, training students and research in intelli- gent robotics requires a large investment both in time and cost. Intelligent controller development requires proficiency in many areas including math, program- ming, electronics. (Monica Anderson and Wiegand, ). The learning curve can frustrate student and do dif- ficult and slow the research. Also, full functional robotic environments have hight costs and they are usually not available for stu- dents or to provide a full class. In the same way, cheap hardware usually has few functionalities. In this context, we want to provide robotic envi- ronment to supply and improve some aspects in teach- ing and research of robotic. Our main goal is find a cheap hardware but with a wide set of useful features and abilities and build an environment to make easy the teaching and the development of complex robots without big learning curves. To realize this we propose a system integration based on iRobot Create robot, Robotic Operating Sys- tem (ROS) and BeagleBoard. This kind of integration is not a new subject, and due to that, we need to explain before the context in which we’re moving on. We don’t want to start from the beginning , we want to use another works and can give one more step in this way. So, it’s needed to tell before why we chose these systems and how works of other researchers and teachers support this work and are essentials for its development. Thus, this text is structured in five main sections. In section 2 the systems that we’ll use and the how the

Transcript of EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST …lara.eii.us.es/dcagigas/fdp/EMBEDDED SYSTEMS...

Page 1: EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST …lara.eii.us.es/dcagigas/fdp/EMBEDDED SYSTEMS INTEGRATION... · 2017-03-28 · EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST ROBOTIC

EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COSTROBOTIC FRAMEWORKS FOR EDUCATION AND RESEARCH

Preparation of a low-cost, scalable and powerful robotic framework from ROS andRoomba integration

Juan M. Sierra, Second Author NameInstitute of Problem Solving, University of Seville, Avda. Reina Mercedes, Seville, Spain

f [email protected], s [email protected]

Third Author NameDepartment of Computing, Main University, MySecondTown, MyCountry

t [email protected]

Keywords: education, research, robotic, framework, integration, low-cost, scalable

Abstract: Robotic teaching and research often require a large investment in time and cost.Due to this, in the last years, a set of researchers and teachers have researched about how create or build a goodrobotic framework or what hardware is the best. We start from their ideas about low-cost and useful roboticenvironments for education and research. It gets simple functionalities with basic microcontrollers. We pursueto give one more step, we want to obtain, and we do, a full functional moving robotic environment.This paper presents a teaching and research robotic development platform based on the integration of RoboticOperating System (ROS) and iRoomba iCreate robot; its features and advantages, why use it and how to buildit.

1 INTRODUCTION

There has been a increase of interest in servicerobots during the last years. A wide range of newproducts are ready to be exploited by industry.

One of the main differences between industrialand service robotics is that industrial robots work instructured environments (i.e. factories) where thereis a high control of operations. On the other hand,service robots must adapt themselves to unstructuredenvironments (e.g. office buildings or residential ar-eas) and usually they also have to interact with peo-ple. This obliges to add more sophisticated intelli-gent modules and devices to get their goals.(DanielCagigas-Muiz, 2011)

In this context, is essential the education and re-search in robotic to provide the step to improve andsupport this stage of the service robotic. It’s neededto provide a set of students interested by robotic andthe mediums to get researches and collaborations withrobotic industry.

However, training students and research in intelli-gent robotics requires a large investment both in timeand cost. Intelligent controller development requiresproficiency in many areas including math, program-ming, electronics. (Monica Anderson and Wiegand,

). The learning curve can frustrate student and do dif-ficult and slow the research.

Also, full functional robotic environments havehight costs and they are usually not available for stu-dents or to provide a full class. In the same way, cheaphardware usually has few functionalities.

In this context, we want to provide robotic envi-ronment to supply and improve some aspects in teach-ing and research of robotic. Our main goal is find acheap hardware but with a wide set of useful featuresand abilities and build an environment to make easythe teaching and the development of complex robotswithout big learning curves.

To realize this we propose a system integrationbased on iRobot Create robot, Robotic Operating Sys-tem (ROS) and BeagleBoard.

This kind of integration is not a new subject, anddue to that, we need to explain before the context inwhich we’re moving on. We don’t want to start fromthe beginning , we want to use another works and cangive one more step in this way. So, it’s needed to tellbefore why we chose these systems and how works ofother researchers and teachers support this work andare essentials for its development.

Thus, this text is structured in five main sections.In section 2 the systems that we’ll use and the how the

Page 2: EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST …lara.eii.us.es/dcagigas/fdp/EMBEDDED SYSTEMS INTEGRATION... · 2017-03-28 · EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST ROBOTIC

previous works and research support them. In section3 it is described the integration process of devices andsoftware installation and configuration. In section 4it is suggested an initial testing of the system integra-tion and some tools for its management. In section 5it is showed the results of the testing. Finally, someconclusions are pointed out in section 6.

2 PLATFORMS

Before, this text spoke about the integration of thesystems and the platforms iRobot Create robot, ROSand BeagleBoard. In this section the reasons of whyuse these systems are explained. The previous re-searches which support this decision are pointed outtoo.

2.1 iRobot Create Roomba

There is a wide set of development robots in the mar-ket. We need one which would be not so much ex-pensive, easy to develop for it, which a large set offunctionalities and the chance to expand it on an easyway.

At $150 off-the-shelf, the Roomba is a rugged, au-tonomous robot that operates in human-scale indoorenvironments with a sizeable sensor suite (see figure).It’s a promising alternative to many other low-costrobot platforms available for research and education,particularly for researchers and educators whose fo-cus lies in computational or applied facets of robotics.(Ben Tribelhorn, 2007)

Figure 1: Roomba sensors and actuation abilities

iCreate robot has similar sensors and actuationabilities to Roomba. It’s a development platformwithout cleaning abilities.

They are really useful for general-purpose spatial-reasoning algorithms (Ben Tribelhorn, 2007), includ-ing Monte Carlo Localization and FastSLAM, inteaching and research context.

2.2 ROS

ROS (Robotic Operating System) is a RSF frame-work. RSF or ”Robotics Middle-ware” usually pro-vide a set of drivers, a Hardware Abstraction Layer(HAL),a collection of libraries, simulations tools,message passing methods, and many other tools. Themain object of RSF is to provide a software platformto help the coding of a complex robotic system andto deploy it easily under several circumstances or ap-plications. Examples of RSF are ROS, Player/Stage,YARP, OROCOS, OpenRave, OpenRDK and manyothers.

ROS is a open-source robot meta-operating sys-tem. Is is not a full operating system because it doesnot provide all the necessary infrastructure to executeprograms. In fact, it needs a standard operating sys-tem to run on a computer.

ROS main goals are:

• Peer to peer. A system built using ROS consistsof a number of processes, potentially on a numberof different hosts, connected at runtime in a peer-to-peer topology.

• Tools-based. ROS was designed to be language-neutral. ROS currently supports four very differ-ent languages: C++, Python, Octave, and LISP,with other language ports in various states of com-pletion.

• Multi-lingual. It was opted for a microkernel de-sign, where a large number of small tools are usedto build and run the various ROS components.

• Thin.

• Free and Open-Source. ROS is distributed underthe terms of the BSD license, which allows the de-velopment of both non-commercial and commer-cial projects.

2.3 Ubuntu

At time to choose an operating system to supportROS, we can choose in a set which includes Ubuntu,OS X, ArchLinux, Fedora, Gentoo, OpenSuse, Slack-ware, Debian and other derivative operating systems.Between them we decided to use Ubuntu becauseROS was developed on Ubuntu and it’s fully sup-ported by it.

Also, Ubuntu comunity provides a good sup-port to ARM architecture (on which it’s based themost of commercial powerful devices), even a repos-itory (http://ports.ubuntu.com/ubuntu-ports/) is givento obtain and update software for ARM-architecture.

Page 3: EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST …lara.eii.us.es/dcagigas/fdp/EMBEDDED SYSTEMS INTEGRATION... · 2017-03-28 · EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST ROBOTIC

We can’t forget either that Ubuntu it’s a powerfulenvironment on where we can run a wide set of soft-ware, from desktop software to server applications,just as specific drivers for a wide set of devices. Andall of this without assume a great computational loadby the operating system.

2.4 BeagleBoard

Some researchers have used before Gumstix platform(cite player/stage and others?) to improve their hard-ware platform. Gumstix it’s powerful open-hardwareplatform which provide microcontrollers from 400MHz, 64 Mb RAM memory and a wide IO connec-tors; and it costs for from about $129 (Gumstix verdexpro).

However, we decided to use the hardware platformBeagleBoard, in its revision C4. It provides the belowcharacteristics (bea, a):

• 720MHz processor.

• 256 Mb RAM memory.

• An USB Host connector.

• DVI-D video output.

• SD/MMC card connector.

• IO connectors.

• . . .

and its cost is about $130. The cost are almost thesame, but for our purpose BeagleBoard C4 providesmore advantages than Gumstix. We must emphasizethe below:

• A wide community who develop and supportUbuntu on BeagleBoard.

• Support for ARM architecture provided byUbuntu community.

• Powerful environment which is able to run heavyapplications.

• Easy device integrations thanks to USB and serialconnectors.

Due to these things we decided to use Beagle-Board, against other devices like Gumstix, Arduinodevices or similar devices with serial or analogic con-nectors. In the market, there are too some devices use-ful for our purpose like PandaBoard or another ARM-microcontroller solutions with USB connectors.

Figure 2: BeagleBoard C4 Rev

3 SYSTEMS INTEGRATION

3.1 Building BeagleBoard environment

First, we have to build the BeagleBoard environment.To do that we need:

• a self-powered USB hub,• a screen and a keyboard (until it can be managed

remotely),• Wi-fi device through USB,• a 5V power adaptor,• and cables.

In the figure ... we can see how connect them:

Figure 3: BeagleBoard environment

The USB hub provides a good connectivitychances. There is a wide set of device in the mar-ket (and most of them are low-cost) that we can con-nect through USB connector. This hub, thanks to beself-powered, allows connect devices which need amedium or high level of energy to work; without af-fect to the BeagleBoard.

Page 4: EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST …lara.eii.us.es/dcagigas/fdp/EMBEDDED SYSTEMS INTEGRATION... · 2017-03-28 · EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST ROBOTIC

3.2 Connecting BeagleBoard to iRobotCreate robot

The second step in this project was connect physicallythe iRobot Create robot to the BeagleBoard; to pro-vide energy support to BeagleBoard and data connec-tion between them.

iRobot Create provides two connection ports. Thefirst one is a female Mini-DIN connector. Figure 1shows the diagram of the port.

Figure 4: Female Mini-DIN connector

The second one is the Cargo Bay Connector. Fig-ure 2 shows the diagram of the port.

We decided to use the Mini-DIN connector tomake the data connection between both devices be-cause Cargo Bay connector is only provided byiRobot Create, not by another Roomba robots. Thisdecision provides us the chance of use our envi-ronment with another Roomba robots, without bigchanges.

We only use Cargo Bay connector to provide anenergy source to the BeagleBoard, but we can’t con-nect it directly. We use the next circuit scheme to dothis.

In this scheme, we can choose between a linealregulator o a switching regulator to make it. We de-cide to use the switching regulator because is moreefficient than the first one. The result is showed in thenext figure:

Now, we face to provide a data connection be-tween both devices. There are several ways to solvethis problem: some commercial devices or designs tomake the device ourselves.

The industrial robot company RoboDy-namics created the RoombaDevTools site(http://roombadevtools.com) to supply Roombainterface adapters and other Roomba hacking prod-ucts. One of the most useful products is RooStick, aUSB version of the serial tether. It functions exactly

Figure 5: Female Cargo Bay connector

Figure 6: Voltage regulator scheme

the same as the serial tether, appearing as a serialdevice to the OS. It is available for around $25, withan accompanying 7-pin Mini DIN for about $16(Kurt, 2007).

3.3 Installing and configuring Ubuntu

The next step is building the ROS environment. First,we install and configure an Ubuntu operating sys-tem on BeagleBoard following the above steps led by(bea, b).

Page 5: EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST …lara.eii.us.es/dcagigas/fdp/EMBEDDED SYSTEMS INTEGRATION... · 2017-03-28 · EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST ROBOTIC

Figure 7: Create energy connection

Figure 8: RooStick from RoombaDevTools

Follow manual (mav, ), referenced by (bea, b), weget a basic Ubuntu installation on a SD card.wget http://rcn-ee.net/deb/rootfs/maverick/ubuntu-10.10-r6-minimal-armel.tar.xzxz -z ubuntu-10.10-r6-minimal-armel.tar.xztar xvf ubuntu-10.10-r6-minimal-armel.tarcd ubuntu-10.10-r6-minimal-armelsudo ./setup_sdcard.sh --mmc /dev/sdb --uboot beagle_bx -swap_file 512

The SD card is a weak medium against writingaccess. Repetitive and intense writing accesses candamage it. Due to this, after system installation wechange some system parameters, to reduce writingdisk accesses, like:

• Memory parameters: to delay the disk accesses.

• Disk parameters: mount some directories liketemporal file systems, change policies.

To adjust memory parameters that we realize thebelow steps:

echo "vm.min_free_kbytes = 8192" >> /etc/systctl.confecho "vm.swappiness = 10" >> /etc/systctl.confecho "vm.dirty_ratio = 40" >> /etc/systctl.confecho "vm.drity_writeback_centisecs = 1000" >> /etc/systctl.conf

Later, to fit disk parameters we change the file/etc/fstab and it’s as follow:

proc /proc proc defaults 0 0/dev/mmcblk0p2 / autonoatime,errors=remount-ro 0 1/dev/mmcblk0p1 /boot/uboot auto defaults 0 0

/dev/mmcblk0p3 swap swap defaults 0 0tmpfs /tmp tmpfs defaults 0 0tmpfs /var/tmp tmpfs defaults 0 0

Later, we configure the wifi access to can accessto Ubuntu repositories. We can install almost of nec-essary software and tool from these repositories (. It’san easy step thanks to the Ubuntu version, which pro-vides basic drivers for screen and wifi device.

Then, we update the system and install a set ofsoftware and driver like: development libraries (nec-essaries to ROS), graphic environment and tools (touse and check the webcam), . . .

3.4 Installing and configuring ROS

At the date of this paper, there’s not a repository ofBeagleBoard for ARM architecture. So, we installedROS from SVN following the manual (ROS, a). Weuse the version cturtle and the variant base, which in-cludes the essentials tools for use, develop and debugof ROS.

And the commands to do that are the next:

apt-get install build-essential python-yaml cmake subversion wget python-setuptools mercurialeasy_install -U rosinstallrosinstall ˜/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=cturtle&variant=base&overlay=no"echo "source ˜/ros/setup.bash" >> ˜/.bashrc

With these steps we’ll get the ROS frameworkrunning on our environment, with all its dependenciesinstalled and the basic configuration to work made.

3.5 ROS and Create integration

To make the integration between ROS and iRobotCreate robot we use the driver irobot-create-2-1, de-veloped by Brown University Robotics. We followthe steps showed in (iro, ).

wget http://brown-ros-pkg.googlecode.com/files/irobot_create_2_1.tar.bz2tar xf irobot_create_2_1.tar.bz2cp -R irobot_create_2_1 /root/ros/robot_model/rosmake irobot_create_2_1

To run the driver we only have to launch the nextcommand:

rosrun irobot_create_2_1 driver.py

This driver provides a wrap on python interface tomanage iRobot Create API. Thanks to that, we cansend orders and receive information from the robotonly using topics in ROS framework. It makes easythe management of the robot and the integration witha large set of tools and ROS software that we’ll needlater.

Page 6: EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST …lara.eii.us.es/dcagigas/fdp/EMBEDDED SYSTEMS INTEGRATION... · 2017-03-28 · EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST ROBOTIC

3.6 Optional configurations

In this point, we’re going to describe some tools andconfigurations which can be useful to manage and/orto improve the robot autonomy.

The first one is convert ROS environment in a ser-vice. This system can be configured to starts auto-matically ROS environment when the BeagleBoard ispower on, which packages or nodes must be startedwith it, to define policies about ROS service mainte-nance, etc.. To do that we have to below steps:

wget http://code.google... /roscodecp roscode /etc/init.d/chkconfig roscore addchkconfig roscore on

The script roscore doesn’t only start roscore, alsothe necessary packages and nodes for our goals.

Also, we can install the ssh service to allow re-mote management of the system. This allows us tomanage the system and monitor its status on remoteform. For get this functionality we have to do:

apt-get install ssh

Note: we can’t forget which is the main goal. Wecan install a lot of tools and software to improve ormake easy the management or the debugging processof the system, but all software and service installedcan affect negatively to the system performance.

4 INITIAL TEST AND SOMETOOLS

At this point, we have an powerful operating envi-ronment for teaching and research. We want to showa little set of tools and configuration created to showthe features of this system.

To to that we’ve developed some tools and we’veintegrated them with another tools to build an exam-ple system and the beginning step to other future jobs.This example system consists in some little applica-tions running on ROS and a web environment to man-age the basic features of Create robot and generic sys-tem features.

How we said before, we’ve developed a littleproject that it’s stored in:

and the ROS packages and necessary software forit is:

It was developed too a little script to realise thenecessary installation and configuration of the system.You only have to download it from: and execute it likeroot user:

5 EXPERIMENTAL RESULTS

To test the framework we’ve developed a smallweb application to manage the robot and its sensors.This application is based on the manual (ROS, b) andit’s supported by irobot create 2.1 driver, rosjs appli-cation and rosbridge application.

The first one provides the topics related with therobot, information of its sensors and actuators. Theothers both applications provide a framework to in-tercommunicate web environment with internal ROSapplications on an easy-way.

The next figure shows the web interface developedby us and some tools that we’ve integrated with it tomonitor the system health.

On our web application you can see in the left sidea little console which shows information about theconnection. In the middle side there’s a representa-tive little sketch of the robot, which you can interactwith the robot through it. Finally, in the right sidethere’s a list with all sensor information.

To install this application in the robot, it’s onlynecessary to download a installator and execute it.The commands are the below:wget ..../install.sh

This installator will download all necessary appli-cations, included the web application, and it will con-figure them from the initial robot configuration de-scribed in the previous section.

The next pictures show the web application andother tools appearance.

Also, it’s interesting to see the few processes inROS are needed to support this example. It’s not a bigexample, but it manage all the complexity of iRobotCreate robot.

6 CONCLUSIONS

First, we want to itemize and show the total costof this environment:

Device CostiRobot Create $150BeagleBoard rev C4 $1308Gb SD Card $14CargoBay connector $12RooStick $25Mini-DIN connector $16Self-powered USB hub $12USB Wi-fi $10Webcam $10USB to power connector $8Total $396

Page 7: EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST …lara.eii.us.es/dcagigas/fdp/EMBEDDED SYSTEMS INTEGRATION... · 2017-03-28 · EMBEDDED SYSTEMS INTEGRATION BASED ON LOW COST ROBOTIC

The iRobot Create robot is a powerful and cheaptool which provides the basic needed abilities for ev-ery mobile robotic environment. This, together withthe beagleboard with its USB connections providesthe chance to build any mobile robot. At finally, ROSframework provides a powerful, thin and an easy envi-ronment to develop algorithm without large learningcurves and reusing code.

REFERENCES

BeagleBoard System Reference Manual Rev C4.

BeagleBoard Ubuntu. http://elinux.org/BeagleBoardUbuntu.

Installing ROS on Ubuntu from SVN.http://www.ros.org/wiki/cturtle/Installation/Ubuntu/SVN.

iRobot Create driver 2.1.

OMAP Maverick Install.https://wiki.ubuntu.com/ARM/OMAPMaverickInstall.

ROSProcessingjs. http://code.google.com/p/brown-ros-pkg/wiki/ROSProcessingjs.

Ben Tribelhorn, Z. D. (2007). Evaluating the roomba: Alow-cost, ubiquitous platform for robotics researchand education. IEEE International Conference onRobotics and Automation.

Daniel Cagigas-Muiz, Toms Murillo-Morales, P. I.-B. F. D.-d.-R. (2011). Integration of cognitive architecturesin robotics software frameworks: A case of study.Robotics and Autonomous Systems.

Kurt, T. E. (2007). Hacking Roomba. Wiley Publishing,Inc., 10475 Crosspoint Boulevard, Indianapolis, IN46256, 1st edition.

Monica Anderson, L. T. and Wiegand, N. Player/stage: Aunifying paradigm to improve robotics education de-livery.