Question: Solve using C language. Solve using C language. Mobile robots are commonly used to transport objects from a start position to a goal position (e.g
Solve using C language.




Solve using C language.
Mobile robots are commonly used to transport objects from a start position to a goal position (e.g warehouse).This can be achieved by line following or wall following. In this activity, we will demonstrate how to implement a simple line following mobile robot behavior. Goal Start Figure 1 Consider the following states of a line following mobile robot: Move Straight Steer to the Left Steer to the Right Hard Steer to the Left Hard Steer to the Right The mobile robot has a line sensor, which is composed of three pairs of light transmitters and receivers. Recerve Transmit Transmit White Black Figure 2 Below are the possible sensor readings: Sensor Binary Decimal ReadingRepresentation Representation 0 001 010 100 Figure 3 Possible positions of the mobile robot with respect to the line: goal Figure 4 Write a program that satisfies the state diagram below. The program asks for a sensor reading and decides the next state. Display the sensor value, current state, and next state. Use loop to continuously ask for an input until the user quits. The initial state of the robot is 1. 010->2 100->4 sensor - 001->1 Move Straight (1) 010-2 010> Steer Right 001->1 Steer Left (2) 100->4 000-0 100->4 001 Hard Steer Left (4) Hard Steer Right (5) 000->0 Figure 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
