Module API


This is the top-level namespace of the rocon_console ROS package. It provides nodes, utilities and supporting libraries for enabling interactions between users and a ros master.


Colour definitions and logging functions for colourising the console.

Colour Definitions

The current list of colour definitions include:

  • Regular: black, red, green, yellow, blue, magenta, cyan, white,
  • Bold: bold, bold_black, bold_red, bold_green, bold_yellow, bold_blue, bold_magenta, bold_cyan, bold_white

These colour definitions can be used in the following way:

import rocon_console.console as console
print(console.cyan + "    Name" + console.reset + ": " + console.yellow + "Dude" + console.reset)


Detects if the specified stream has colourising capability.

Parameters:stream – stream to check (typically sys.stdout)

Prefixes ‘[debug]’ and colours the message green.

Parameters:str (message) – message to log.

Prefixes ‘[error]’ and colours the message red.

Parameters:str (message) – message to log.

Prefixes ‘[fatal]’ and colours the message bold red.

Parameters:str (message) – message to log.

Prefixes ‘[info]’ to the message.

Parameters:str (message) – message to log.

Prefixes ‘[warn]’ and colours the message yellow.

Parameters:str (message) – message to log.

Table Of Contents

Previous topic

Colouring the Console

This Page