![K-Team Khepera IV Stargazer Скачать руководство пользователя страница 25](http://html1.mh-extra.com/html/k-team/khepera-iv-stargazer/khepera-iv-stargazer_user-manual_648626025.webp)
21
int
kb_stargazer_read_data (
double *
x
, double *
y
, double *
z
,
double *
angle
, int *
idnum
, char *
cmode
, int
corr
)
Reads and interprets data from the Stargazer. Should be called periodically
(up to 10 times/s).
kb_gazer_start_computation
must be called once
before.
Return:
0
: no error
-1
: cannot serial port not open
-2
: cannot communicate with the Stargazer
-3
: buffer overrun (try to call more often this function!)
-4
: read command not acknowledged
-5
: data error
-6
: no landmark found
-7
: data error
-8
: no received data
-9
: mapid error
1
: update parameters after map building mode
>1
: MAPID in map building mode
Parameter:
*x
: x position relative to the reference landmark in [cm], right dir.
*y
: y position relative to the reference landmark in [cm], forward dir.
*z
: height to the landmark in [cm]
*angle
: angle relative to the reference landmark orientation in
[degree] (counterclockwise) in 0..360 range
*idnum
: id number of the currently used landmark
*cmode
: current mode: 'F' = map building mode, 'I' map mode, 'Z'
height calculation mode
corr:
1 apply position correction; 0 do not apply it
int
kb_gazer_calibration (
knet_dev_t *
mot1
,
knet_dev_t *
mot2
,
double *_
center_x0
,
double *
_center_y0
,
double
*
_angle_rot
,
double *
_a_axis
,
double *
_b_axis
,
double *
_stddev_x
,
double *
_stddev_y
)
Configures the Stargazer rotation compensation by moving the robot around
itself then fitting the result ellipse.
Return:
0
: no error
-1
: timeout while computing calibration
-2
: data buffer too short
-3
: error computing ellipse parameters
-4
: error: data are too scattered
< -4+ (return kb_stargazer_read_data)
: error getting Stargazer
data
Parameter:
*mode
:
height fix mode index.
*mot1
: left motor pointer
*mot2
: right motor pointer
*_angle_rot
: angle of rotation of the fitted ellipse
*_a_axis
: half major axis of the fitted ellipse
*_b_axis
: half minor axis of the fitted ellipse
*_stddev_x
: standard deviation error of x
*_stddev_y
: standard deviation error of y
Содержание Khepera IV Stargazer
Страница 1: ...Khepera IV Stargazer User manual Version 1 1 February 2017 ...
Страница 4: ......
Страница 30: ...26 K Team S A Z I Plans Praz 28 1337 Vallorbe Switzerland ...