Skip to content

Commit

Permalink
finalize
Browse files Browse the repository at this point in the history
  • Loading branch information
woensug-choi committed Jun 17, 2024
1 parent 3b76843 commit 361a7b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
20 changes: 6 additions & 14 deletions gz_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ pushd "$HOME/$GZ_INSTALL_ROOT" || {
exit 1
}

# Activate virtual environment of ROS2 Jazzy
# shellcheck disable=SC1090
source "$HOME/$VIRTUAL_ENV_ROOT/bin/activate"

# ------------------------------------------------------------------------------
# Install Dendencies
printf '\n\n\033[34m'; printf '=%.0s' {1..75}; printf '\033[0m\n'
Expand Down Expand Up @@ -268,8 +272,8 @@ echo
echo "To activate the new ROS2 Jazzy - Gazebo Harmonic framework, run the following command:"
echo -e "\033[32msource $HOME/$ROS_INSTALL_ROOT/activate_ros\033[0m"
echo -e "\nThen, try '\033[32mros2\033[0m' or '\033[32mrviz2\033[0m' in the terminal to start ROS2 Jazzy."
echo -e "To test gazebo, run following command separately in two termianls (one for server(-s) and one for gui(-g))"
echo -e "(Important!, both terminals should have \033[32msource $HOME/$ROS_INSTALL_ROOT/activate_ros\033[0m activated)"
echo -e "\nTo test gazebo, \033[31mrun following commands separately in two termianls (one for server(-s) and one for gui(-g))"
echo -e "(IMPORTANT, both terminals should have \033[0msource $HOME/$ROS_INSTALL_ROOT/activate_ros\033[31m activated)\033[0m"
echo -e '\033[32m gz sim shapes.sdf -s \033[0m'
echo -e '\033[32m gz sim -g \033[0m'
printf '\033[32m%.0s=\033[0m' {1..75} && echo
Expand All @@ -281,16 +285,4 @@ echo
echo "To deactivate this workspace, run:"
echo -e "\033[33mdeactivate\033[0m"

# Ask if user wants to install Gazebo Harmonic too (gz_install.sh)
echo -e "\n\033[33mDo you want to install Gazebo Harmonic too? (y/n)\033[0m"
read -r response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
echo -e "\033[36m> Installing Gazebo Harmonic...\033[0m"
curl -s -O https://raw.githubusercontent.com/IOES-Lab/ROS2_Jazzy_MacOS_Native_AppleSilicon/main/gz_install.sh
chmod +x gz_install.sh
# shellcheck disable=SC1090
source "$HOME/$ROS_INSTALL_ROOT/activate_ros"
./gz_install.sh
fi

popd || exit
10 changes: 4 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -497,15 +497,13 @@ echo "To deactivate this workspace, run:"
echo -e "\033[33mdeactivate\033[0m"

# Ask if user wants to install Gazebo Harmonic too (gz_install.sh)
echo -e "\n\n\033[33mDo you want to install Gazebo Harmonic (LTS version that matches with ROS2 Jazzy) too? (y/n)\033[0m"
echo -e "\n\n\033[32mGazebo Harmonic is simulator that is LTS pair with ROS2 Jazzy (y/n)\033[0m"
echo -e "\n\n\033[33mDo you want to install Gazebo Harmonic too? (y/n)\033[0m"
read -r response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
echo -e "\033[36m> Installing Gazebo Harmonic...\033[0m"
curl -s -O https://raw.githubusercontent.com/IOES-Lab/ROS2_Jazzy_MacOS_Native_AppleSilicon/main/gz_install.sh
chmod +x gz_install.sh
# shellcheck disable=SC1090
source "$HOME/$ROS_INSTALL_ROOT/activate_ros"
./gz_install.sh -r "$ROS_INSTALL_ROOT" -v "$VIRTUAL_ENV_ROOT"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/IOES-Lab/ROS2_Jazzy_MacOS_Native_AppleSilicon/main/gz_install.sh)" \
-- -r "ros2_jazzy" -v ".ros2_jazzy"
fi

popd || exit

0 comments on commit 361a7b1

Please sign in to comment.