Sunday, October 7, 2018

Ardupilot gazebo

Gazebo Plugin for Arducopter

  • ubuntu 16.04
  • ROS Kinetic
    • gazebo 7

Preinstall

sudo apt-get install libgazebo7-dev

Install and build plugin

cd <path>/ardupilot git clone https://github.com/SwiftGust/ardupilot_gazebo cd ardupilot_gazebo/ mkdir build cd build cmake .. make -j4 sudo make install

Setup

  • Add worlds to gazebo resource search path
  • Add modules to gazebo model search path (.bashrc)
#Add to .bashrc # init / export gazebo env variables source /usr/share/gazebo/setup.sh export GAZEBO_RESOURCE_PATH=/ardupilot_gazebo/gazebo_worlds:${GAZEBO_RESOURCE_PATH} #modules export GAZEBO_MODEL_PATH=~/ardupilot_gazebo/gazebo_models:${GAZEBO_MODEL_PATH} source ~/.bashrc

Run

  • Terminal 1 (SITL)
sim_vehicle.py -v ArduCopter -f gazebo-iris -m --mav10 --map --console -I0
  • v: Vehicle

  • f: Frame

  • m: mavproxy args

    • mav10
    • map
    • console
  • I:

  • Terminal 2 (gazebo)

gazebo --verbose iris_irlock_demo.world
[Dbg] [ArduCopterPlugin.cc:722] ArduCopter controller online detected.

No comments: