14
4.4.2
Using the KSG with kgazer_test software
The
kgazer_test
is a test and example program given also in source
code in directory
src/tests/
of the Libkhepera library.
After copying this program to the Khepera IV and launching it with the
command
./kgazer_test
, it will initialize the Stargazer, display the version
of its internal software, ask if you would like to change its parameters
(number, type and reference of landmark) . Then, it will rotate to do a
calibration due to the fact that the ceiling may not be exactly parallel to the
KSG module. Then it displays an ASCII interface (figure 4.5).
You can move the robot with the keyboard arrows keys. The robot is
represented by the character
A
,
<
,
>
or
V
depending of its orientation. Other
keys are defined below:
+/-
: zoom in / out
Page Up / Down : speed up/down the robot
c
: redo position calibration
g
: goto xy (choose goal, then go to goal using a very
basic algorithm)
m
: if several landmarks, starts map building
k
: use / don’t use correction from calibration
p
: change stargazer parameters
s
: start/stop saving data to file
data_corr.csv
t
: display / undisplay old robot position
q
: exit program
Figure 7: kgazer_test ASCII interface
[cm,deg] x= -2.6 y= +4.4 angle= +18.2 height= +200.4 idnum= 560 | zoom: 5.0x speed[mm/s]: 23.4 ( 5120) mode: I
KEYS: (q):quit (arrows)=move (+/-)=zoom (PG UP/DOWN)=speed (s)=save(OFF) (k)=apply corr(OFF) (t)=trace (m)=build map(OFF) (p)=param
(c)=calib (g)=goto(OFF)
..
..... ....
... ..
.A. .
... ..
..
.. ..
. . -
. .
. 0,0 .
.. .
.. .
. ...
... ...
... .......
scale: x 20cm = > < y 20cm = -