The simulator uses ROS Melodic and Gazebo 9. For instructions on installing all necessary dependencies, please follow the readme in the PX4 Avoidance repository.
https://github.com/PX4/PX4-Avoidance
Complete the instructions until you reach the step to run local planner with the following command.
roslaunch local_planner local_planner_depth-camera.launch
Upon execution, if you are able to see an RViz window display the drone and its pointcloud, you have successfully installed all necessary dependencies.
This repository contains the Trial 1 and Trial 2 worlds that solutions will be tested in.
Begin by cloning this repository onto your machine. Once it is downloaded, follow these steps to begin the simulation:
Step 1: From the trial_1_setup
and trial_2_setup
directory, build the plugin
cd build
cmake ../
cd ..
make
Step 2: Update the Gazebo plugin path so that the current path is included. Run this command from the build directory.
echo "export GAZEBO_PLUGIN_PATH=`pwd`:$GAZEBO_PLUGIN_PATH" >> ~/.bashrc
source ~/.bashrc
Step 3: Update the Gazebo model path so that the models can be loaded properly.
cd ~/the_repository_path
echo "export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$(pwd)/trial_1_setup:$(pwd)/trial_2_setup" >> ~/.bashrc
source ~/.bashrc
Step 4: Run the world using Gazebo
cd ~uavcc-simulator/trial_1_setup
roslaunch gazebo_ros empty_world.launch world_name:=$(pwd)/trial_1.world
To run the Trial 2 world, follow the same instructions for Trial 1 with the trial_2_setup directory.
This simuator was tested on Ubuntu 18.04 with ROS Melodic.
This occurs when the GAZEBO_PLUGIN_PATH is incorrect. Ensure step 2 is run each time you run the program in a new terminal. The line in step 2 may be added to ~/.bashrc
to be run automatically each time a new terminal is opened.