Skip to content
MankaranSingh edited this page Jul 9, 2023 · 43 revisions

Installation

Flowpilot can be installed on:

  • Android phone
    • Non-rooted running
      • Android 10
      • Android 11
      • Android 12
    • Rooted running
      • Android 13+ requires root
  • Desktop pc with Ubuntu >= 20.04.

ℹ️ For issues, please open an issue on this repo.

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.

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

  2. Open termux app and grant storage permissions

    termux-setup-storage

    ℹ️ If pkg commands error out:

    1. Make sure that date-time on your device is set correctly,
    2. Try switching to a different termux repo by using termux-change-repo command.
  3. Upgrade packages

    pkg upgrade
  4. Install wget

    pkg install wget
  5. Install flowpilot environment

    wget -q https://raw.githubusercontent.com/flowdriveai/flowpilot/master/scripts/flowpilot-setup-env-android
  6. Make flowpilot-setup-env-android executable

    chmod +x flowpilot-setup-env-android
  7. Run 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.

  8. Login to this virtual environment using:

    • 💡 For root users, run sudo login-flowpilot-root
    • For non-root users, run login-flowpilot
  9. 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

      1. Check your internet connection
      2. Search your issue in the repo
      3. Report it in our discord community.
  10. After installation completes, install the flowpilot and termux-api apks

    ℹ️ they can be found in flowpilot/Downloads directory can be located from default android file manager.

  11. 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.

    1. 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.
  12. 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.

Android Auto Boot

Flowpilot can be set as the default android launcher for andorid. This will start flowpilot when phone boots. This is a good option if you plan to have a dedicated flowpilot device.

Setting up panda

Panda is the piece of hardware that facilitates the communication between the device running flowpilot and your car. Follow the panda wiki

Installing on Desktop

These steps are tested on ubuntu >= 20.04.

  • Setup environment
    sudo apt-get install -y wget
    wget -q https://raw.githubusercontent.com/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
  • In case flowpilot fails to use GPU (your gpu could be unsupported or your system dosent has/ or has outdated openCL drivers), it can show undefined behaviour like app crash or can get stuck at infinite oading screen.

Setting up cameras for flowpilot Desktop

Flowpilot desktop version internally uses OpenCV to get access to external cameras. By default, it's using a sample pre recorded video. On attaching a camera to PC, handles like /dev/video0 become available. To use camera stream instead of pre-recorded video, edit launch_flowpilot.sh and replace ROAD_CAMERA_SOURCE with your video handle (for eg: /dev/video0).

You can verify that the camera is working and is indeed the correct one if multiple cameras are there, use ffplay to verify the camera stream.

sudo apt install ffmpeg
ffplay /dev/video0

In case flowpilot fails to open camera, it can show undefined behaviour like app crash or can get stuck at infinite loading screen.

Running on simulation (CARLA)

See the simulation wiki

Up Next