What is a robot? Definitions Webster: a machine that looks like a human being and performs various acts (as walking and talking) of a human being Robotics Institute of America: a robot is a reprogrammable multifunctional manipulator designed to move material, parts, tools, or specialized devices through variable programmed motions for the performance of a variety of tasks What’s our definition Components of a robot system? Minds and Computers 1.1 History 1921: Karel Capek’s play, Rossum’s Universal Robots 1942: Asimov wrote Runaround which contained the “Three Laws of Robotics” 1. A robot may not injure a human being or through inaction allow a human being to come to harm. 2. A robot must obey the orders given it by human beings, except where such orders would conflict with the First Law. 3. A robot must protect its own existence, as long as such protection does not conflict with the First or Second Law. 1948: Weiner wrote “Cybernetics” 1961: General Motors’ puts UNIMATE online (first industrial robot) 1970: SRI’s Shakey: first AI mobile robot Minds and Computers 1.2 Uses of robots Where and when to use robots? Tasks that are dirty, dull, or dangerous Where there is significant academic and industrial interest Ethical and liability issues What industries? What applications? Minds and Computers 1.3 Agents and Environments Minds and Computers 1.4 Control basics Some definitions: Control system: arrangement of physics components connected or related in such a manner as to form and/or act as an entire unit Kinematics: the description or study of the geometry of motion Dynamics: the description or study of the forces that affect the motion of objects Open-loop control Compute trajectory a priori and make necessary actions to complete task Closed-loop control Use sensors to provide feedback to modify the trajectory and actions Minds and Computers 1.5 Computer architecture von Neumann model Memory: random access memory (RAM) for program instructions and data ALU: includes set of registers for performing calculations Control: responsible for fetching and decoding instructions Input & output Bus: various internal pathways Minds and Computers Processor Input Control Memory arthmetic/ logic Output 1.6 LEGO Mindstorms NXT Atmel 32-bit ARM processor 4 inputs/sensors (1, 2, 3, 4) 3 outputs/motors (A, B, C) 256 KB Flash Memory 64 KB RAM USB 2.0 Communication 4 programmable buttons 100x64 b/w LCD Display Sensors Active: • Old light and rotation Passive • Touch, sensors for NXT Digital Motors 170 RPM 360 RPM for old motors, why? • Ultrasonic Minds and Computers 1.7 Challenges 1. 2. 3. Make a car Build a vehicle that will reliably go backwards and forwards Getting there Using Pilot 1 - program your car to move for 1 sec Measure the distance it went Predict distance for n sec Run and check model Touch-activated Your robot should start when the touch sensor is pressed and stop when it hits something Can you keep your robot from running off the table with a sensor? Minds and Computers 1.8 Preview What five steps would the robot have to take in order to go forward for 2 rotations? Spin left motor Spin right motor Wait until the motors have spun two rotations Stop left motor Minds and Computers Stop right motor 1.9 Preview Now lets examine what that would look like in the NXT Educational Programming Software. 1. Spin left motor 2. Spin right motor 3. Wait for 2 rotations 4. Stop left motor Minds and Computers 5. Stop right motor 1.10 Preview While programming your motor blocks, make sure you select the proper output ports, and set both motors to the same direction and power level. Minds and Computers 1.11 Preview Don’t forget, the comments you include in your program don’t actually have any effect on what your robot will do. Comments simply act as reminders for you when you edit your program. Here, the “wait for 1440 degrees” won’t do anything because the actual Wait Block is set to wait for 720 degrees. Minds and Computers 1.12 Design Strategy Incremental design Test components parts as you build them • Drivetrain • Sensors, sensor mounting • Structure Don’t be afraid to redesign KISS Testing Don’t wait until you have a final robot to test • Interaction of systems • Work division (work concurrently) Develop test methods Repeatability Minds and Computers 1.13 Philosophy Build for accurate, precise control Slow vs. fast? Gear backlash Stability Skidding Have fun Be creative, unique Strive for cool solutions, that work! Aesthetics: it’s fun to make beautiful robots! Minds and Computers 1.14 Differential drive Most common kinematic choice All of the miniature robots… Scribbler, Braitenberg - difference in wheels’ speeds determines its turning angle VL VR Minds and Computers 1.15 Differential drive Most common kinematic choice All of the miniature robots… Scribbler, Braitenberg - difference in wheels’ speeds determines its turning angle Questions (forward kinematics) Given the wheel’s velocities or positions, what is the robot’s velocity/position ? VL VR Minds and Computers Are there any inherent system constraints? 1.16 Differential drive Most common kinematic choice All of the miniature robots… Khepera, Braitenberg - difference in wheels’ speeds determines its turning angle Questions (forward kinematics) Given the wheel’s velocities or positions, what is the robot’s velocity/position ? VL VR Are there any inherent system constraints? 1) Specify system measurements 2) Determine the point (the radius) around which the robot is turning. 3) Determine the speed at which the robot is turning to obtain the robot velocity. Minds and Computers 4) Integrate to find position. 1.17 Differential drive 1) Specify system measurements - consider possible coordinate systems y VL l q x VR Minds and Computers (assume a wheel radius of 1) 1.18 Differential drive 1) Specify system measurements - consider possible coordinate systems y 2) Determine the point (the radius) around which the robot is turning. VL l q x VR Minds and Computers (assume a wheel radius of 1) 1.19 Differential drive 1) Specify system measurements - consider possible coordinate systems y VL l x q 2) Determine the point (the radius) around which the robot is turning. - to minimize wheel slippage, this point (the ICC) must lie at the intersection of the wheels’ axles - each wheel must be traveling at the same angular velocity VR ICC Minds and Computers (assume a wheel radius of 1) “instantaneous center of curvature” 1.20 Differential drive 1) Specify system measurements - consider possible coordinate systems y w VL l x q 2) Determine the point (the radius) around which the robot is turning. - to minimize wheel slippage, this point (the ICC) must lie at the intersection of the wheels’ axles - each wheel must be traveling at the same angular velocity around the ICC VR ICC Minds and Computers (assume a wheel radius of 1) “instantaneous center of curvature” 1.21 Differential drive 1) Specify system measurements - consider possible coordinate systems y 2) Determine the point (the radius) around which the robot is turning. - each wheel must be traveling at the same angular velocity around the ICC w VL x l 3) Determine the robot’s speed around the ICC and its linear velocity VR ICC R robot’s turning radius w(R+l/2) = VL w(R- l/2) = VR (assume a wheel radius of 1) Minds and Computers 1.22 Differential drive 1) Specify system measurements - consider possible coordinate systems y 2) Determine the point (the radius) around which the robot is turning. - each wheel must be traveling at the same angular velocity around the ICC w VL x l 3) Determine the robot’s speed around the ICC and then linear velocity VR ICC w(R+l/2) = VL R w(R-l/2) = VR robot’s turning radius Thus, Minds and Computers (assume a wheel radius of 1) w = ( VR - VL ) / l R = l ( VR + VL ) / ( VR - VL ) 1.23 Differential drive 1) Specify system measurements - consider possible coordinate systems y 2) Determine the point (the radius) around which the robot is turning. - each wheel must be traveling at the same angular velocity around the ICC w VL x l 3) Determine the robot’s speed around the ICC and then linear velocity VR ICC w(R+d) = VL R w(R-d) = VR robot’s turning radius Thus, w = ( VR - VL ) / l R = l ( VR + VL ) / 2( VR - VL ) 1.24 Minds and Computers So, the robot’s velocity is V = wR = ( VR + VL ) / 2 Differential drive 4) Integrate to obtain position y Vx = V(t) cos(q(t)) w(t) Vy = V(t) sin(q(t)) VL x l VR ICC R(t) robot’s turning radius with w = ( VR - VL ) / l WhatMinds has and to Computers happen to change the ICC ? R = l( VR + VL ) / ( VR - VL ) 1.25 V = wR = ( VR + VL ) / 2 Differential drive 4) Integrate to obtain position y Vx = V(t) cos(q(t)) w(t) Thus, VL x(t) = x l Vy = V(t) sin(q(t)) y(t) = q(t) = VR ∫ V(t) cos(q(t)) dt ∫ V(t) sin(q(t)) dt ∫ w(t) dt ICC R(t) robot’s turning radius with w = ( VR - VL ) / l Minds and Computers R = l ( VR + VL ) / 2( VR - VL ) 1.26 V = wR = ( VR + VL ) / 2 Differential drive 4) Integrate to obtain position y Vx = V(t) cos(q(t)) w(t) Thus, VL x(t) = x l Vy = V(t) sin(q(t)) y(t) = q(t) = VR ∫ V(t) cos(q(t)) dt ∫ V(t) sin(q(t)) dt ∫ w(t) dt ICC Kinematics R(t) robot’s turning radius with w = ( VR - VL ) /l What has to happen to change the ICC ? Minds and Computers R = l ( VR + VL ) / 2( VR - VL ) 1.27 V = wR = ( VR + VL ) / 2