Pitt CS 1699 - Intermediate Programming and System Design Using a Mobile Robot

Unformatted text preview:

CS 1699Intermediate Programming and System Design Using a Mobile RobotLab 3: Multiple Sensor IntegrationIntroductionThe purpose of this lab is to gain experience on interpreting data from multiple sensors, (sensorfusion) and to learn how to resolve conflicting data when it is presented. Your specific task is asfollows:Modify the waypoint navigation program from lab 2, to incorporate sonar data for positioning aswell as encoder data. In this case, we will provide a sonar target at a known position relative toeach waypoint. Using the location of the sonar contact, the location of the waypoints, and theposition report from the encoders, you should be able, if all goes well, to accurately navigate tothe waypoint. If navigation errors happen, they will appear as inconsistencies between the actualdistance to the sonar contact, as reported by the sonars, versus the distance calculated bytriangulation of the current encoder position report, the given waypoint location, and the givensonar contact location.ImplementationOverload the Go method from your previous lab with the following three-parameter versionGo (int TargetWaypointRange, int SonarContactRelativeBearing, int SonarContact Range)All three parameters are inputs that should be interpreted according to the diagram below.Start Waypoint Target Waypoint Sonar Contact TargetWaypointRange SonarContactRange SonarContactRelativeBearing In this diagram, the starting and ending waypoints are shown as circles and the sonar contact isshown as the square. The TargetWaypointRange parameter is the distance from the startwaypoint to the target waypoint. As in the lab 2 version, it is assumed that the robot has alreadybeen positioned to point toward the target by a previous turn command. TheSonarContactRelativeBearing and SonarContact Range parameters are the angle and distancefrom the start waypoint to the sonar contact. The bearing angle is given relative to a lineintersecting the start and target waypoints. All units are tenths of degrees and tenths of inches.The object of this lab is to have your Go routine detect when the information from the encoders iswrong and periodically correct for that error. To measure the error at any point in transit betweenthe waypoints, you will compare the distance to the sonar contact that you receive from the sonarto an expected distance that you calculate based on the position report from the encoder. Thiscalculation is based on simple geometry in which you will calculate the sides of a triangle formedby three points: 1) the robot position reported from the encoders, 2) the position of the targetwaypoint given in the input parameters, and 3) the sonar location given in the input parameters.Remember that you are being graded for both speed and accuracy, so the best solutions willcorrect “on-the-fly” rather than stopping, turning, and restarting. (stopping and starting alsointroduce additional free roll and slippage errors respectively). A REALLY COOL solution, willintroduce independent PID control on each wheel based on a positional error function.JUST A TIP OR TWO:• Remember that when you discover encoder errors, you can’t fix them, you just have toaccount for them in future navigation calculations.• Be careful not to correct too often, this will tend to cause more problems than it


View Full Document

Pitt CS 1699 - Intermediate Programming and System Design Using a Mobile Robot

Documents in this Course
Load more
Download Intermediate Programming and System Design Using a Mobile Robot
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Intermediate Programming and System Design Using a Mobile Robot and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Intermediate Programming and System Design Using a Mobile Robot 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?