flix/docs/build.md
2023-12-19 05:09:48 +03:00

1.8 KiB

Building and running

Simulation

Dependencies are Gazebo Classic simulator and SDL2 library.

Ubuntu

  1. Install Gazebo 11:

    curl -sSL http://get.gazebosim.org | sh
    

    Set up your Gazebo environment variables:

    echo "source /usr/share/gazebo/setup.sh" >> ~/.bashrc
    source ~/.bashrc
    
  2. Install SDL2:

    sudo apt-get install libsdl2-dev
    
  3. Run the simulation:

    make simulator
    

macOS

  1. Install Homebrew package manager, if you don't have it installed:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  2. Install Gazebo 11 and SDL2:

    brew tap osrf/simulation
    brew install gazebo11
    brew install sdl2
    
  3. Run the simulation:

    make simulator
    

Firmware

Arduino IDE (Windows, Linux, macOS)

  1. Install Arduino IDE.
  2. Install ESP32 core using Boards Manager.
  3. Build and upload the firmware using Arduino IDE.

Command line (Windows, Linux, macOS)

  1. Install Arduino CLI.

  2. Windows users might need to install USB to UART bridge driver from Silicon Labs.

  3. Compile the firmware using make. Arduino dependencies will be installed automatically:

    make
    

    You can flash the firmware to the board using command:

    make upload
    

    You can also compile the firmware, upload it and start serial port monitoring using command:

    make upload monitor
    

See other available Make commands in the Makefile.