Task 1A Instructions
Prerequisites
- Before starting the implementation of Task 1A, go through the following:
Problem Statement
-
The main goal of this task is to implement a generic
control_loopthat will have your PID control algorithm. -
The
control_loopfunction will instruct the robot that it has to follow the line from start point to the end point.
Procedure
-
For this task we have provided a “snippet” of code in
Task1a.pyfile. -
Task1a.pywill contain your control logic, andtask1a_scene.tttwill contain your Task 1A scene where the simulation will take place. -
Teams need to modify the one function given in
Task1a.pyfile according to the function description given below:control_loop(sensors)- This is the function in which teams have to implement the line following algorithm [PID]
- The PID controller Implementation is provided to you. Go through the documentation and implement the algorithm in this function.
- Teams are free to create any supporting functions that can be used in
control_loop.
-
Once the PID Implementation is completed, open CoppeliaSim and load the provided
task1a_scene.tttscene file -
To test and run your solution, follow the steps given below:
1. Run the bridge application:
- For Windows:
./bridge.exe
- For Ubuntu:
./bridge
2. Run your Python program:
- For Windows:
python task1a.py
- For Ubuntu:
python3 task1a.py
Expected Output:
You can compare the execution of your python file with Bot in Coppeliasim: (Your implementation may look different, as the main aim is to follow line)
WARNINGS !!
- Do not edit the name of any files / folders which are not su[pposed to be edited].
- Do not move/delete any files / folders.
- Do not edit the name, input or output arguments of any function.
- Teams are not allowed to edit any function, other than the functions they are asked to develop.
- You are allowed to create any supporting functions as you need in
Task1a.cfile but make sure they get called from within thecontrol_loop. - While completing the functions in
Task1a.cfile, you might require to print some information on Terminal for the debugging process, but make sure to comment / remove all of them before submitting the scripts to us.