- Ubuntu 20
- python3 installed
-
clone the project into ~/projects directory
-
- after installation run
source /usr/share/gazebo-11/setup.py
sudo apt-get update sudo apt-get install -y build-essential
-
run the following lines (to add mendatory lines to ~/.bashrc):
echo 'source /usr/share/gazebo-11/setup.sh' >> ~/.bashrc echo 'export GAZEBO_MODEL_PATH=~/projects/gazebo_visual_united/models:${GAZEBO_MODEL_PATH}' >> ~/.bashrc echo 'export GAZEBO_RESOURCE_PATH=~/projects/gazebo_visual_united/worlds:${GAZEBO_RESOURCE_PATH}' >> ~/.bashrc echo 'export GAZEBO_PLUGIN_PATH=~/apm/gazebo_visual_united/build:${GAZEBO_PLUGIN_PATH}' >> ~/.bashrc source ~/.bashrc
-
compile the plugins:
cd build cmake .. make sudo make install
-
test gazebo with the world -
gazebo /home/user/projects/gazebo_visual_united/worlds/iris_arducopter_runway.world --verbose
- after installation run
-
-
follow the installation process and clone the ardupilot project to ~/apm directory (or update all paths accordingly)
-
test sitl
sim_vehicle.py -v ArduCopter --map
-
the first run should build a lot of packages so this might take a while
-
sitl-gazebo test in terminal 1 -
gazebo /home/user/projects/gazebo_visual_united/worlds/iris_arducopter_runway.world --verbose
in terminal 2 -sim_vehicle.py -v ArduCopter -f gazebo-iris --map
-
controlling the vehicle should work and be seen in the gazebo. in terminal 2 -
param set DISARM_DELAY 0 arm throttle mode GUIDED takeoff 50
-
-
Optional - installing dronekit for basic mission script:
pip install dronekit dronekit-sitl
- clone http://github.com/dronekit/dronekit-python.git (in ~/projects directory)
- cd ~/projects/dronekit-python/examples/vehicle_state/
- instead of step 5 last section. running
python mission_basic.py --connect 127.0.0.1:14550
needs to do a mission in and be seen in the gazebo and sitl map.
-
install the project
sudo apt install python3-venv
python3 -m venv venv
- in the venv -
python3 -m pip --upgrade pip setuptools wheel
pip install -r requirements
-
cd ~/git; git clone https://github.com/robobe/pygazebo cd pygazebo; pip install build; python -m build pip install ~/git/pygazebo/dist/pygazebo-4.0.0-2019.07.tar.gz
- generating the messages -
- in the gazebo_unity_messages dir -
protoc -I=proto --python_out=py_msgs proto/*
- in the gazebo_unity_messages dir -
- setup -
- in the project root dir -
python setup.py develop
- in the project root dir -
- test everything - run usage
- run gazebo -
gazebo --world /home/user/projects/gazebo_visual_united/worlds/iris_arducopter_runway.world --verbose
- run sitl -
sim_vehicle.py -v ArduCopter -f gazebo-iris --map
- start gazebo_visual_united -
python entry_point.py
- [Optional] run a mission -
python mission_basic.py --connect 127.0.0.1:14550