A Framework for Advanced Robot Programming in the RoboCup Domain - - PowerPoint PPT Presentation

a framework for advanced robot programming in the robocup
SMART_READER_LITE
LIVE PREVIEW

A Framework for Advanced Robot Programming in the RoboCup Domain - - PowerPoint PPT Presentation

A Framework for Advanced Robot Programming in the RoboCup Domain Hayato Kobayashi 1 , Akira Ishino 2 , and Ayumi Shinohara 3 1 Department of Informatics, Kyushu University, Japan 2 Office for Information of University Evaluation, Kyushu University,


slide-1
SLIDE 1

A Framework for Advanced Robot Programming in the RoboCup Domain

Hayato Kobayashi1, Akira Ishino2, and Ayumi Shinohara3

1Department of Informatics, Kyushu University, Japan 2Office for Information of University Evaluation, Kyushu University, Japan 3Graduate School of Information Science, Tohoku University, Japan

slide-2
SLIDE 2

Outline

 Background  Related work  Proposed framework

 Concept  Plug-in system  Scripting language

 Demonstrations  Discussion  Conclusions and future work

slide-3
SLIDE 3

Outline

 Background  Related work  Proposed framework

 Concept  Plug-in system  Scripting language

 Demonstrations  Discussion  Conclusions and future work

slide-4
SLIDE 4

RoboCup Soccer

Humanoid league Simulation league Small size robot league Middle size robot league

Team Jolly Pochie

Four-legged robot league https://www.robocup.org/

slide-5
SLIDE 5

Many difficulties

 Soccer programs is complex  Full compiling takes more than 10 minutes  Booting of AIBO takes about 30 seconds  Debug via wireless LAN  Batteries only last about 30 minutes  Team development can cause conflictions  Cute shape is not suited for playing soccer  AIBOs can faint because of motor load  AIBOs can break their legs

slide-6
SLIDE 6

How to solve?

 Hardware problems  Software problems

We can’t solve! Maybe, we can solve!!!

slide-7
SLIDE 7

How to solve?

 Hardware problems  Software problems

We can’t solve! Maybe, we can solve!!! We want a “framework”

that makes it easy to create robot programs

slide-8
SLIDE 8

Outline

 Background  Related work  Proposed framework

 Concept  Plug-in system  Scripting language

 Demonstrations  Discussion  Conclusions and future work

slide-9
SLIDE 9

Related Work

 Tekkotsu

 A development framework for AIBO  Created at Carnegie Mellon University  Consists of C++ Libraries wrapping OPEN-R.

(We must use OPEN-R for creating AIBO programs)

http://www.tekkotsu.org/

slide-10
SLIDE 10

Related Work in RoboCup Symposium

Alessandro Farinelli, Giorgio Grisetti, and Luca Iocchi. “SPQR- RDK: A Modular Framework for Programming Mobile Robots”. In RoboCup 2004: Robot Soccer World Cup VIII, LNAI, pages 660--653. Springer, 2005.

Alexander Kleiner and Thorsten Buchheim. “A Plugin-Based Architecture for Simulation in the F2000 League”. In RoboCup 2003: Robot Soccer World Cup VII, LNAI, pages 434--

  • 445. Springer, 2004.

Thomas R fer. “An Architecture for a National RoboCup Team”. In RoboCup 2002: Robot Soccer World Cup VI, LNAI, pages 417--425. Springer, 2003.

Paul A. Buhler and Jose M. Vidal. “Biter: a Platform for the Teaching and Research of Multiagent Systems' Design using RoboCup”. In RoboCup 2001: Robot Soccer World Cup V, LNAI, pages 299--304. Springer, 2002.

slide-11
SLIDE 11

Outline

 Background  Related work  Proposed framework

 Concept  Plug-in system  Scripting language

 Demonstrations  Discussion  Conclusions and future work

slide-12
SLIDE 12

Proposed Framework

 Two techniques are integrated

 Plug-in system (easy to extend)

 Effective for team development  No need to know the whole system

 Scripting language (easy to use)

 Effective for creating strategic programs  No need to recompile and reboot

slide-13
SLIDE 13

Outline

 Background  Related work  Proposed framework

 Concept  Plug-in system  Scripting language

 Demonstrations  Discussion  Conclusions and future work

slide-14
SLIDE 14

Concept of our framework

Plug-in system

Strategic script Strategic script Strategic scripts

OVirtualRobot (OPEN-R Object) AIBO

OVirtualRobot can control actuators and sensors of AIBO

slide-15
SLIDE 15

Concept of our framework

Plug-in system

Strategic script Strategic script Strategic scripts

slide-16
SLIDE 16

Concept of our framework

Plug-in system

Strategic script Strategic script Strategic scripts

ball recognition beacon recognition self-localization quadrupedal locomotion shoot motion

For Constructing a player program

slide-17
SLIDE 17

Concept of our framework

Plug-in system

Strategic script Strategic script Strategic scripts

Easy to plug

slide-18
SLIDE 18

Concept of our framework

Plug-in system

Strategic script Strategic script Strategic scripts

Scripts access these modules

slide-19
SLIDE 19

Concept of our framework

Plug-in system

Strategic script Strategic script Strategic scripts

Scripts access these modules sound effect

slide-20
SLIDE 20

Concept of our framework

Plug-in system

Strategic script Strategic script Strategic scripts

Scripts access these modules

Easy to extend

slide-21
SLIDE 21

Concept of our framework

Plug-in system

Strategic script Strategic script Strategic scripts

A better beacon recognition module

  • Ver. 2
slide-22
SLIDE 22

Concept of our framework

Plug-in system

Strategic script Strategic script Strategic scripts

  • Ver. 2

Easy to replace Without any changes

slide-23
SLIDE 23

Outline

 Background  Related work  Proposed framework

 Concept  Plug-in system  Scripting language

 Demonstrations  Discussion  Conclusions and future work

slide-24
SLIDE 24

Plug-in system

 Plug-in system has often been used in

recent applications

Web browser IDE Drawing software

We don’t need to know the whole system

https://www.mozilla.org/ https://www.eclipse.org/ https://www.adobe.com/

slide-25
SLIDE 25

Concept of Plug-in system

Plug-in system

OVirtualRobot

slide-26
SLIDE 26

Concept of Plug-in system

Plug-in system

OVirtualRobot A recognition module A team-play module A touch sensor module A locomotion module

slide-27
SLIDE 27

Concept of Plug-in system

Plug-in system

OVirtualRobot UDP event Sensor event Camera event Action event A recognition module A team-play module A touch sensor module A locomotion module

slide-28
SLIDE 28

Abstract modules OPEN-R (the design of our plug-in system) JPObject manages the instance of created modules

slide-29
SLIDE 29

Abstract modules

Abstract Module Special method When is the method called?

JPCameraModule cameraNotify()

Every 40 ms in sync with the CCD-camera

JPMindModule mindNotify()

The same as cameraNotify()

JPActionModule actionReady()

When a set of joint angles are achieved

JPSensorModule sensorNotify()

When sensor data is detected

JPUDPModule udpNotify()

When UDP data is received

JPTCPModule tcpNotify()

When TCP data is received

JPModule

We can override cameraNotify() and describe image processing

slide-30
SLIDE 30

Abstract modules

Abstract Module Special method When is the method called?

JPCameraModule cameraNotify()

Every 40 ms in sync with the CCD-camera

JPMindModule mindNotify()

The same as cameraNotify()

JPActionModule actionReady()

When a set of joint angles are achieved

JPSensorModule sensorNotify()

When sensor data is detected

JPUDPModule udpNotify()

When UDP data is received

JPTCPModule tcpNotify()

When TCP data is received

JPModule

recognition modules strategy modules locomotion modules localization modules, etc

slide-31
SLIDE 31

Outline

 Background  Related work  Proposed framework

 Concept  Plug-in system  Scripting language

 Demonstrations  Discussion  Conclusions and future work

slide-32
SLIDE 32

Lua (http://www.lua.org/)

 Designed for embedding into C/C++

 Easy to embed into C/C++  Faster than Python  Uses less memory than Python  Has a simple and powerful syntax  Smaller footprint than Python (about 1/10)

By http://lua-users.org/wiki/LuaVersusPython

slide-33
SLIDE 33

A simple example

function sum(…) local s = 0 for i=1, arg.n do s = s + arg[i] end return s end

 Returns the summation of arguments

slide-34
SLIDE 34

Luabind

(http://www.luabind.sourceforge.net/)

 A library that helps us create bindings

between C++ and Lua

 Utilizing template meta programming, we

can easily register C++ functions and call Lua functions

slide-35
SLIDE 35

An example of Binding in modules

 For lua scripts to use C/C++ functions

void BasicMotion6JPM::init() { module(JPLua::L) [ class_<BasicMotion6JPM>("BasicMotion6JPM") .def("swingHead", &BasicMotion6JPM::swingHead) .def("stopSwingHead", &BasicMotion6JPM::stopSwingHead) ….. ]; get_globals(JPLua::L)["basicMotion"] = this; }

slide-36
SLIDE 36

An example of Binding in modules

 For lua scripts to use C/C++ functions

void BasicMotion6JPM::init() { module(JPLua::L) [ class_<BasicMotion6JPM>("BasicMotion6JPM") .def("swingHead", &BasicMotion6JPM::swingHead) .def("stopSwingHead", &BasicMotion6JPM::stopSwingHead) ….. ]; get_globals(JPLua::L)["basicMotion"] = this; }

basicMotion:swingHead(0,0,0)

(in Lua scripts)

slide-37
SLIDE 37

function swingLeft() basicMotion:swingHead(0,d2ur(80),0,”swingRight”) stree:setState(“swingWait”) end function swingRight() basicMotion:swingHead(0,d2ur(-80),0,”swingLeft”) stree:setState(“swingWait”) end

An example of robot script

require "JPLib/Syslog.lua" require "JPLib/Units.lua" require "JPLib/STree.lua" function init() stree:setState("swingLeft") end function mindNotify() stree:doAction() end

 Swings its head from side to side

slide-38
SLIDE 38

Other teams

 MicroPerl by team UPennalizers  Python by team rUNSWift and CMDash  Scheme by team ASURA

Definition of global wrapping functions for binding to C/C++ need

slide-39
SLIDE 39

Binding of Python

/* Get the project for ball. When this function is called, it is assumed that the robot can see the ball. */ static PyObject * VisionLink_getProjectedBall(PyObject * /*self*/, PyObject *args) { // Track visual ball. int inpoints[2] = {((int) (vision->vob[vobBall].cx) - WIDTH / 2), -1 * ((int) (vision >vob[vobBall].misc) - HEIGHT / 2)}; double outpoints[2] = {-1, -1}; vision->projectPoints(inpoints, 1, outpoints, 0); double ballx = -outpoints[0]; double bally = outpoints[1]; PyObject *t; t = PyTuple_New(2); PyTuple_SetItem(t, 0, PyFloat_FromDouble(ballx)); PyTuple_SetItem(t, 1, PyFloat_FromDouble(bally)); return t; }

slide-40
SLIDE 40

Our choice

 Lua & Luabind library

Simple function calls for binding to C/C++ need

slide-41
SLIDE 41

An example of Binding in modules

 For lua scripts to use C/C++ functions

void BasicMotion6JPM::init() { module(JPLua::L) [ class_<BasicMotion6JPM>("BasicMotion6JPM") .def("swingHead", &BasicMotion6JPM::swingHead) .def("stpwingHead", &BasicMotion6JPM::stopSwingHead) ….. ]; get_globals(JPLua::L)["basicMotion"] = this; }

slide-42
SLIDE 42

Outline

 Background  Related work  Proposed framework

 Concept  Plug-in system  Scripting language

 Demonstrations  Discussion  Conclusions and future work

slide-43
SLIDE 43

Our programming method

Create modules by C++ Create a script by Lua Create a binary Test on AIBO

Need to compile Need to send the binary and reboot AIBO Need to only send the script

slide-44
SLIDE 44

Our programming method

Create modules by C++ Create a script by Lua Create a binary Test on AIBO

Need to compile Need to send the binary and reboot AIBO Need to only send the script

For professionals For beginners

slide-45
SLIDE 45

Demonstrations

 Available online at following URL

Create a binary and script Create a module and bind it About 5 minutes About 7 minutes

https://youtu.be/ mehBFIsW4lQ https://youtu.be/ _EgW_0Isx8U

slide-46
SLIDE 46

Outline

 Background  Related work  Proposed framework

 Concept  Plug-in system  Scripting language

 Demonstrations  Discussion  Conclusions and future work

slide-47
SLIDE 47

Discussion

 Rough Comparison of working efficiency

 In RoboCup 2004 (before using our framework)  In RoboCup 2005 (after using our framework)

slide-48
SLIDE 48

Experimental result?

 Me as a beginner (in RoboCup 2004)

 3 days to run a sample program  6 months to create a player program for

actual games

me (I was an undergraduate student) Censored image

slide-49
SLIDE 49

Experimental result?

 Beginner A and B (in RoboCup 2005)

 1 hour to run a sample program  1 month to create a player program for

actual games

Beginner A Beginner B (they are still undergraduate students ) Censored image Censored image

slide-50
SLIDE 50

Jolly Pochie in RoboCup 2005

 130 modules and 350 scripts  Top 8 in Soccer competition  7th in Technical Challenge

slide-51
SLIDE 51

Outline

 Background  Related work  Proposed framework

 Concept  Plug-in system  Scripting language

 Demonstrations  Discussion  Conclusions and future work

slide-52
SLIDE 52

Conclusions

 We proposed a framework that makes it

easy to create robot programs

 No need to know the whole system  No need to compile and reboot

 Our framework is very useful in the

RoboCup Soccer competitions

 Coming soon at following URL

 http://www.shino.ecei.tohoku.ac.jp/jollypochie/

slide-53
SLIDE 53

Future work

 Create a framework for robots other

than AIBO, especially humanoids!

 We hope that we can use some modules

from AIBO, such as recognition modules

Censored image

slide-54
SLIDE 54

Thank you for your attention!

Censored image