Regbot settings

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(Heading control)
(Edge control)
 
Line 43: Line 43:
  
 
With the new 10cm line sensor optimal setting is not found, a kp=0.1 - 0.15 seems OK, output limit should not be set.
 
With the new 10cm line sensor optimal setting is not found, a kp=0.1 - 0.15 seems OK, output limit should not be set.
 +
Here are two sets of settings that could be used, both with relative short distance from robot rotation point and the sensor (4-7cm) longer distance should have lower Kp gain.
 +
 +
[[File:edge_control_thomas_marcussen_2017.png]]
 +
Thomas Marcussen - bsc project
  
 
[[File:line_edge_control.png]]
 
[[File:line_edge_control.png]]
Line 48: Line 52:
 
The control uses a Lag-controller to decrease the static gain by a factor 5 (a pole with a time constant of 1.5 sec and a zero with a time constant of 0.3 seconds). This means that the high frequency gain is Kp*0.3/1.5 = 0.06.
 
The control uses a Lag-controller to decrease the static gain by a factor 5 (a pole with a time constant of 1.5 sec and a zero with a time constant of 0.3 seconds). This means that the high frequency gain is Kp*0.3/1.5 = 0.06.
  
The gain is further scaled by the speed (from firmware version 604), so that the gain is reduced to half at 0.5m/s, but the filter times are maintained. This is probably a bad solution, as the response probably is more distance driven than time driven.
 
  
  

Latest revision as of 11:06, 23 March 2020

Back to Robobot.

This is some suggestions for changed settings for Robobot.

Using the regbot configuration GUI.

Contents

[edit] Robot configuration

Metric setup

The distance between driving wheels are different from a Regbot - on version 4 WB is ~21cm.

Robobot robot settings.png

[edit] Line sensor

The line sensor should be calibrated with a white paper (or tape line) and either a black line or looking into nothing. After that "show normalized" should all sensors show about 75%.

Crossing detect should be ?

Line sensor.png

[edit] IMU calibrate

The gyro can be calibrated only. Let the robot stand still and press the calibrate button.

NB! the axis orientation depends on the position of the IMU chip, and may not be intuitive.


Imu calibrate.png

[edit] Control issues

Some examples of control settings.

Velocity control works fine with "Feed forward" = 4 and a Kp = 15 - and keep the output limit = 9V (or less).

[edit] Edge control

For higher speed in the range 0.7-0.9 m/s the following control settings could be used.

With the new 10cm line sensor optimal setting is not found, a kp=0.1 - 0.15 seems OK, output limit should not be set. Here are two sets of settings that could be used, both with relative short distance from robot rotation point and the sensor (4-7cm) longer distance should have lower Kp gain.

Edge control thomas marcussen 2017.png Thomas Marcussen - bsc project

Line edge control.png

The control uses a Lag-controller to decrease the static gain by a factor 5 (a pole with a time constant of 1.5 sec and a zero with a time constant of 0.3 seconds). This means that the high frequency gain is Kp*0.3/1.5 = 0.06.


A test script to could be:

thread=1
   vel=0.01, acc=5.0, log=50.0: time=0.2
   vel=0.9, edger=1, white=0: dist=10.0, xb=20
   vel=0,event=7 : xb<10
   :vel< 0.1
   vel=-0.3,tr=0.1:turn=60
   vel=0.3,tr=0.1:turn=60
   vel=-0.3,tr=0.1:turn=60
   vel=0.7, edger=-1, white=0: dist=10.0, xb=20, log=0

The mission follows right side of line,

  • in a left curve (1mØ) until crossing a line
  • wait for crossing line to disappear,
  • and velocity reach 0
  • make a 3-point 180 degree turn
  • follow the other side of line - now a right curve (until log is full or 10 meters or crossing another black line)

The difference between a left and a right curve is the "edger=1.0" and "edger=-1.0", this makes the robot follow the curve with an offset of 1cm towards the center of the curve (more left in a left curve). This gives more space for overshoot when hitting the curve - the sensor range is about +/- 2cm.

If the line is no longer valid, then the last curvature is maintained, i.e. there is a chance that the the line will be re-found.

[edit] Heading control

Heading control is not used during a tr=xx based turn, but after such a turn the heading control maintains the end heading. The end heading is the start heading plus the turned angle.

While driving straight, then the heading control attempts to keep the heading.

Heading control is somewhat speed dependent, these parameters seems to be good at about 0.6 m/s.

Heading control dialog.png

Figure 3. Heading control parameters for OK turns at a velocity of about 0.6 m/s. The controller is a PI-Lead controller with a weak pre-filter.

A 20 degree turn with an acceleration limit of 1m/s^2 and a turn radius of 0.2m makes a turn like this:

Heading ctrl 20 deg.png

Figure 4. The log starts at about 0.55 seconds and the turn starts 0.1 seconds hereafter. The dotted line is the resulting heading, the magenta line is the target heading (when not in a turn. The red curve is the mission line number in the script below. As the acceleration is rather slow (1m/s^2) the the turn radius is not reached when half the turn is reached, so at this time the turn is deemed finished, so that there is time to recover. At this time the heading control is reengaged, and takes the heading to the desired 20 degrees. The x-axis is in seconds and the y axis in degrees. The red mission curve is line number in the script below.

This curve is generated with the following script:

thread=6
   : time=0.01
   vel=0.6, acc=1.0: dist=0.1,time=1
   log=3.0: time=0.1
   tr=0.2: turn=20.0
   : dist=0.3, log=0

[edit] Servo steering

* The steering offset should be set so that steering wheel is pointing forward (when driving forward), and 
* The distance is the distance from rear wheels axle to front wheel axle (~17cm).
* scale should be set to set so that when turning with a radius equal to wheel base, then steering wheel should be perpendicular to not rotating wheel.

Servo steering.png

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox