Language: C++
Programs: Visual Studio, ARIA library, MobileSim

Task is to write a program for the PeopleBot robot on the MobileSim simulator to demonstrate the following behaviours using a behavioural control architecture of your choice:

1. Obstacle avoidance:
The robot should avoid all obstacles and not come within 0.1m of any obstacle.

2. Wandering:
When no walls are detected the robot should move for a randomly chosen distance between 0.5m and 1.5m at a constant speed 0.5m/s, and then turn in a random direction by a randomly chosen angle between 20 degrees and 160 degrees,

Advanced behaviours:
3. Edge Following:
The robot should attempt to follow any wall edges detected within 1.0m at a constant distance of 0.5m. This behaviour should make use of an appropriate feedback control methodology.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

class ActionTurn : public ArAction
// constructor, sets the turnThreshold, and turnAmount
ActionTurn(double turnThreshold, double turnAmount);
// destructor, its just empty, we don't need to do anything
virtual ~ActionTurn(void) {};
// fire, this is what the resolver calls to figure out what this action wants
ArActionDesired *fire(ArActionDesired currentDesired);
// sets the robot pointer, also gets the sonar device, or deactivates this action if there is no sonar.
void setRobot(ArRobot *robot);

// this is to hold the sonar device form the robot
ArRangeDevice *mySonar;
// what the action wants to do; used by the action resover after fire()
ArActionDesired myDesired;
// distance at which to start turning
double myTurnThreshold;
// amount to turn when turning is needed
double myTurnAmount;
// remember which turn direction we requested, to help keep turns smooth
int myTurning; // -1 == left, 1 == right, 0 == none
$100.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available C-Family Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats