Hierarchical control using player/stage simulator

Assignment Help C/C++ Programming
Reference no: EM13714330

Project 2: Hierarchical Control using player/stage simulator
Project Description

In the Nested Hierarchical Controller, the PLAN module consists of a Mission Planner, a Navigator, and a Pilot. The Pilot connects with the ACT module to execute the drive and steering commands that cause the robot to move along a path segment.

In this exercise, you will build a Pilot to connect with the ACT module to move a simulated Player/Stage robot from its current position to a specified goal point. However, we will modify the interaction between the Pilot and the ACT module by using a servo-loop command structure rather than issuing longer line segment directions, as done in the "pure" hierarchical approach. In this servo-loop approach, SetSpeed() commands from the position2d client proxy are used to continually turn the robot in the desired direction, rather than trying to command absolute turning angle and distance commands. You will also build a skeleton Navigator module to feed successive positions to the Pilot for the robot to execute. For this exercise, you will not include any robot obstacle avoidance (thus, none of the range sensors will be used).

To accomplish this, program the following:

Create a simple ACT module that accepts as input (from the Pilot) the desired direction of motion from the Pilot and executes appropriate velocity and steering commands (using SetSpeed()).

Create a Pilot module that accepts as input (from the Navigator) an (x, y) goal point destination and generates the desired direction of motion based upon the robot's current position and orientation. Use the servo-loop approach rather than attempting to command absolute turning angle and distance commands. The desired direction of motion is passed down to the ACT module for execution. The Pilot module also regularly checks to see if the robot has reached the current goal point destination. If it has, it returns a success flag to the Navigator indicating that the goal has been reached.

Create a simple Navigator module that passes down to the Pilot successive goal points to be reached (one at a time). The Navigator should read in the goal points from a file. The file name should be entered through command line arguments. For example, I should be able to run your program with the following command "./proj2 waypoints.txt". The waypoints file should use the following format: each line contains a goal (x, y) position separated by a space. You do not have to do any error checking on this file. You can assume it is in the correct format. Once the Pilot module returns a success flag for the current goal, the Navigator should send down the next goal point. Once all goal points have been reached, the Navigator module should declare success and the robot code should exit. An example of the file is:

-6 3.2
-6 6.5
-6 3.2
-3.2 3.2
-3.2 6
-1.8 7.5
To run your code, create your own configuration and world file (name it proj2.cfg and proj2.world, you can do it by modify the myworld.cfg and myworld.world files, make sure that you use a relative directory path instead of an absolute path). Specify the following:

Use the hospital_section.png bitmap environment
Define your window as follows:
window(
size [755.000 684.000]
center[-6 1.5]
scale 0.025
)

In your proj2.cfg configuration file:
Define your robot's starting pose as [-10.071 3.186 0 -722.333]
All other settings are up to you (For your configuration file, you can attach any devices you want to your robot, but you may only need to use the position2d ClientProxy in your code.)
Be sure you only have 1 robot in your world.
Be sure that you use relative path, instead of absolute path when you include a world file, etc.
To confirm that you have these settings correct, your Stage view should look like this upon startup (note that different stage version may require slightly different configuration file, please change as appropriate):



RUN 1:

To test your robot control code, your robot should successively move to the following (x, y) goal points: (-6, 3.2), (-6, 6.5), (-6, 3.2), (-3.2, 3.2), (-3.2, 6), (-1.8, 7.5). These waypoints need to be visited in this exact sequence.

In this exercise, your code should work properly without needing any obstacle avoidance capabilities. Your robot should move smoothly from one waypoint to another without running into anything. So DON'T make use of sonar or laser, or any other Client Proxies other than position2d.

You can consider that your robot has reached a goal position when it reaches a distance of less than or equal to a distance of 0.15 (or less) unit from the goal position. You can fine-tune this minimum distance based on your program.

#2 TURN IN:

Screen dumps of the results of your program moving the robot to the series of goal points specified above in "RUN 1". The screen dumps should show the position of the robot when it reaches each waypoint, along with the trace of robot motions from the previous waypoint to the current waypoint.

RUN 2:

From run 1, you probably can see the requirements of a path planner output. In this exercise, you will plan a path (by hand) using a series of waypoints to get the robot from its starting position of [-10.071 3.186 0 -722.333] to the (x, y) goal point of [-4 -4] in the above environment. By hand, generate two alternative series of [x y] waypoints that the robot must follow to reach the goal point of [-4 -4]. Execute your code twice with the two different paths defined by two sets of waypoints.

#3 TURN IN:

Screen dumps of the results of your program controlling the robot through these two series of waypoints. The screen dumps should show the position of the robot when it reaches each waypoint, with the trace of the robot motions from the previous point to the current position.

#4 TURN IN:

Consider your solution to RUN 2 above. Answer the following questions: When a path planner generates a series of waypoints for a robot to follow to reach a goal, what considerations do you think must be taken into account to determine a preferred path, when multiple paths are possible? Did you have to fine-tune the parameters of your solution (e.g., velocities, steering rate, etc.) to generate appropriate paths for each different set of waypoints? Please explain.

Reference no: EM13714330

Questions Cloud

Obtain with what speed must the animal leave the ground : The best leaper in the animal kingdom is the puma, With what speed, in SI units, must the animal leave the ground to reach that height
What is the child centripetal acceleration : A child stands at the rim of a rotating merry-go-round of radius 2.6 m. The child has a mass of 56.0kg, and the carousel turns with an angular velocity of 2.5 rad/s. What is the child's centripetal acceleration
Find at what rate do we receive this information : A spacecraft traveling out of the solar system at a speed of .9c sends back information at a rate of 300 Hz. At what rate do we receive this information
Calculate the halfback average velocity : A football halfback dashes 18 m straight down the playing field in 2.8 s (in the positive direction). Calculate the halfback's average velocity in the horizontal direction for the entire motion, in meters per second
Hierarchical control using player/stage simulator : In the Nested Hierarchical Controller, the PLAN module consists of a Mission Planner, a Navigator, and a Pilot. The Pilot connects with the ACT module to execute the drive and steering commands that cause the robot to move along a path segment.
How long does it take to move the box : A box of books weighing 260 N is shoved across the floor of an apartment by a force of 370 N exerted downward at an angle of 34.9° below the horizontal. How long does it take to move the box
Find with what speed does the ball leave the club : A golf club strikes a 0.041-kg golf ball in order to launch it from the tee. With what speed does the ball leave the club
An essential component of compromised to a resource : 1. true or false? an essential component of compromised to a resource is that the situation resulting in the compromise was motivated by malice. A.true B.false
Find the maximum speed the car can have : Race tracks are "banked" so that cars may travel faster around curves. Consider the situation described in problem 5), but bank the track at 15°. What is the maximum speed the car can have without the tires slipping

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Counts the number of numbers between 150 and 200

create a program that counts the number of numbers between 150 and 200. This is what I have so far, but it's not working. It is an array of 500 number, I did not include the array because of obvious reasons.

  Prepare the function reverseit

Prepare the function reverseit that reverses the characters in a character array. You must also write main that calls reverseit.

  Function that will merge the contents

Write a function that will merge the contents of two sorted(ascending order) arrays of type double values, storing the result in an array output parameter (still in ascending order).

  Write a function named concatenate

If the function discovers that the number of cells in the large array is not large enough to hold all the numbers to be copied into it, then the function should return 0 to indicate failure.

  Write a function that returns a pointer to an array

Write and show a function that takes an integer n and returns a pointer to an array of the first n cubes (0, 1, 8, 27, and so on).

  What is the output of this code fragment as it is written

In the code fragment below, the programmer has almost certainly made an error in the first line of the conditional statement.

  Prompts the user to enter an integer

Write the code that prompts the user to enter an integer between 1 and 20 (including 1 and 20), reads the value using cin, and then prints the value that they entered in a statement that begins with "You entered a ". Save this version in a separate l..

  Define a static method samecolor in the car class

Write an abstract class Car to implement the Comparable interface. Write a Truck class and a Sedan class to implement Car. define a static method sameColor in the Car class to find out weather a Truck and a Sedan has the same color.

  Write c program for linked list applications

Write a complete C program which illustrates the Linked list applications data structures and algorithms. The program will read in mid-semester test scores as Main Linked List and produce six outputs:

  Computes the product of all elements in a vector

Write a C function that computes the product of all elements in a vector x of dimension n. The elements of the vector are stored in a double array of size n.

  Shows the effect of the preceding statements

The following program shows the effect of the preceding statements.

  Compute the average of each row

Write a program that prompts the user to enter 15 double numbers from the keyboard and save them into a 3 by 5 array in the main ( ). Then call a user-define function to compute the average of each row and print the original matrix and average of ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd