KISS IDE 5 Tutorial: Custom Boards

The KISS 5 simulator allows the user to choose a background board from a built-in library or use a custom board built by the user and included in the user's project. To use one of the built-in boards, simply choose the Link Simulator as your project's target. When the simulator window comes up, click on the Set Default Board button in the upper right, and choose the board you wish. You can then reset the robot and run the project again directly from the simulator window using the Run button in the lower left of the simulator.

In order to use your own board design, you need to create a board file and add that file to your project. Projects that contain a board file will use the board file contained in the project and will not access any of the built-in library boards.

Creating a Board File

To add a new board file to your project, add a new file to the project and use the Simulator Board Files → Blank Board template. Make sure to give the file a .board extension (or give no extension and KISS will add it for you). Note that a project cannot run if it only contains a board file; it also needs a program!

Board Commands

Each command for creating a board starts on its own line with the common word. The set of command words are:

In addition, lines that begin with # are comments and are ignored when the board is loaded.

Example Board

To use inches as the unit and to create a white rectangle 100×100 inches as the background, we would use the following commands:

set-units in

# This will be the bottom graphical layer
set-z -1.0
pen white 1
brush white
# background
dec-rect 0 0 100 100
  

These commands will form a white rectangle with a white border (the pen draws the border while the brush fills the rectangle). Since z has been set at -1, anything at a greater level will be drawn on top.

Next, we will draw some lines on the board. Lines are like PVC on a game board. They can be seen by range and touch sensors. Tape, on the other hand is visible only to downward looking reflectance sensors. Decorative lines and rectangles are visible to the user, but not to the robot. Note that the simulated robot can drive through all simulation objects - this makes it easier to test whether or not the robot is properly responding to sensor input. If we add the following commands to our file, we will have a V made out of PVC and a piece of tape running across the opening. We will also add a decorative line splitting the angle of the V, just to show that feature. All tape colors interact with the robot the same way, we will use red tape just to brighten up the board simulation.

#PVC V
set-z 1.0
pen gray 3
line 20 20 50 80 
line 50 80 80 20

#Tape across the V (note tape is placed under the PVC but above background)
set-z 0
pen red 4
tape 20 20 80 20

#The next line is visible only to user.
#The light blue color is defined using RGB in hex
pen #8080FF 1
dec-line 50 80 50 20
  

Need Help?

If you have any questions or need assistance, you can call KIPR at 405-579-4609 (M-F, 8:30 a.m. - 5:00 p.m. CST) or email KIPR support.

Copyright © 2014 KISS Institute for Practical Robotics