Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools: Add ardupilot_gazebo install script #22598

Merged
merged 2 commits into from
Jan 6, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Tools/environment_install/install-ROS-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e
# set -x

ROS_WS_ROOT=$HOME/ardupilot-ws
AP_GZ_ROOT=$HOME/ardupilot_gazebo

red=`tput setaf 1`
green=`tput setaf 2`
Expand Down Expand Up @@ -246,6 +247,26 @@ else
echo "Skipping adding ardupilot_ws to your home folder."
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
snktshrma marked this conversation as resolved.
Show resolved Hide resolved
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}"
grep -q -F "source $ROS_WS_ROOT/devel/setup.bash" ~/.bashrc || echo "source $ROS_WS_ROOT/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
Expand Down