A collection of ROS packages for Gazebo simulations of Ardupilot / PX4 UAV platforms
UAV ROS Simulation build status |
---|
ROS Package | 18.04 | 20.04 |
---|---|---|
uav_ros_stack | ||
ardupilot_gazebo | ||
ardupilot | ||
rotors_simulator | N/A | N/A |
mav_comm | N/A | N/A |
Follow these steps for a quick and easy start.
git clone https://github.com/lmark1/uav_ros_simulation
cd uav_ros_simulation/installation
./install_and_setup_workspace.sh
catkin build
source ~/.bashrc
Follow these installation steps if you have a catkin workspace already set up.
# Navigate to src folder of the catkin workspace
cd /path/to/catkin_ws/src
# Install uav_ros_stack
git clone https://github.com/lmark1/uav_ros_simulation
cd uav_ros_simulation
./installation/install.sh
# Build catkin workspace
catkin build
# Export GAZEBO_PLUGIN_PATH
./installation/gazebo/setup_gazebo.sh /path/to/catkin_ws/build
# Source ~/.basrhc or ~/.zshrc
source ~/.bashrc
UAV simulations are launched as tmuxinator sessions as follows.
cd uav_ros_simulation/startup/kopterworx_one_flying
./start.sh
To find out more about navigating the simulation environment please read HOWTO.md.
Make sure the following lines or their equivalents are found at the end of your ~/.bashrc (or ~/.zshrc) file in any order after installataion:
source /opt/ros/noetic/setup.bash
source /root/uav_ws/devel/setup.bash
source /usr/share/gazebo/setup.sh
# shell configuration
source /uav_ros_simulation/ros_packages/uav_ros_stack/miscellaneous/shell_additions/shell_scripts.sh
# Ardupilot exports
export PATH=$PATH:/root/uav_ws/src/uav_ros_simulation/firmware/ardupilot/Tools/autotest
export PATH=/usr/lib/ccache:$PATH
# ardupilot_gazebo exports
export GAZEBO_PLUGIN_PATH=$GAZEBO_PLUGIN_PATH:/root/uav_ws/build/ardupilot_gazebo
NOTE: Lines should be automatically added. If some lines are missing please report an issue and add those lines manually.
Depending on the simulation type additional ROS packages may need to be installed.
- velodyne_simulator - URDF description and Gazebo plugins to simulate Velodyne laser scanners
- gazebo_ros_magnet - This is a Gazebo model plugin that simulates a magnetic dipole-dipole model
- larics_gazebo_worlds - This package contains various worlds used in Gazebo simulations