You are on page 1of 25

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
◦ Scaling ratio of 2:1
Real World Setup Model
Soccer Ball Diameter 8.6 in 4.3
Goal (Width×Height) 288×96 in 144×48
Goalkeeper
Total Height 72 in 36
Knee to Toe Height 24 in 12
Shoulder to Knee Height 48 in 24
Arm Length 28.8 in 14.4
Hand Diameter 8 in 4

7
Model Simulation
 MATLAB Robotics Toolbox simulation
◦ DH parameters for robotic goalkeeper
Link θ d a α
Right Side 1 90° d1* 12 0
2 θ2* 0 24 0
3 θ3* 0 14.4 -90°
Left Side 1 90° d1* 12 0
2 θ2* 0 24 0
3 θ3* 0 14.4 90°

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 Y
60
O
80

100

120

140 X
160

180

200

220

240
50 100 150 200 250 300

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 1/32 of actual speed


Time of flight ~ 1 second

• 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 RoboRealm
where COG can be detecting blobs
accessed 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
Visual feed of
Ball
320x240 at 30 fps RoboRealm(RR) – Machine vision
captured by implementation
is used to detect
camera
Real-time testing involving throwing the ball rapid movement
Camera
towards the workspace Real-time tracking of the ball using
color thresholdingand blob tracking
(center of gravity – COG) modules

RoboRealmAPI
C++ script
Retrieves the COG coordinates (x,y) from
RoboRealm (RR) using the RR API
Relays COG (x,y) coordinates to variable
cog_data using MATLAB’s engine function

MATLAB
Camera calibration Toolbox Output visualization
MATLAB workspace
COG (x,y)
Camera Plot showing position and
coords.
calibration Cog_datarelayed is updated at orientation of goalkeeper, the2D
greater than 10 Hz and is accessed position of the ball
parameters
by other matlab scripts

Script Goalkeeper AI
Script Script
Normalization function Script
Decision making Actuation
Relays the 2D Robot
Computes the vector (Inverse mapping) commands call
position of the functions simulation
projection of the ball in 2D ball in world described in the Model
world coordinates using projection coordinates Actuating the robot robot model
the camera calibration of the ball to move based on ball
Toolbox Actuate joints of
on the goal position
the robot using
plane
the Robotic
Main Goalkeeping
Toolbox
Algorithms

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 cross-
platform 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

You might also like