Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

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.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M91253732

Have any Question?


Related Questions in C/C++

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As