Khepera III Toolbox/The Toolbox/Scripts

The Scripts folder in the Khepera III Toolbox contains a series of scripts that simplify working with a Khepera III robot, or with a fleet of such robots. These scripts simplify common and often-used tasks, such as copying files onto robots, setting up SSH public key authentication, or shutting down robots. Rare and complicated tasks can always be performed using ssh, scp and other commands directly.

Using the Scripts and Getting Help
All scripts start with the letters k3.... Hence, if you type k3 in a bash shell, followed by pressing the tab key twice, all scripts are listed. This is especially useful for those scripts that you do not use daily. In addition, all scripts print a short help text when called with the -h option, e.g. k3put -h

Selecting Robots
Most scripts require you to specify the robots you are working with. This is done with +... arguments on the command line. Four methods for selecting robots are available:
 * By robot ID, e.g. +203 (which translates into the IP address 192.168.141.203)
 * By a range of robot IDs, e.g. +203-205 (which is the same as +203 +204 +205)
 * By IP address, e.g. +192.168.141.203
 * By the name of a robot or a fleet, e.g. +bob (which looks up the IP addresses or robot IDs in the environment variable K3_BOB)

A special robot is '+usb' which always translates to 192.168.1.2, the address of a robot connected via USB.

Working with a Fleet of Robots
If you are frequently working with a whole fleet of robots, it is Pinnacle Hip Lawsuit advantageous to give this fleet a name and define it as an environment variable. For instance, if you are working with robots 203, 204, 209, 210, 211 and 212, add the following line to your .bashrc file: export K3_MYFLEET=+203 +204 +209-212 and reload that file (source ~/.bashrc). From now on, you can select these robots using +myfleet as script argument. For instance, to copy the infrared_proximity program onto these robots, type k3put +myfleet infrared_proximity

Core Scripts
The following scripts are often used:

Development Scripts
The following scripts are used for developing new programs and modules:

Administration Scripts
The following scripts help with a couple of administrative tasks and are less frequently needed:

Filter Scripts
The following scripts convert program output into another format: