background image

 

 
 
 
 
 
 

Khepera IV Stargazer 

 

 

User manual 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Version 1.1

February 2017

 

Summary of Contents for Khepera IV Stargazer

Page 1: ...Khepera IV Stargazer User manual Version 1 1 February 2017 ...

Page 2: ...s Machines Corp Macintosh Apple Corp SUN Sparc Station SUN Microsystems Corp LabVIEW National Instruments Corp Matlab MathWorks Corp Webots Cyberbotics Ltd Logitech Logitech Int SA Gumstix Gumstix Inc Khepera K Team SA Stargazer Hagisonic co Ltd LEGAL NOTICE The contents of this manual are subject to change without notice All efforts have been made to ensure the accuracy of the content of this man...

Page 3: ... KSG SOFTWARE 6 4 USAGE 7 4 1 REQUIRED HARDWARE SOFTWARE 7 4 1 1 REQUIRED HARDWARE 7 4 1 2 REQUIRED SOFTWARE 7 4 2 ASSEMBLY 8 4 2 1 KSG ON THE ROBOT 8 4 2 2 LANDMARKS SETTING 9 4 3 POWER UP AND TEST 10 4 3 1 TEST 10 4 4 PROGRAMMING THE KSG 12 4 4 1 INSTALLATION OF THE LATEST LIBKHEPERA AND CONFIG FILE 12 4 4 2 USING THE KSG WITH KGAZER_TEST SOFTWARE 14 4 4 3 COMPILING YOUR OWN PROGRAM USING THE LI...

Page 4: ......

Page 5: ...is handbook This handbook introduces the KSG and its various operating modes For a quick start jump to chapter 4 Usage If this handbook does not answer one of the problems you wish to solve please consult the K Team web site http www k team com and especially the Forum and the FAQs Unpacking and Inspection KSG package description Description KSG description Usage KSG usage descriptions Warranty Le...

Page 6: ... when the board power is off Never leave the KSG powered when it is unused When you have finished working with KSG turn it off It will save the battery life 1 3 Recycling Think about the end of life of your product Parts of the board can be recycled and it is important to do so By recycling you can help to create a cleaner and safer environment for generations to come For those reasons please take...

Page 7: ... cm 3 degrees 2 Measurement time 10 times sec Autonomy 2h30 Li Pol battery Dimensions 85 width x 80 depth 3 x 56 height 4 mm Mass 117 g Compatibility Khepera IV extensions KB 250 specifications 1 ceiling height can be from 1 1 to 6 0 m but with different landmarks range may vary 2 with a homogenously flat floor 3 with cables 4 without lower ERNI connectors as plugged ...

Page 8: ...rd 2 DVD with software and this User Manual Updates can be found at http www k team com 2 2 Inspection First check that you have a complete package You should find the KSG module CD with o This user manual o The Libkhepera library software Then check that the wires connecting the Stargazer to the battery module are connected and not in bad shape ...

Page 9: ...is depicted in the Figure 3 1 The locations of various key elements are indicated for later references Figure 3 1 KSG overview top view Figure 2 KSG overview battery Stargazer module battery module y x α axis of rotation of the robot connector to robot BACK FRONT ...

Page 10: ...ts charge and connections to the robot The module is ON at startup and OFF when the Khepera IV is OFF 3 3 KSG Software The position and bearing are computed internally in the Stargazer and they are communicated through the serial port dev ttyS2 to the robot using several commands For the ease of use functions were developed and included in the Libkhepera library A test program named kgazer_test is...

Page 11: ... programs are described below 4 1 1 Required hardware Computer with Bluetooth or Wi Fi access KSG module Khepera IV robot 4 1 2 Required software Khepera IV light toolchain installed see Khepera IV User Manual Libkhepera library Remarks You may find updated version of these software at http ftp k team com ...

Page 12: ...ted in Figure 3Figure The assembly and disassembly must be done while the robot is switched OFF also the robot and KSG must not be charging Insert the KSG module on top of Khepera IV or Khepera IV extensions stack Pay attention to the orientation of the module front back Figure 3 Assembly ...

Page 13: ...andmarks You don t need to install all the 4 landmarks if your area is smaller And they don t need to be placed in a square shape because during the map building process the relative position of the landmarks are computed The default landmarks delivered with the KSG are of type HLD1S They can be used with a height range of 1 1 2 9 m See chapter 3 A and appendix C of Stargazer User s Guide for more...

Page 14: ... not for the normal use of that manual for Linux run sudo sh c echo EscapeChar etc ssh ssh_config open a ssh connections terminal to the robot see Khepera IV User Manual run the following command to set the serial port the terminal stty F dev ttyS2 115200 parenb cs8 clocal crtscts cat dev ttyS2 it should display lines like below without interruption if the robot is under landmarks on the first ter...

Page 15: ... stops may be needed The command CalcStart starts again the position computation write the following command to get Stargazer firmware version Version return should be Version Version 2 1101 18 See Stargazer User s Guide for more information on chapter 6 for commands and on chapter 7 for landmarks http ftp k team com KheperaIII KSG StarGazer_Guide_02 0904 16 English pdf A Serial Device dev ttyS2 B...

Page 16: ...usr lib libkhepera This should give this where the number after so is the current version 0 usr lib libkhepera so 315 usr lib libkhepera so 1 0 4 4 1 Installation of the latest libkhepera and config file To use the KSG with the Khepera IV it s necessary to install the libkhepera version 1 0 or greater Normally if you have received the Khepera IV at the same time than the KSG the Khepera IV is read...

Page 17: ... libkhepera Copy or send the libkhepera so 1 0 file located in the build khepera 2 6 lib directory of the libkhepera source files to the directory usr lib Link the libkhepera file as libkhepera so ln s usr lib libkhepera so 1 0 usr lib libkhepera so ...

Page 18: ...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 star...

Page 19: ...rogram filename in line 35 at the variable TARGETS of the file in the src test Makefile or start with the template program in the template directory As for all the Khepera IV extensions you need to initialize the library before using the functions described below The Libkhepera provides high level functions which include all the available capabilities of the KSG Look at the following sections to v...

Page 20: ...ine MARK_ALONE 0 MARK_MAP Map landmark mode index define MARK_MAP 1 NB_HEIGHT_FIX_MODES Number of landmark height modes define NB_HEIGHT_FIX_MODES 2 HEIGHT_FIX_NO Index of the non fix height define HEIGHT_FIX_NO 0 HEIGHT_FIX_YES Index of the fixed height define HEIGHT_FIX_YES 1 ANGLE_CORRECTION Angle correction for calibration define ANGLE_CORRECTION 137 0 CALIB_STDEV_MAX Maximum standard deviatio...

Page 21: ... functions of the libkhepera There below you will find details about declared functions for the KSG extensions in the Libkhepera libraries The green words indicate the type of the function or parameter and must not be included in your code The blue words are the parameters You must declare it in your code before calling the function Only the black words can be directly added to your code int kb_st...

Page 22: ...ers of landmarks to be used Return 0 no error 1 serial port not open 2 command not acknowledged Parameter number numbers of landmarks int kb_gazer_set_ref_if int refid Sets the landmark id as reference Return 0 no error 1 serial port not open 2 command not acknowledged Parameter refid reference id int kb_gazer_get_ref_if int refid Gets the landmark id as reference Return 0 no error 1 serial port n...

Page 23: ...t kb_gazer_get_landmark_mode int mode Sets the landmark mode index Return 0 no error 1 serial port not open 2 command not acknowledged 3 unknown landmark mode Parameter mode landmark mode index int kb_gazer_set_height_fix_mode int mode Sets the height fix mode index Return 0 no error 1 serial port not open 2 command not acknowledged 3 mode not valid Parameter mode height fix mode index int kb_gaze...

Page 24: ...b_gazer_start_computation void Starts computation of position Return 0 no error 1 serial port not open 2 command not acknowledged Parameter int kb_gazer_wait_stop_computation void Stops computation of position and wait until it stops retry MAX_STOP Return 0 no error 1 serial port not open 2 command not acknowledged Parameter int kb_gazer_stop_computation void Sends the computation stop of position...

Page 25: ... 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 Sta...

Page 26: ...pera debug level Highly recommended for development kb_set_debug_level 2 initialise the libkhepera if ret kb_init argc argv 0 return 1 printf nInitialising Stargazer module please wait n initialise the Stargazer module if ret kb_stargazer_Init 0 printf nError initialising the Stargazer error d n ret kb_stargazer_Close return 2 get Stargazer firmware version kb_gazer_get_version version printf nSta...

Page 27: ...f height 6 1f idnum 4d mode c n i x y angle z idnum cmode break case 3 fprintf stderr nERROR read error buffer too short leaving n break case 6 printf The sensor does not see any landmark n break case 8 fprintf stderr nERROR no data received n break default fprintf stderr nERROR read error number d n ret usleep 100000 wait for next data kb_stargazer_Close return 0 ...

Page 28: ...er on the condition that Customer brings such Product to K TEAM within the period mentioned before In case of repair or replacement K TEAM may own all the parts removed from the defective Product K TEAM may use new and or reconditioned parts made by various manufacturers in performing warranty repairs and replacement of the Product Even if K TEAM repairs or replaces the Product its original warran...

Page 29: ...age due to 1 acts of God accident misuse abuse negligence commercial use or modifications of the Product 2 improper operation or maintenance of the Product 3 connection to improper voltage supply or 4 attempted repair by any party other than a K TEAM authorized module service facility This limited warranty does not apply when the malfunction results from the use of the Product in conjunction with ...

Page 30: ...26 K Team S A Z I Plans Praz 28 1337 Vallorbe Switzerland ...

Reviews: