Reference.RobotLineFollowConfig History

Hide minor edits - Show changes to markup

May 15, 2013, at 06:44 AM by Scott Fitzgerald -
Changed line 66 from:
  1. Set KP as 5, KD as 0, choose your robot speed. Leave intergrationTime as 10
to:
  1. Set KP as 5, KD as 0, choose your robot speed. Set intergrationTime as 10
Changed lines 68-69 from:
  1. If the robot goes out of the track, increase KP by 1
  2. Repeat the previous 2 steps, note if the robot is getting better at keeping to the line. Stop changing KP when it's no longer improved
to:
  1. If the robot goes off the track, increase KP by 1
  2. Repeat as long as the robot improves keeping on the line. Stop changing KP when it's no longer improved.
Changed lines 72-75 from:
  1. Repeat the previous 2 steps, until the it's not improved
  2. Repeat the previous 6 steps. That means, tune KP and KD in turn, note if the performance is improving
  3. When you get the robot following the track without running out, you are done with tuning. Take down the numbers so you can use it in the future.
to:
  1. Continue incrementing KD by 1, until it stops improving.
  2. When you get the robot following the track without running off the line, you are done with tuning. Take down the numbers so you can use it in the future.
May 15, 2013, at 06:41 AM by Scott Fitzgerald -
Changed lines 3-4 from:

lineFollowConfig(KP,KD,robotSpeed,intergrationTime)

to:

lineFollowConfig()

Changed lines 7-8 from:

Change the PD parameters for line following. It is only needed if line-following is not working correctly, or you want to change the robot speed when doing line-following.

to:

Change the parameters for line following.

Use this function if line-following is not working as expected, or you want to change the robot's speed while line-following.

This function changes the "PD algorithms" that enable to robot to think about what may happen next while line reading. The robot attempts to predict any possible errors on the next reading of the IR sensors, and corrects its movement accordingly by changing the speed of each wheel separately.

See the note below for a deeper explanation.

Changed lines 21-24 from:

KP,KD,integrationTime: int parameters for ajusting PD.

robotSpeed: int between 0 and 100, indicating the percentage speed of motors.

to:
  • KP : int, proportional gain
  • KD : int, derivative gain
  • integrationTime: int, delay time between each time we run the algorithm in ms
  • robotSpeed: int, between 0 and 100, indicating the percentage speed of motors.
Added line 60:
Changed lines 62-65 from:

KP helps the robot to follow the line and KD damping oscillation of the robot.

It needs some experiments to find out a good pair of the KP/KD value. Follow the instructions as follows:

to:

In the function, KP helps the robot follow the line, and KD dampens the oscillation of the robot.

To find good values for this, there needs to be some experimentation to find a good pair of values. An example test is listed below :

May 03, 2013, at 11:15 AM by Xun Yang -
Changed lines 1-2 from:
to:
May 01, 2013, at 06:06 PM by Xun Yang -
Changed lines 7-8 from:

Change the PD parameters for line following. It is only needed if line-following is not accurate enough.

to:

Change the PD parameters for line following. It is only needed if line-following is not working correctly, or you want to change the robot speed when doing line-following.

Changed lines 15-16 from:

KP,KD,integrationTime: int parameters for ajusting PID.

to:

KP,KD,integrationTime: int parameters for ajusting PD.

Deleted lines 67-69:

See a description of PID if you're curious what it means.

May 01, 2013, at 06:04 PM by Xun Yang -
Changed lines 66-67 from:
  1. When you get the robot following the track without running out, you get the best values. Take down the numbers so you can use it in the future.
to:
  1. When you get the robot following the track without running out, you are done with tuning. Take down the numbers so you can use it in the future.
Added line 74:
May 01, 2013, at 06:02 PM by Xun Yang -
Added lines 1-74:

Share