Skip to content

Gazebo with SITL - simplify instructions #1001

Description

@Katawann

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

  1. Install
    curl -ssL http://get.gazebosim.org | sh
  2. Run
    gazebo

ArduPilot SITL plugin
To communicate with SITL, it is necessary to add a plugin taken from here:

  1. 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
  1. Set Path of Gazebo Models
echo 'export GAZEBO_MODEL_PATH=~/ardupilot_gazebo/gazebo_models' >> ~/.bashrc
source ~/.bashrc
  1. 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 :) .

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions