AirSim icon indicating copy to clipboard operation
AirSim copied to clipboard

SITL setup instructions in documentation

Open yashkaushal opened this issue 7 years ago • 4 comments

Hi,

I tried following the steps given in the px4 setup page updated in commit and got the directory does not exist error, after exploring more I found that the below steps are working to build and run PX4 SITL and tested it with AirSim in unreal as well.

1. mkdir -p PX4
2. cd PX4
3. git clone https://github.com/PX4/Firmware.git
4. cd Firmware
5. git tag -l
6. git checkout <desired version>
7. git branch -D master
8. git checkout -b master
9. git submodule update --init --recursive
10. make posix_sitl_default none_iris

I tested it with version 1.8.1 of PX4 on bash on windows and ubuntu 16.04

Please tell me if my method is correct and/or update the method given in documentation.

Thanks, Yash Kaushal

yashkaushal avatar Dec 03 '18 12:12 yashkaushal

Hi @yashkaushal That looks good! As a possible 10.a and 10.b ..

10a. make list_config_targets (Will show a list of possible targets) 10b. make posix_sitl_default none_iris (As an example)

I believe that page should be updated. One thing I don't know is if it's necessary to install all the NuttX developer stuff if you just want to run PX4 in SITL?

jasonhbartlett avatar Dec 09 '18 03:12 jasonhbartlett

Hi @jasonhbartlett Correct me if I'm wrong but I don't think AirSim does support any other configuration target out of the box other than posix_sitl_default and none_iris defines that it should wait for the simulator to connect and use model iris which is quadrotor.

It is not required to install any NuttX developer stuff for SITL, you may need to install some dependencies for building and running the firmware though like jinja2 and cmake. The make posix_sitl_default none_iris command will give error about the missing dependencies after which you can get them using apt-get or equivalent.

yashkaushal avatar Dec 10 '18 08:12 yashkaushal

@yashkaushal IDK cause I'm pretty new to this but there are several sitl options when I run 'make list_config_targets': posix_sitl_broadcast posix_sitl_default posix_sitl_ekf2 posix_sitl_inav posix_sitl_lpe posix_sitl_replay posix_sitl_rtps posix_sitl_shell posix_sitl_test I went with posix_sitl_ekf2 and none_iris.. And that worked. Don't exactly know if using ekf2 for state estimation is better than default (or maybe that is the default)? Can't find the docs for that. Also IDK if using iris as a model will mean I'm limited to a specific UAV system if I'm using simulator and want to try out larger or smaller UAV bodies with unique physics attributes? As I said I'm pretty new to this. Need to do a bunch more reading. LOL.

jasonhbartlett avatar Dec 11 '18 18:12 jasonhbartlett

Thanks the docs are updated to say "make posix_sitl_default none_iris" since this is the best way to launch SITL mode with AirSim. And yes, ekf2 is the current state estimation engine in the PX4 code. Other than that we've tried not to repeat too much of the build instructions from the PX4 firmware developer guide, since we'd then have to keep maintaining that. But what is listed at the top of this thread looks correct. The PX4 build will actually update the submodules to the right version matching the label you checked out.

lovettchris avatar Dec 18 '18 07:12 lovettchris