1 / 38

Autonomous Mobile Robots CPE 470/670

Autonomous Mobile Robots CPE 470/670. Lecture 6 Instructor: Monica Nicolescu. Review. Sensors Photocells Reflective optosensors Infrared sensors Break-Beam sensors Shaft encoders Sonar sensors. Laser Sensing. High accuracy sensor Lasers use light time-of-flight

shubha
Download Presentation

Autonomous Mobile Robots CPE 470/670

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Autonomous Mobile RobotsCPE 470/670 Lecture 6 Instructor: Monica Nicolescu

  2. Review Sensors • Photocells • Reflective optosensors • Infrared sensors • Break-Beam sensors • Shaft encoders • Sonar sensors CPE 470/670 - Lecture 6

  3. Laser Sensing • High accuracy sensor • Lasers use light time-of-flight • Light is emitted in a beam (3mm) rather than a cone • Provide higher resolution • SICK LMS200 • 360 readings over an 180-degrees, 10Hz • Disadvantages: • cost, weight, power, price • mostly 2D CPE 470/670 - Lecture 6

  4. Global Positioning System (GPS) • General information • At least 24 satellites orbiting the earth every 12 hours at a height of 20.190 km • 4 satellites were located in each of 6 orbits with 60 degrees orientation between each other • How does it work? • Each satellite transmits its location and current time • GPS receivers use the arrival time and location to infer their current location • GPS receivers read from at least 4 satellites CPE 470/670 - Lecture 6

  5. Global Positioning System (GPS) • Challenges • Time synchronization between satellites and GPS receiver • Real time update of the location of the satellites • Precise measurement of time-of flight CPE 470/670 - Lecture 6

  6. Visual Sensing • Cameras try to model biological eyes • Machine vision is a highly difficult research area • Reconstruction • What is that? Who is that? Where is that? • Robotics requires answers related to achieving goals • Not usually necessary to reconstruct the entire world • Applications • Security, robotics (mapping, navigation) CPE 470/670 - Lecture 6

  7. Principles of Cameras • Cameras have many similarities with the human eye • The light goes through an opening (iris - lens) and hits the image plane (retina) • The retina is attached to light-sensitive elements (rods, cones – silicon circuits) • Only objects at a particular range are in focus (fovea) – depth of field • 512x512 pixels (cameras), 120x106 rods and 6x106 cones (eye) • The brightness is proportional to the amount of light reflected from the objects CPE 470/670 - Lecture 6

  8. Image Brightness • Brightness depends on • reflectance of the surface patch • position and distribution of the light sources in the environment • amount of light reflected from other objects in the scene onto the surface patch • Two types of reflection • Specular (smooth surfaces) • Diffuse (rough sourfaces) • Necessary to account for these properties for correct object reconstruction  complex computation CPE 470/670 - Lecture 6

  9. Early Vision • The retina is attached to numerous rods and cones which, in turn, are attached to nerve cells (neurons) • The nerves process the information; they perform "early vision", and pass information on throughout the brain to do "higher-level" vision processing • The typical first step ("early vision") is edge detection, i.e., find all the edges in the image • Suppose we have a b&w camera with a 512 x 512 pixel image • Each pixel has an intensity level between white and black • How do we find an object in the image? Do we know if there is one? CPE 470/670 - Lecture 6

  10. Edge Detection • Edge = a curve in the image across which there is a change in brightness • Finding edges • Differentiate the image and look for areas where the magnitude of the derivative is large • Difficulties • Not only edges produce changes in brightness: shadows, noise • Smoothing • Filter the image using convolution • Use filters of various orientations • Segmentation: get objects out of the lines CPE 470/670 - Lecture 6

  11. Model-Based Vision • Compare the current image with images of similar objects (models) stored in memory • Models provide prior information about the objects • Storing models • Line drawings • Several views of the same object • Repeatable features (two eyes, a nose, a mouth) • Difficulties • Translation, orientation and scale • Not known what is the object in the image • Occlusion CPE 470/670 - Lecture 6

  12. Vision from Motion • Take advantage of motion to facilitate vision • Static system can detect moving objects • Subtract two consecutive images from each other  the movement between frames • Moving system can detect static objects • At consecutive time steps continuous objects move as one • Exact movement of the camera should be known • Robots are typically moving themselves • Need to consider the movement of the robot CPE 470/670 - Lecture 6

  13. Stereo Vision • 3D information can be computed from two images • Compute relative positions of cameras • Compute disparity • displacement of a point in 2D between the two images • Disparity is inverse proportional with actual distance in 3D CPE 470/670 - Lecture 6

  14. Biological Vision • Similar visual strategies are used in nature • Model-based vision is essential for object/people recognition • Vestibular occular reflex • Eyes stay fixed while the head/body is moving to stabilize the image • Stereo vision • Typical in carnivores • Human vision is particularly good at recognizing shadows, textures, contours, other shapes CPE 470/670 - Lecture 6

  15. Vision for Robots • If complete scene reconstruction is not needed we can simplify the problem based on the task requirements • Use color • Use a combination of color and movement • Use small images • Combine other sensors with vision • Use knowledge about the environment CPE 470/670 - Lecture 6

  16. Examples of Vision-Based Navigation Running QRIO Sony Aibo – obstacle avoidance CPE 470/670 - Lecture 6

  17. Feedback Control • Feedback control = having a system achieve and maintain a desired state by continuously comparing its current and desired states, then adjusting the current state to minimize the difference • Also called closed loop control CPE 470/670 - Lecture 6

  18. Goal State • Goal driven behavior is used in both control theory and in AI • Goals in AI • Achievement goals: states that the system is trying to reach • Maintenance goals: states that need to be maintained • Control theory: mostly focused on maintenance goals • Goal states can be: • Internal: monitor battery power level • External: get to a particular location in the environment • Combinations of both: balance a pole CPE 470/670 - Lecture 6

  19. Error • Error = the difference in the current state and desired state of the system • The controller has to minimize the error at all times • Zero/non-zero error: • Tells whether there is an error or not • The least information we could have • Magnitude of error: • The distance to the goal state • Direction of error: • Which way to go to minimize the error • Control is much easier if we know both magnitude and direction CPE 470/670 - Lecture 6

  20. A Robotic Example • Use feedback to design a wall following robot • What sensors to use, what info will they provide? • Contact: the least information • IR: information about a possible wall, but not distance • Sonar, laser: would provide distance • Bend sensor: would provide distance • Control Ifdistance-to-wall is right, thenkeep going Ifdistance-to-wall is larger thenturn toward the wall elseturn away from the wall CPE 470/670 - Lecture 6

  21. Simple Feedback Control Sharp turns void left() { motor(RIGHT_MOTOR, 100); motor(LEFT_MOTOR, 0); } void right() { motor(LEFT_MOTOR, 100); motor(RIGHT_MOTOR, 0); } • HandyBug oscillates around setpoint goal value • Never goes straight CPE 470/670 - Lecture 6

  22. Overshoot • The system goes beyond its setpoint  changes direction before stabilizing on it • For this example overshoot is not a critical problem • Other situations are more critical • A robot arm moving to a particular position • Going beyond the goal position  could have collided with some object just beyond the setpoint position CPE 470/670 - Lecture 6

  23. Oscillations • The robot oscillates around the optimal distance from the wall, getting either too close or too far • In general, the behavior of a feedback system oscillates around the desired state • Decreasing oscillations • Adjust the turning angle • Use a range instead of a fixed distance as the goal state CPE 470/670 - Lecture 6

  24. Simple Feedback Control Gentle Turns void left() { motor(RIGHT_MOTOR, 100); motor(LEFT_MOTOR, 50); } void right() { motor(LEFT_MOTOR, 100); motor(RIGHT_MOTOR, 50); } • Gentle Turning Algorithm: • Swings less abrupt • HandyBug completes run in 16 sec (vs. 19 sec in hard turn version) for same length course Minimize both overshoot and oscillation, but provide adequate system response to changes in setpoints CPE 470/670 - Lecture 6

  25. Wall Following • Negotiating a corner • Make little turns, drive straight ahead, hit the wall, back up, repeat • Disadvantage: time consuming, jerky movements • Alternative • Execute a turn command that was timed to accomplish a ninety degree rotation robot_spin_clockwise(); sleep(1.5); • Works reliably only when the robot is very predictable (battery strength, traction on the surface, and friction in the geartrain may influence the outcomes)  Open loop control CPE 470/670 - Lecture 6

  26. Open Loop Control • Does not use sensory feedback, and state is not fed back into the system • Feed-forward control • The command signal is a function of some parameters measured in advance • E.g.:battery strength measurement could be used to "predict" how much time is needed for the turn • Still open loop control, but a computation is made to make the control more accurate • Feed-forward systems are effective only if • They are well calibrated • The environment is predictable & does not change such as to affect their performance CPE 470/670 - Lecture 6

  27. Uses of Open Loop Control • Repetitive, state independent tasks • Switch microwave on to defrost for 2 minutes • Program a toy robot to walk in a certain direction • Switch a sprinkler system on to water the garden at set times • Conveyor belt machines CPE 470/670 - Lecture 6

  28. Types of Feedback Control There are three types of basic feedback controllers • P: proportional control • PD: proportional derivative control • PID: proportional integral derivative control CPE 470/670 - Lecture 6

  29. Proportional Control • The response of the system is proportional to the amount of the error • The output o is proportional to the input i: o = Kpi • Kp is a proportionality constant (gain) • Control generates a stronger response the farther away the system is from the goal state • Turn sharply toward the wall sharply if far from it, • Turn gently toward the wall if slightly farther from it CPE 470/670 - Lecture 6

  30. Determining Gains • How do we determine the gains? • Empirically (trial and error): • require that the system be tested extensively • Analytically (mathematics): • require that the system be well understood and characterized mathematically • Automatically • by trying different values at run-time CPE 470/670 - Lecture 6

  31. Gains • The gains (Kp) are specific to the particular control system • The physical properties of the system directly affect the gain values • E.g.: the velocity profile of a motor (how fast it can accelerate and decelerate), the backlash and friction in the gears, the friction on the surface, in the air, etc. • All of these influence what the system actually does in response to a command CPE 470/670 - Lecture 6

  32. Gains and Oscillations • Incorrect gains will cause the system to undershoot or overshoot the desired state  oscillations • Gain values determine if: • The system will keep oscillating (possibly increasing oscillations) • The system will stabilize • Damping:process of systematically decreasing oscillations • A system is properly damped if it does not oscillate out of control (decreasing oscillations, or no oscillations at all) CPE 470/670 - Lecture 6

  33. Proportional Control for Rotation Position of Wheel • Test system: • Control rotational position of LEGO wheel • Desired position: 100 • Will vary power to motor • Large LEGO wheel gives the system momentum (load on the system) • Quadrature-based shaft encoder keeps track of the shaft position CPE 470/670 - Lecture 6

  34. Proportional Control for Rotation Position of Wheel • Simple P controller: • Command = 100 – encoder-counts • Initially, the error is 100 • The motor turns on full speed • As it starts going, the error becomes progressively smaller • Halfway, at position 50, the error is only 50 • at that point the motor goes at 50% of full power • When it arrives at the intended position of 100, the error is zero • the motor is off CPE 470/670 - Lecture 6

  35. Proportional Control for Rotation Position of Wheel • Proportional gain: Command = 5(100 – encoder-counts) • Response should feel much “snappier” • The wheel reaches the setpoint position faster • More aggressive resistance to being turned away from the setpoint CPE 470/670 - Lecture 6

  36. Pgain = 10 Pgain = 20 Proportional Control power= Pgain * (0 - counts) • Pgain=10: • System overshot the zero point, and had to turn around • Offset Error: System did not stabilize at the goal • Power command too small to activate the motor • Pgain=20: should ameliorate the offset problem • Offset error is solved • Oscillation: the system overshoots three times—twice beyond the setpoint and once before it CPE 470/670 - Lecture 6

  37. Pgain = 30 Pgain = 50 Proportional Control power= Pgain * (0 - counts) • Pgain=30: • Oscillation problem is more pronounced; there are a total of five oscillatory swings • Pgain=50: Oscillation behavior has taken over • System cannot stabilize at the setpoint • A small error generates a power command that moves the system across the setpoint CPE 470/670 - Lecture 6

  38. Readings • M. Matarić: Chapter 10 CPE 470/670 - Lecture 6

More Related