Simulation of a Robotic Goalkeeper

Wisit Jirattigalachote Sudeep Pillai
ME 567 April 9, 2008
1

Overview
 Background

 Motivations
 Objectives  Model

Simulation  Machine Vision  Goalkeeping Algorithm  System Integration  Conclusions  Future Works
2

Background
 RoboCup

◦ “By the year 2050, develop a team of fully autonomous humanoid robots that can win against the human world soccer champion team.”

Picture courtesy of www.robocup.org
3

Motivations
 Problems

◦ Past designs were too slow to react ◦ Aerial ball trajectory was not taken into account
 Ball motions are mostly rolling  Ball speed is generally slow
 http://www.youtube.com/watch?v=7hVy_YsKAJk

◦ Often failed to protect the goal from being scored

4

Objectives
 Simulate a

simplified robotic goalkeeper for effective goalkeeping  Use vision-based system for ball trajectory prediction  Implement an algorithm that efficiently prevents the goal from being scored

5

Model Simulation
 Goalkeeper model

simplifications

◦ Two sets of simple kinematics links chain (one for each body side) ◦ Each set consists of
 One prismatic joint (foot)  Two revolute joints (knee and shoulder)

◦ Hands are approximated as circular cross-sections

6

Model Simulation
 Model

and workspace scaling
Real World Setup 8.6 in 288×96 in 72 in 24 in 48 in 28.8 in 8 in Model 4.3 144×48 36 12 24 14.4 4

◦ Scaling ratio of 2:1
Soccer Ball Diameter Goal (Width×Height) Goalkeeper Total Height Knee to Toe Height Shoulder to Knee Height Arm Length Hand Diameter

7

Model Simulation
 MATLAB Robotics Toolbox
θ 90° θ2* θ3* 90° θ2* θ3*

simulation
α 0 0 -90° 0 0 90°

◦ DH parameters for robotic goalkeeper
Link Right Side 1 2 3 Left Side 1 2 3 d d1* 0 0 d1* 0 0 a 12 24 14.4 12 24 14.4

8

Model Simulation
 MATLAB Robotics Toolbox

simulation

9

Machine Vision
 Camera calibration
◦ Standard webcam (320x240 res. up to 30fps) ◦ Camera Calibration parameters
 Focal length, Principal point, Skew, Distortion, Pixel error

Image 9 - Image points (+) and reprojected grid points (o) 20 40 60 80 100 120 140 160 180 200 220 240 50 100 150 200 250 300

O

Y

X

10

Machine Vision
 Ball tracking
◦ Roborealm (RR) – Robotic vision software
 Ball tracking done using a specific algorithm

Machine vision
algorithm

Roborealm (RR)

11

Machine Vision
 Ball tracking video demonstration

Actual speed Time of flight ~ 1 second

1/32 of actual speed

• The COG coordinates are then ported to MATLAB for ball positioning and robotic simulation • RoboRealm API (C++) calls ENGINE fn accessed by MATLAB
12

Machine Vision
 Ball positioning
◦ COG data returned by RR do not describe the actual ball position in world coordinates ◦ Normalizing function: Converts the (x,y) coordinates recorded by the camera into a normalized image projection vector
 i.e. 2D projection of the 3D ball on the goal plane

◦ Normalized data scaled down to desired workspace
 i.e. 320x240 pixels scaled to 144x48

13

Machine Vision

COG coordinates sent to MATLAB through program

RR API (C++) interface Matlab workspace where COG can be accessed

RoboRealm detecting blobs
14

Goalkeeping Algorithm
 Path generation of

our model

15

Goalkeeping Algorithm
 Inverse kinematics
s 14.4

α θ3

24 θ2

r

◦ Law of cosine r2+s2 = 242+14.42+2(24)(14.4)cos(α)
16

Goalkeeping Algorithm
 Inverse kinematics (cont.)

◦ Define
 D=((r2+s2)-(242+14.42))/(2*24*14.4)

◦ Thus,
 α = atan2(±sqrt(1-D2),D)  θ3 = π/2 + α  θ2 = -(π/2-(atan2(s,r)atan2(14.4*sin(α),24+14.4*cos(α))))

17

Goalkeeping Algorithm
 For

each (x, y) coord. of the ball, there is only one set of possible joint angles solution (d1, θ2, θ3r, θ3l)  When the ball moves from (xa, ya) to (xb, yb), the robot will move from (d1a, θ2a, θ3ra, θ3la) to (d1b, θ2b, θ3rb, θ3lb)

18

System Integration
 MATLAB Demo

19

Robotic Goalkeeper Simulator Algorithm flowchart
Ball captured by camera Visual feed of 320x240 at 30 fps is used to detect rapid movement

RoboRealm(RR) – Machine vision implementation
Real-time tracking of the ball using color thresholdingand blob tracking (center of gravity – COG) modules

Real-time testing involving throwing the ball towards the workspace

Camera

RoboRealmAPI C++ script
Relays COG (x,y) coordinates to variable cog_data using MATLAB’s engine function

Retrieves the COG coordinates (x,y) from RoboRealm (RR) using the RR API

MATLAB
Camera calibration Toolbox Output visualization
COG (x,y) coords.

MATLAB workspace Cog_datarelayed is updated at greater than 10 Hz and is accessed by other matlab scripts

Camera calibration parameters

Plot showing position and orientation of goalkeeper, the2D position of the ball

Script
Normalization function Computes the vector projection of the ball in world coordinates using the camera calibration Toolbox

Goalkeeper AI Script 2D projection of the ball on the goal plane
Relays the 2D position of the ball in world coordinates

Script

Script
Actuation commands call functions described in the robot model

Decision making (Inverse mapping)
Actuating the robot to move based on ball position Main Goalkeeping Algorithms

Robot simulation Model Actuate joints of the robot using the Robotic Toolbox

20

Conclusions
Model of simple robotic goalkeeper was used as a framework for developing an agile goalkeeper  Machine vision implemented was adequate but not highly robust

◦ Aerial ball trajectory prediction could not be implemented ◦ 2D projection of the ball was successfully implemented instead ◦ Limited camera frame rate restricted accuracy of ball position
21

Conclusions
 Algorithm utilizing machine vision

information was successfully implemented
◦ A simple goalkeeping algorithm was developed ◦ Robust operation within the workspace ◦ Delayed response time due to crossplatform interface

22

Future Works
 Model

Simulation

◦ Increasing degree of freedoms (e.g. elbows, knees) ◦ Considering realistic dynamics
 Machine Vision

◦ Stereo-vision for 3D trajectory prediction ◦ Improved camera frame rate
 Ball movement prediction algorithm

23

Questions ?

24

More videos!!!

25

Sign up to vote on this title
UsefulNot useful