Using Gazebo Simulator with SITL - update the tutorial
I installed Gazebo Simulator to work with SITL and it works perfectly. However, I think the tutorial is a little bit hard to understand (a lot of possibilty to install but few of them are really fastidious and did not work for me). Maybe an update would be nice. I share here the steps I did to connect SITL to Gazebo, which could be useful for others (the installation has only been tested with Ubuntu 16.04 LTS).
Install Gazebo
Install Gazebo as proposed on the website
- Install
curl -ssL http://get.gazebosim.org | sh
- Run
gazebo
ArduPilot SITL plugin
To communicate with SITL, it is necessary to add a plugin taken from here:
- Add the plugins for ArduPilot SITL
git clone https://github.com/SwiftGust/ardupilot_gazebo
cd ardupilot_gazebo
mkdir build
cd build
cmake ..
make -j4
sudo make install
- Set Path of Gazebo Models
echo 'export GAZEBO_MODEL_PATH=~/ardupilot_gazebo/gazebo_models' >> ~/.bashrc
source ~/.bashrc
- Copy Demo Worlds to Gazebo
sudo cp -a ~/ardupilot_gazebo/gazebo_worlds/. ~/<your_working_space>/worlds
And that's it !
Run Gazebo and SITL
On 1st Terminal (Launch Ardupilot SITL)
sim_vehicle.py -v ArduCopter -f gazebo-iris --mav10 --console -I0
or only:
sim_vehicle.py -j4 -f Gazebo
On 2nd Terminal (Launch Gazebo with demo 3DR Iris model)
gazebo --verbose worlds/iris_irlock_demo.world
If you have better solution I would be glad to hear it! I still have some difficulties to communicate between two machines (a powerful machine to run Gazebo and my laptop for SITL/Mission Planner) so if anyone have an idea how to do it, please share :) .
Using Gazebo Simulator with SITL - update the tutorial
I installed Gazebo Simulator to work with SITL and it works perfectly. However, I think the tutorial is a little bit hard to understand (a lot of possibilty to install but few of them are really fastidious and did not work for me). Maybe an update would be nice. I share here the steps I did to connect SITL to Gazebo, which could be useful for others (the installation has only been tested with Ubuntu 16.04 LTS).
Install Gazebo
Install Gazebo as proposed on the website
curl -ssL http://get.gazebosim.org | shgazeboArduPilot SITL plugin
To communicate with SITL, it is necessary to add a plugin taken from here:
sudo cp -a ~/ardupilot_gazebo/gazebo_worlds/. ~/<your_working_space>/worldsAnd that's it !
Run Gazebo and SITL
On 1st Terminal (Launch Ardupilot SITL)
sim_vehicle.py -v ArduCopter -f gazebo-iris --mav10 --console -I0or only:
sim_vehicle.py -j4 -f GazeboOn 2nd Terminal (Launch Gazebo with demo 3DR Iris model)
gazebo --verbose worlds/iris_irlock_demo.worldIf you have better solution I would be glad to hear it! I still have some difficulties to communicate between two machines (a powerful machine to run Gazebo and my laptop for SITL/Mission Planner) so if anyone have an idea how to do it, please share :) .