-
Maytheewat Aramrattana authoredUnverified0f1d7b54
Readme.md 2.21 KiB
Pre-requisite
- Ubuntu 16.04 LTS
- ROS Kinetic
- Assuming you use catkin build system
- Gazebo 7.14
- You can use this script here:
- Download or save it somewhere
- Go to the location that you saved it
- source ubuntu_sim_ros_gazebo.sh
OpenUAV
This simulation is based on OpenUAV project.
- In your home directory create a
src
folder by typingmkdir src
in your terminal cd src
- Clone all git repositories in OpenUAV to this folder by
git clone
command - Go to the
Firmware
repository by typingcd Firmware
-
source setup-install.sh
(press Return to continue when asked) - When it finishes, type
make posix_sitl_default
- Then try to run Gazebo by typing
gazebo
in your terminal - Connect the
sitl_gazebo
folder with yourcatkin_ws/src
folder by typingsudo ln -s ~/sitl_gazebo ~/catkin_ws/src
in your terminal - Connect the
src/Firmware
folder with yourcatkin_ws/src
folder by typingsudo ln -s ~/src/Firmware ~/catkin_ws/src
in your terminal - Go to your
catkin_ws/src
folder (cd ~/catkin_ws/src
) and build it by typingcatkin build
in the terminal. source devel/setup.bash
- Copy and paste this into your terminal
roscd; cd ..; cd src/Firmware make posix_sitl_default source ~/catkin_ws/devel/setup.bash source Tools/setup_gazebo.bash $(pwd) $(pwd)/build_posix_sitl_default export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd) export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/Tools/sitl_gazebo roslaunch px4 posix_sitl.launch roslaunch mavros px4.launch fcu_url:="udp://:14550@127.0.0.1:14557"
FAQ
posix_sitl
, Gazebo doesn’t launch and gives you a error message regarding geographiclib
If after making Do the following:
- In your terminal type:
sudo apt-get install ros-kinetic-mavros ros-kinetic-mavros-extras
- When that installation is ready type:
wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
-
./install_geographiclib_datasets.sh
(you might have to make the install_geographiclib_datasets.sh executable.)