
Outlines Developing Robot A. Overview of the Robotics Course Programming Lab B. Robot Programming with Player/Stage Projects C. Robot Programming with Tekkotsu D. Robot Programming Projects P1. Waypoints Following Xuejun Liang P2. Target Searching Department of Computer Science P3. Path Planning Jackson State University P4. Localization and Navigation Jackson, MS, USA P5. Another Version of P4 E. Conclusion FECS 2012 FECS 2012 A. Course Overview Course Overview (Cont.) o CSC499/539 Introduction to Robotics. o Lectures (3 Hours) Elective course for Covering major topics on AI mobile robotics Both senior undergraduate students and graduate students Reviewing C++ and Introducing robot programming with o Prerequisites: Player/Stage and Tekkotsu CSC 325 Operating System o Homework Assignments CSC 323 Algorithm Design and Analysis Assignments on major robotics topics o Catalog Description o Robot Programming Projects Introduction to robotics and the key artificial intelligence Five major robotics programming projects issues involved in the development of intelligent mobile robotics, including software control architectures, Real robot (iRobot Create) and simulation localization, navigation, sensing, planning, and uncertainty FECS 2012 FECS 2012 Course Overview (Cont.) iRobot Create/ASUS Netbook Platform o Differential Drive o Midterm and Final Examinations o Buttons o Required Textbook Power, Play, Advance Introduction to AI Robotics, by Robin R. Murphy Wheel Drops (Front, Left, Right) o Reference Book Bumps (Left, Right) The Robotics Primer, by Maja J Mataric o Sensors Behavior-Based Robotics, by Ronald C. Arkin Wall, IR o Course Website Cliffs (Left, Front Left, http://www.jsums.edu/robotics/ Right, Front Right) Encoders (Distance, Angle) FECS 2012 FECSo 2012 Leds 1 B. Player Sever for Robot Control Stage Simulator o Player provides a network Robot Control o Stage simulates a population of mobile robots moving in interface to a variety of real or Program and sensing a two-dimensional bitmapped environment. simulated robots and sensor (Client) o Various sensor models are provided, including hardware. data TCP Sonar, scanning laser command o Player's client/server model allows Connection rangefinder, pan-tilt-zoom robot control programs to be camera with color blob written in any programming Player detection and odometry language and to run on any (Server) o Stage devices present a standard computer with a network data Device Player interface. connection to the robot command Specific Connection Few or no changes are o Player supports multiple required to move between concurrent client connections to Real or Simulated simulation and hardware devices Robot FECS 2012 FECS 2012 Two Important Files Creating C++ Client Program o World (.world) file o Server/Client Control Structure Needed when doing simulation using Stage Player is server, your program is client Things are available in the world, including robots, items, Your code controls hardware on robot through something and layout of the world called proxy. o Configuration (.cfg) file o Program structure Robot information: Drivers Include the Player header file Real robot driver is build in Player already Establish a Player client Simulation driver is always Stage Connect your code to the device proxies Items in .world file if your code interacts with them. Control Loop (Interacting with Proxies) FECS 2012 FECS 2012 int main(int argc, char *argv[]) { int randcount = 0; C. Tekkotsu Framework double speed, turnrate; Vector random(0,0); o It provides lower level primitives for PlayerClient robot("localhost"); An Example of Position2dProxy pp(&robot, 0); Sensory processing, Client Program: pp.SetMotorEnable (true); Smooth control of effectors, and Random Walk while(true) Event-based communication { o It provides higher level facilities, including // update the proxies robot.Read(); A hierarchical state machine formalism for managing control flow in the application, // generate a random vector wander(randcount, random); A vision system, // compute the speed and the turn rate An automatically maintained world map, and translate(random, speed, turnrate); Newly added Tekkotsu crew, including localization and // command the motors path planning, etc. pp.SetSpeed(speed, turnrate); o It provides housekeeping and utility functions, such as } timers and profilers } FECS 2012 FECS 2012 2 Programming with Tekkotsu Tekkotsu State and Transition o Application programmer simply define subclasses that o State nodes are behaviors inherit from the Tekkotsu base classes, and override any Enter (Activate), Leave (Deactivate), Listen Events, member functions requiring customization Process Events o Behaviors and Events o Transitions are also behaviors Behaviors: Construct, Activate, Deactivate, Listen Events, A transition starts to work whenever its source state node Process Events, becomes active. Events: Generator, Source, Type Transitions listen for sensor, timer, or other events, and o State Machine when their conditions are met, they fire. Robot moves from state to state. When a transition fires, it deactivates its source node(s) and Each state has an associated action: speak, move, etc. then activates its destination node(s). Transitions triggered by sensory events or timers. FECS 2012 FECS 2012 An Example: Annoying Dog Shorthand Notation #include "Behaviors/StateMachine.h" $nodeclass AnnoyingDog : StateNode { o A shorthand notation is used instead of C++ code to build virtual void setup() { state machines. The shorthand is turned into C++ by a state $statemachine{ launch: StateNode machine compiler. bark: SoundNode($, "barkmed.wav") o Node definition: howl: SoundNode($, "howl.wav") label: ClassName`(args)[inits] wait: StateNode launch =N=> bark o Transition definition: bark =T(5000)=> howl =label:TransAbbrev`(args)[inits]=> bark =B(RobotInfo::GreenButOffset) o Node Class definition [setSound("ping.wav")]=> wait wait =T(15000)=> bark $nodeclass ClassName(parameters) : ParentName(args) : howl =C=> wait initializers : methodname { } body } } } FECS 2012 FECS 2012 REGISTER_BEHAVIOR(AnnoyingDog); Advanced Knowledge of Tekkotsu D. Robot Programming Projects Projects o Transit from one state to multiple states o P1. Waypoints Following simultaneously so as to support parallel actions or o P2. Target Searching behaviors, o P3. Path Planning o P4. Localization and Navigation o Transit from one state to one of multiple states based on different conditions so as to make a conditional o P5. Another Version of P4 transition, and Discussing Aspects 1. Task and steps to accomplish the task, o Pass and/or share data among states so as to provide approaches of the data flow and the memory 2. Programming model (structure) and skills, 3. Concepts, algorithms, and mathematical formulas, 4. Issues regarding to failures, uncertainty, and real-time constraints FECS 2012 FECS 2012 3 P1. Waypoint Following Waypoint Following (Cont.) o Read waypoints from file 1. Following waypoints File I/O and queue data structure Read with simulation o Go to waypoint Waypoints From a File Get the current pose of the robot 2. Following a square path Compute how far the robot to the waypoint Set of Waypoints with iRobot Create and Compute the angle of the robot to the waypoint measure its odometry error Pilot Return true if the robot has reached the waypoint, Next Waypoint Waypoint is reached otherwise, return false o Translate Distance, Speed, Angle Turn rate Use servo-loop control approach to determine an updated Go to Translate Waypoint speed and turn rate to drive the robot based on the distance and angle between robot and waypoint. FECS 2012 FECS 2012 Waypoint Following (Cont.) P2. Target Searching o Uncertainty Odometry error Laser Avoid Vector Obstacles Wheel slippage and discretization of the continuous wheel rotations Sequencer Vector Combine Steering, o Mathematical formulas and Concepts Vector Velocity Vector Translate Compute distance between two points Wander Vector Compute slope of a line Compute angle between two lines Fiducial Vector detector Go to Angle range: [-π, π] Beacons Degree V.S. Radian o Programming skills Detect beacon File I/O operations and queue operations Pass-by-value V.S. Pass-by-reference Note: Vector is a pair of distance and direction FECS 2012 FECS 2012 Target Searching (Cont.) Target Searching (Cont.) o Avoid obstacles o Go to beacon Check to see if there is an obstacle in front using laser Check to see if there is a beacon using Fiducial detector scanner. If a beacon is found If an obstacle is found, set up a distance and an direction to go for about 2 seconds to avoid the obstacle. Compute how far the robot to the beacon Otherwise, set distance=0 and direction=0. Compute the angle of the robot to the beacon o Wander Computer the world coordinates of the beacon Generate a random distance and a random direction every 3 If a beacon is not too close (and has not been visited seconds yet), return true, Otherwise, return false o Combine Otherwise, return false Compute weighted sum of the two input vectors o Sequencer o Translate If a beacon is detect, use avoid obstacle and go to beacons Same as in P1 FECS 2012 Otherwise, use avoid obstacleFECS 2012 and wander 4 Target Searching (Cont.) P3. Path Planning o Mathematical formulas and Concepts Goal Generate a random number in a given range Wavefront Path Planer The path planner accepts as Compute distance and angle input a user's goal point and Coordinate Transformation
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages8 Page
-
File Size-