Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Task 1A Instructions


Prerequisites



Problem Statement

  • The main goal of this task is to implement a generic control_loop that will have your PID control algorithm.

  • The control_loop function 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.py file.

  • Task1a.py will contain your control logic, and task1a_scene.ttt will contain your Task 1A scene where the simulation will take place.

  • Teams need to modify the one function given in Task1a.py file 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.ttt scene 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.c file but make sure they get called from within the control_loop.
  • While completing the functions in Task1a.c file, 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.