Installation

The first step to program Robobo with Python is to clone or download the repository Robobo.py to your computer, and then, you can use it in two ways:

  • Putting your .py files inside of “robobo.py” folder, or
  • Adding the “robobo.py” folder to your project folder and adding “robobo.py” to your path as it’s shown below:
    import sys, os
    sys.path.append(os.path.join(os.path.dirname(__file__), '.', 'robobo.py'))
    

    For example, the following screenshot shows a project folder including “robobo.py”:


    If we want to use the Robobo library in “myscript.py”, we’ll add the two lines above to the beginning of the file:

    # This imports the system libraries needed to add "robobo.py" to the system path
    import sys, os
    
    # This adds "robobo.py" to the system path
    sys.path.append(os.path.join(os.path.dirname(__file__), '.', 'robobo.py'))
    
    # This imports the Robobo library    
    from Robobo import Robobo
    
    #  This creates a instance of the Robobo class with the indicated ip address
    robobo = Robobo('10.113.36.150')
    

The library runs with Python 3 and it must be installed before using the library, which also depends on the websocket-client library, that must also be installed.

pip install websocket-client

basic usage

You can find information about how to start using the Robobo.py library in the Robobo Wiki