mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 09:58:28 -04:00
Tools: Add ardupilot_gazebo install script
Added ardupilot_gazebo package for simulation purposes
This commit is contained in:
parent
42a2a51dc7
commit
3a85f1152b
@ -4,6 +4,7 @@ set -e
|
|||||||
# set -x
|
# set -x
|
||||||
|
|
||||||
ROS_WS_ROOT=$HOME/ardupilot-ws
|
ROS_WS_ROOT=$HOME/ardupilot-ws
|
||||||
|
AP_GZ_ROOT=$HOME/ardupilot_gazebo
|
||||||
|
|
||||||
red=`tput setaf 1`
|
red=`tput setaf 1`
|
||||||
green=`tput setaf 2`
|
green=`tput setaf 2`
|
||||||
@ -246,6 +247,26 @@ else
|
|||||||
echo "Skipping adding ardupilot_ws to your home folder."
|
echo "Skipping adding ardupilot_ws to your home folder."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if maybe_prompt_user "Add ardupilot_gazebo to your home folder [N/y]?" ; then
|
||||||
|
if [ ! -d $AP_GZ_ROOT ]; then
|
||||||
|
git clone https://github.com/khancyr/ardupilot_gazebo
|
||||||
|
pushd $AP_GZ_ROOT
|
||||||
|
mkdir build
|
||||||
|
pushd build
|
||||||
|
cmake ..
|
||||||
|
make -j4
|
||||||
|
sudo make install
|
||||||
|
popd
|
||||||
|
popd
|
||||||
|
else
|
||||||
|
heading "${red}ardupilot_gazebo already exists, skipping...${reset}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Skipping adding ardupilot_gazebo to your home folder."
|
||||||
|
fi
|
||||||
|
|
||||||
heading "${green}Adding setup.bash, ROS_MASTER_URI and ROS_HOSTNAME to .bashrc ${reset}"
|
heading "${green}Adding setup.bash, ROS_MASTER_URI and ROS_HOSTNAME to .bashrc ${reset}"
|
||||||
grep -q -F "source $ROS_WS_ROOT/devel/setup.bash" ~/.bashrc || echo "source $ROS_WS_ROOT/devel/setup.bash" >> ~/.bashrc
|
grep -q -F "source $ROS_WS_ROOT/devel/setup.bash" ~/.bashrc || echo "source $ROS_WS_ROOT/devel/setup.bash" >> ~/.bashrc
|
||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
|
Loading…
Reference in New Issue
Block a user