diff --git a/README.md b/README.md index 1c16fa5d9..f65365572 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ pip3 install --upgrade pip pip3 install -e . ``` +If needed, `sudo apt install build-essentials` to install `gcc` and build `pybullet`. + ## Use ### PID position control example @@ -40,9 +42,10 @@ python3 learn.py In one terminal, run the Betaflight SITL binary ```sh -git clone https://github.com/betaflight/betaflight -cd betaflight/ -make TARGET=SITL # comment out this line: https://github.com/betaflight/betaflight/blob/c41b458e5891205da50465caeec0c1aa83beeb0c/src/main/main.c#L52 +git clone https://github.com/betaflight/betaflight +cd betaflight/ +make arm_sdk_install # if needed, `apt install curl`` +make TARGET=SITL # comment out this line: https://github.com/betaflight/betaflight/blob/master/src/main/main.c#L52 betaflight/obj/main/betaflight_SITL.elf ``` diff --git a/gym_pybullet_drones/examples/beta.py b/gym_pybullet_drones/examples/beta.py index f5c4b99b1..5e404c9ee 100644 --- a/gym_pybullet_drones/examples/beta.py +++ b/gym_pybullet_drones/examples/beta.py @@ -1,15 +1,19 @@ """Control + Betaflight. Setup ---- +----- Step 1: Clone betaflight https://github.com/betaflight/betaflight Comment out line `delayMicroseconds_real(50); // max rate 20kHz` from Betaflight's SIMULATOR_BUILD - https://github.com/betaflight/betaflight/blob/c41b458e5891205da50465caeec0c1aa83beeb0c/src/main/main.c#L52 + https://github.com/betaflight/betaflight/blob/master/src/main/main.c#L52 Step 2: Install betaflight configurator https://github.com/betaflight/betaflight-configurator/releases + wget https://github.com/betaflight/betaflight-configurator/releases/download/10.9.0/betaflight-configurator_10.9.0_amd64.deb + sudo dpkg -i betaflight-configurator_10.9.0_amd64.deb -Load the `../assets/beta.txt` configuration file onto the target using the BF configurator +Load the configuration file onto the target using the BF configurator + Type address `tcp://localhost:5761` (top right) and click `Connect` + Find the `CLI` tab (on the left) -> `Load from file` -> select file `../assets/beta.txt` Example -------