Skip to content

3.3.3 Debugging mode

Patrick Poole edited this page Aug 28, 2015 · 5 revisions

Debugging Mode

Debugging mode can be started by running the test script with the following command:

  • ./run.py -t

This will run all of the generation scripts without launching ros, the world or the robots. This allows for each robot to be run individually using the Run_Robot.py scripts. These scripts include the debugger functionality, allowing you to enter commands specified in the debugger class at command line, assisting in the easy of testing.

The Debugger Class

The debugger class is an object added in each robot run script. This object starts a new thread on initialisation. This thread listens for input, executing the corresponding command in the debugger class. With this functionality, robot state can easily be inspected at certain points of the run time, and robot state can be altered to test certain functionality.

Commands

The following commands are available at present:

  • ps - Prints the current action stack to the terminal.
  • stop - Prints whether the stopCurrentAction variable has been set.
  • unload - Set's the pickers/carriers current load to 0.
  • load - Set's the pickers/carriers current load to 100.
  • pickers - Prints the array of picker positions.
  • state - Prints the current state of the entity.

Pictured below is an example of the use of the debugger from terminal. After the robot has been started using it's respective run script, the 'ps' command is entered through the terminal. The current action stack of the running robot is then printed to terminal.

Clone this wiki locally