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.
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
|