Wiimotes and Robots David Lippman Pierce College Ft Steilacoom.

Slides:



Advertisements
Similar presentations
Polar Coordinates We Live on a Sphere.
Advertisements

Chapter 14 Companion site for Light and Video Microscopy Author: Wayne.
TEMPLATE DESIGN © The basic model for a trigonometric setup requires that the HID be seen by at least two cameras at any.
GR2 Advanced Computer Graphics AGR
13.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 13 An Introduction to Ray Tracing.
1 Photometric Stereo Reconstruction Dr. Maria E. Angelopoulou.
Pre-Calculus Chapter 6 Additional Topics in Trigonometry.
EMS1EP Lecture 9 Analog to Digital Conversion (ADC) Dr. Robert Ross.
Splines I – Curves and Properties
6.4 Best Approximation; Least Squares
Warm UP! – Draw these 2 graphs on your paper
Chapter 6 Equations 6.1 Solving Trigonometric Equations 6.2 More on Trigonometric Equations 6.3 Trigonometric Equations Involving Multiples Angles 6.4.
PARAMETRIC EQUATIONS AND POLAR COORDINATES
8 More about Equations Contents
Computer Vision, Robert Pless
Add and Use a Sensor & Autonomous For FIRST Robotics
LabView Basics.
HOW A SILICON CHIP CAPTURES AN IMAGE
Computer vision: models, learning and inference
1 pb.  camera model  calibration  separation (int/ext)  pose Don’t get lost! What are we doing? Projective geometry Numerical tools Uncalibrated cameras.
OutLine Overview about Project Wii Robot Escaper Robot Problems and Solutions Demo.
COMP322/S2000/L221 Relationship between part, camera, and robot (cont’d) the inverse perspective transformation which is dependent on the focal length.
CV: 3D sensing and calibration
MSU CSE 803 Fall 2008 Stockman1 CV: 3D sensing and calibration Coordinate system changes; perspective transformation; Stereo and structured light.
Challenger Disaster click here for video. Fig. 1-1, p. 4.
Stockman MSU/CSE Math models 3D to 2D Affine transformations in 3D; Projections 3D to 2D; Derivation of camera matrix form.
Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
Copyright © 2005 Pearson Education, Inc. Chapter 3 Radian Measure and Circular Functions.
Geometric Intuition Randy Gaul. Vectors, Points and Basis Matrices Rotation Matrices Dot product and how it’s useful Cross product and how it’s useful.
Motion Capture Hardware
COMP 175: Computer Graphics March 24, 2015
Chapter 6 ADDITIONAL TOPICS IN TRIGONOMETRY. 6.1 Law of Sines Objectives –Use the Law of Sines to solve oblique triangles –Use the Law of Sines to solve,
ALL THE BACKGROUND INFO YOU NEED TO KNOW Chapter 1.
DISCLAIMER!!!! I AM A N00B! Please do note that everything that I have worked on is subject to questioning.. in fact.. I suggest it. This entire project.
Navi Rutgers University 2012 Design Presentation
3D SLAM for Omni-directional Camera
Author : Ng Thomas ( ) Under the Guidance of: Iwan Njoto Sandjaja, MSCS. Rudy Adipranata, M.Eng.
Final Honours Presentation Principal Investigator: João Lourenço Supervisor: Dr Hannah Thinyane.
Introduction This chapter focuses on Parametric equations Parametric equations split a ‘Cartesian’ equation into an x and y ‘component’ They are used.
By: 1- Aws Al-Nabulsi 2- Ibrahim Wahbeh 3- Odai Abdallah Supervised by: Dr. Kamel Saleh.
Section 7.5 Inverse Circular Functions
Progress Report Development of a Driver Alert System for Road Safety.
Games Development 1 Camera Projection / Picking CO3301 Week 8.
 Two figures are similar if…  1.) Their corresponding angles are congruent  2.) The corresponding sides are PROPORTIONAL!!! 5 in A B C D 4 in 10 in.
GRAPHICS MODULE 14 STUDY BOOK. Graphic commands SCREEN - puts the screen into graphics mode WINDOW - allows scaling of the screen LINE - 3 formats –LINE.
Basic Perspective Projection Watt Section 5.2, some typos Define a focal distance, d, and shift the origin to be at that distance (note d is negative)
Computer Graphics Camera Projection / Picking CO2409 Week 8 - Optional Advanced Material Not on Exam.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
WELCOME TO ARDUINO E-DAY CAR PROJECT MEETING – ITALY MARCH.
Splines I – Curves and Properties based on: Michael Gleicher Curves, chapter 15 in Fundamentals of Computer Graphics, 3 rd ed. (Shirley & Marschner) Slides.
Visual Odometry for Ground Vehicle Applications David Nistér, Oleg Naroditsky, and James Bergen Sarnoff Corporation CN5300 Princeton, New Jersey
Camera Model Calibration
Virtual Pointing Device Using Stereo Camera The 6th International Conference on Applications and Principles of Information Science Jan , 2007, Kuala.
Wii Remote Zibo Zou, Daniel Maertens, Steven Duan 1.
Trigonometry and Applications References: xyz. Motivation Our character movements so far: Other types of movement:
Final Report Idea and Overview 1 Scope 2 Hardware and software 3 Algorithm 4 Experiments & Results 5 Conclusion 6.
Image Warping 2D Geometric Transformations
Chapter 10 Digital Signal and Image Processing
NXT Mindstorms Kit Programming
Arduino Setup & Flexing the ExBow
Computer vision: models, learning and inference
Rendering Pipeline Fall, 2015.
Musical Instrument Virtual
Polar Coordinate System
+ SLAM with SIFT Se, Lowe, and Little Presented by Matt Loper
CSCE 441 Computer Graphics 3-D Viewing
7.1 Vectors and Direction 1.
IMAGE BASED VISUAL SERVOING
Computer Graphics Lecture 20
P2 Chapter 8 :: Parametric Equations
Presentation transcript:

Wiimotes and Robots David Lippman Pierce College Ft Steilacoom

Real World What do we mean by this? Capturing data for analysis is cool, but Can we solve a problem, and see it in action?

Wiimotes Can connect over Bluetooth to computer 3-axis accelerometer Infrared camera with blob detection (4 pts)

Interacting with the Wiimote Low Level Wiiuse / WiiuseJ (C / Java) Wiimotelib (C#) High Level GlovePIE

Problem #1 Prereq: Algebra Problem: Wiimote returns dot values in the range x: , y: GlovePIE maps mouse position to a 0-1 scale in the x and y How do we map Wiimote position to a mouse position?

Prob #1 Soln Wiimote pointing left puts dots on the right, so need to invert x. Dont need to invert y since Mouse.y measures down from the top of the screen Mouse.x = 1 - wiimote.dot1x/1023 Mouse.y = wiimote.dot1y/767

Problem #2 Prereq: Trig Problem: Wiimote returns dot values in the range x: , y: 0-767, roll GlovePIE maps mouse position to a 0-1 scale in the x and y How do we map Wiimote position to a mouse position, compensating for roll?

Prob #2 Soln Angle = asin(Wiimote.gx/1) or use atan2 Angle is off horiz Find x camera, y camera Convert to polar Adjust for roll angle Convert back to Cartesian, map to mouse

Problem #3 Prereq: Algebra Problem: How do we determine 3D position of Wiimote in space? (using triangles) (Assume no roll for simplicity)

Prob #3 Soln Calculate distance between dots Distance from camera = 264/dot dist Dist at 1m = 0.1m real / 132 px camera X position: 1 m 200 px = 200*0.1/132 = m 4 m

Problem #4 Prereq: Trig Problem: How do we determine 3D position of Wiimote in space? (using trig) (Assume no roll for simplicity) Could we have done this with 2 Wiimotes and one dot?

Prob #4 Soln Camera FOV = about 45 degrees Pixels/degree = 1024/45 = px 8.8 deg 1 m 4 m

How different? Distance determination: Dist (m) Dot separation (pixels) Relative difference X-location determination: Pixel x actual x Relative difference

Johnny Lee's Youtube Video

Problem #5 Prereq: Linear Algebra Problem: Mark 4 points on a projected plane (projector image) that correspond to 4 points of a unit square (screen coordinates). Find the transformation that maps points on the projected plane to the unit square. u v x y

Prob #5 Soln Homogenous Coordinates: u v x y

Using 4 corner points, this gives: Reduces further using unit square for (u,v) Solve using Gaussian Elimination. To map back to (u,v), find inverse of the mapping matrix.

Problem #6 Prereq: Integral Calculus / DiffEq Problem: Use the accelerometer readings to estimate distance the Wiimote moves.

Prob #6 Soln Simplistic approach: s 0 = 0, v 0 = 0. Step: Δt =.05 sec Loop: v n = v n a s n = s n v n However, accelerometers are very noisy, so this is not very accurate. In fact, its so horrible Im not even going to show it!

Arduino Computer on a chip 14 digital I/O, w/ 6 pseudo analog out 6 analog inputs 16KB storage 1KB RAM Serial over USB Open hardware Open software

Problem #7 Prereq: Algebra Problem: Create a car backup alarm using distance sensor and LED light. Distance sensor can detect time (in microseconds) that a sound takes to echo back.

Prob #7 Soln dist = rate*time rate = experimentally determined, or speed of sound converted to appropriate units blink delay proportional to distance Does direct proportionality look good? Should it be quadratic? Logarithmic?

Problem #8 Prereq: Algebra Problem: Map Nunchuck joystick data (values -105 to 105) to PWM values (500 to 2500) for the Servos

Prob #8 Soln JoystickServo

Problem #9 Prereq: Trig Problem: Use the Pan/Tilt laser pointer to draw a circle

Prob #9 Soln Use parametric equations: t=0 Loop: x = cos(t) y = sin(t) map (x, y) to Servos t = t +.1 delay(20)

Problem #10 Prereq: Pre-algebra Problem: In a robot with differential drive, each wheel can turn at a different rate. If the wheels are 10cm apart and the outside wheel turns at full speed, at what fraction of full speed will the inside wheel need to turn to drive a circle with inner radius 50cm?

Prob #10 Soln 10cm 50cm C inside = 2π(50) cm C outside = 2π(50+10) cm Speed inside = (2π(50) cm)/unit time Speed outside = (2π(50+10) cm)/unit time Ratio of speeds = 50 / ( ) = 5/6

Problem #11 Prereq: Trig Problem: Ballistics trajectories. Experimentally determine initial velocity, then adjust launch angle to hit a target. Have a class competition to see who can come closest!

Prob #11 Soln

Advanced ideas Kalman filters Gesture recognition (hidden Markov model) Gesture recognition Augmented Reality

Playtime Wii Quizzer Wii Buzzer

Correlation doesn't imply causation, but it does waggle its eyebrows suggestively and gesture furtively while mouthing 'look over there'.