Skip to content

Nepo assertion and debugging

Reinhard Budde edited this page Apr 16, 2019 · 1 revision

For Nepo we have created two new blocks: »debug« and »assert«. There are two main reasons for this:

  • allowing to test and debug integration tests easier and system independent, see Integration tests. All plugins support the two blocks so that they can be used for automatically generated tests.
  • the blocks could also be used for advanced programming in e.g. productive environments or for learning how to create advanced programs.

How to get a debug / assert block

Currently the blocks are not in one of the toolboxes. Please use the the following key combinations to create them:

  • Ctrl+3 - create a debug block. You will find the new block in the left upper edge of the workspace
  • Ctrl+4 - create an assert block. You will find the new block and an already connected logic compare block in the left upper edge of the workspace.

How to use the blocks

Both blocks are designed to create some useful output to an appropriate medium like console, serial or similar. The output medium depends on the robots system or capabilities.

The implementation of the assert block is derived from common assert functions. Only when the evaluation of the logic compare expression fails the output is created in the following form:

Assertion failed: <text> <left side of the expression> <operator> <right side of the expression>

Different to some common assert function the program will not exit in this case.

How to see the output

  • for all simulations open the "Developer tools" and checkout the console view: tbc
Clone this wiki locally