top of page

Obstacle Navigating Robot

Objective

The aim of this project was to program a robot to navigate through an obstacle course consisting of curved walls.

20210608_231724.jpg
Technical Details

The robot is made up of:

  • two LEGO® EV3 motors, one on the left and another on the right;

  • an Arduino® Due (with a motor shield and encoder shield) attached to control the motors;

  • a 9-axis motion shield to measure heading, position and acceleration;

  • an IR sensor to detect obstacles.

​

The robot uses a potential function to avoid obstacles; we can imagine it as a contour map, regions with obstacles are 'mountains' and free regions are 'valleys'. When the IR sensor detects an obstacle, it updates the potential function and places a 'mountain' at that point. The robot periodically this potential function to determine where the valleys are and what position it should move in.

 

The robot keeps track of its position as cartesian coordinates and its direction in terms of the heading/angle from the x-axis (shown in slideshow above). The program stores the x and y-coordinates, as well as heading of the robot, as global variables. Low level functions, within the program, are periodically implemented to calculate the robot's current coordinates and determinate the direction/heading it should move in.

​

I was responsible for designing the turning function, which rotates the robot to a determined desired heading. It executes command using a lead compensator. I chose a lead compensator, because it would prφovide enough gain to overcome friction. I avoiding adding integral control because it significantly increase the settling time of the closed loop system. The transfer function of the uncompensated plant has the following format:

φ(s)/U(s) = K/s(τs+1),

and the control law, relating control effort 'u' to error 'e' is

uz = cuz-1 + aez – bez-1.

The gains used for the lead compensator were determined using Matlab SISOTOOL and some in-situ tuning.

​

The turning function takes in a required heading (or angle the robot needs to turn to) as input . Then, by calling on the 9-axis motion shield, it is able to measure the current heading, and determine what angular distance it needs to turn. However, it doesn't implement the lead controller immediately after. This is because, it was almost impossible to find gains for the lead compensator that worked for every angle from 0° to 359°. This is because travelling smaller angular distances required higher gains than travelling smaller ones, as such I included a conditional statement that changes the gains of the lead compensator depending on the angular distance the robot needs to travel.

​

Results

Thereafter, the code runs as normal until the steady-state heading is reached. The videos in the slideshow above show the robot turning 20°, 90° and 180° respectively.

​

We tested the robot on a 12 feet by 12 feet obstacle course. There were a few problems, mainly with the IR sensors and how the program updated the potential function, but after fixing these minor bugs, the robot avoided the obstacles successfully.

​

This is a PDF of our project report.

© 2023 by Site Name. Proudly created with Wix.com

bottom of page