User interface

From Rsewiki
Revision as of 18:16, 23 January 2016 by Jca (Talk | contribs)

Jump to: navigation, search

Contents

Screen dumps

The user interface can configure and run the robot, as well as inspecting almost all values on the robot. Written in python using Qt GUI library.

The interface looks like on figures below.

Regbot gui robot.png

Figure 1. The general settings for the robot. The left panel is the general connection status and space for som messages from the robot. The central tab is mostly for configuration of the robot and some sensor and calculated values like pose and tilt. To the right is a fast graph of the last mission.

Gui rev0.png

Figure 2. The data logging options. A number of sensor values and interface points in the robot software can be logged. The window text window shows loaded data from a mission. The log format is designed to be directly compatible with the 'load' function in MATLAB.

The GUI allows to make step responses for velocity and turn (and most of the other controllers). The step response is recorded in a buffer on the robot and is fetched in a MATLAB style file (as shown). Interface points that are recorded can be switched on and off to better utilize the limited buffer size on the robot (35kBytes).

Gui ctrl rev 1.png

Figure 3. This is a page to make a step response and insert controller values for velocity control. The same controller is used for both wheels.

Regbot gui show menu.png

Figure 4. Other tab pages are available from the "show" menu.

Mission

Mission specification consist of mission lines, each line consist of two (lower case) parts divided by ':'

drive values : continue conditions (conditions are OR'ed)

e.g.:

vel=-0.2, acc=3.0 : dist=1, time=12

Drive backwards at a speed of 0.2m/s, accelerate with 3m/s2 for 1 meter (or max 12 seconds)

Drive values

  • VEL is velocity in m/s - positive is forward, 0=stop. uses last value if omitted.
  • ACC is acceleration limit in m/s2. Uses last value if omitted.
  • TR is turnradius in metre - positive, 0 is turn on the spot. straight if omitted
  • LOG is log interval in milliseconds. Once started it continues until buffer is full.
  • BAL is balancing, uses last value if omitted.
  • LABEL is a label number that can be used by GOTO.
  • GOTO is a jump to the label number given. This can be limited to COUNT

Line-sensor

If a line sensor is installed, then the following should work too:

  • LINER is following Right side of line at -2..2 (in cm), positive is right
  • LINEL is following Left side of line at -2..2 (in cm), positive is right
  • WHITE set to 1 if follow-line tape is white, else 0

Distance sensor

If IR distance sensors are installed, then these should work:

  • IRSENSOR is IR-sensor to use (1 is distance to a wall, and 2 is distance in front).
  • IRDist is IR-distance to hold.

Continue conditions

':' is separation of parameters and continue condition.

  • DIST is driven distance in this mission line - positive meters
  • TURN is angle turned in this mission line - degrees, positive is Left (CCW if forward speed)
  • TIME is max time in this mission line - positive seconds
  • COUNT is used with GOTO and GOTO will be ignored, if this line is executed more than this count

Example: Drive 0.2m then turn 30 deg to the right (turn radius=0, but will be more with acceleration being only 1m/s2) then drive another 1 second at a higher speed (or maximum 0.4m).

vel=0.2,acc=1 : dist=0.2
tr=0 : turn = -30
vel=0.5 : dist=0.4,time=1

Example Zig-zag sideways: drive 0.2m backwards and then turn 45 deg left, 45 deg right and a bit forward repeated 2 times more with a goto (to label=6).

vel=-0.2, acc=2.0: dist=0.2
label=6:
tr=0.15: turn=45.0
tr=0.15: turn=-45.0
vel=0.2:dist=0.18
vel=-0.2,goto=6: count=2

Line sensor

This section is valid if a line sensor is installed and calibrated. Use "Edge" tab for calibration (put edge sensor "ON" and on a dark background and press "Calibrate no reflection" and then on a bright background and press "Calibrate white reflection", then "save on robot").

  • XB, XW is test for crossing black/white line, value is 0..20, 0 is true on no crossing, 1..20 is confidence in crossing (20 is highest)

Example: Drive until a crossing black line is found or 2.5m is driven, then continue until the crossing line is gone (reached other side of line) and stop

vel=0.2, log=5, acc=2: xb>16, dist=2.5
:xb < 4,dist=0.2
vel=0:time=0.1

Example find white line and follow edge: Drive until (white) line is found - as before - then turn to the right and follow line for 0.5 m.

vel=0.2, log=5, acc=2: xw>16, dist=2.5
:xw < 4,dist=0.2
vel=0:time=0.3
tr=0,vel=0.2:turn=-90
linel=0, white=1: dist=0.5


vel=0.3,acc=2,log=10:
linel=0,white=1:xb>5,dist=1
vel=0:time=0.5

Distance sensor

  • LV is test for valid line 0=true for no valid line, 1=true for valid line. IR1, IR2 is test for distance measured by IR sensor. TILT is test for tilt angle (0 is balance point)

Examples

e.g.: drive-turn-drive-turn at 20cm/s:

vel=0.2, acc=1.5 : dist = 0.5, time=5
tr=0.15 : turn=90
: dist = 0.5
tr=0.15 : turn=90
vel=0 : time=1

e.g. wait 5 seconds

vel=0 : time=5 

Save

Transfer the mission to the robot RAM by pressing "Save" (top right), the mission will be lost by a reboot or power off, unless saved on robot!

Save the mission on the robot flash memory (EE-prom) by pressing "save on Robot" (left panel). NB! The space is limited (about 100 lines)!

The mission can also be saved in a text-file useing the bottom right save button

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox