Program for keeping the robot straight with the Gyro Sensor (Proportional compensation)

Proportional implementation for keeping the LEGO Mindstorms robot straight. The program will take the value of the Mindstorms Gyro sensor and will apply this value to the steering block. This will make the robot steer in a direction that would put the robot in a straight position again.

Download
  • #mnxqf9
  • 10 Jan 2018

Implementing the final program for moving straight with the Gyro Sensor

This video tutorial contains the final 2 programs for moving straight with a LEGO Mindstorms EV3 robot. The first program is for proportional compensation that just keeps the robot orientation straight, while the second program is for Integral compensation that returns the robot to the straight line when the robot makes a mistake. 

Keep the LEGO robot orientation straight. Proportional Part. Coefficients.

We should multiply the error by a certain number and then add it to the steering of the LEGO Mindstorms Steering block. In this way, by changing the coefficient we change how much/fast should the proportional part influence the steering of the robot. 

Keep the LEGO Mindstorms robot orientation straight by using the Gyro Sensor. Proportional Part.

The first part of making the robot move straight is to keep it oriented straight. While it moves it could make an error and turn slightly to the right and then the program should turn in back to the left to make its orientation straight. In this video tutorial, we would discuss how to implement a program to keep the robot orientation straight even when we are pushing or pulling it to either side and in the same time it has different wheels.

Courses and lessons with this Program

This Program is used in the following courses and lessons

Image for Moving Straight with LEGO Mindstorms EV3 robots
Course icon fllcasts
  • 24
  • 102:09
  • 3
Image for PID Algorithm for Moving Straight with Gyro Sensor. Proportional Part
Lesson icon fllcasts
  • 5
  • 0
  • 0
  • 3d_rotation 1
Image for Moving Straight with LEGO Mindstorms EV3 robots
Course icon fllcasts
  • 24
  • 102:09
  • 3
Image for Moving in straight line with LEGO Mindstorms EV3 robots
Lesson icon fllcasts
  • 1
  • 0
  • 0
  • 3d_rotation 0