123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #!/bin/bash
- red="\e[31m"
- normal="\e[0m"
- CURRENT_PATH=$(dirname $(readlink -f "$0"))
- STDR_WS_PATH=${CURRENT_PATH%scripts}
- sudo apt update
- while [ $? -ne 0 ]
- do
- echo -e "${red}Can't update source list, will retry...${noraml}\n"
- sleep 10
- sudo apt update
- done
- sudo apt -y upgrade
- while [ $? -ne 0 ]
- do
- echo -e "${red}Can't install upgrade packages, will retry...${noraml}\n"
- sleep 10
- sudo apt -y upgrade
- done
- sudo apt install -y ros-$ROS_DISTRO-move-base ros-$ROS_DISTRO-amcl
- sudo apt install -y ros-$ROS_DISTRO-dwa-local-planner ros-$ROS_DISTRO-global-planner
- sudo apt install -y ros-$ROS_DISTRO-gmapping ros-$ROS_DISTRO-hector-mapping
- sudo apt install -y ros-$ROS_DISTRO-costmap-2d ros-$ROS_DISTRO-hector-nav-msgs
- sudo apt install -y ros-$ROS_DISTRO-map-server ros-$ROS_DISTRO-nav-core
- sudo apt install -y qt4-default
- sudo apt-get -y autoremove
- cd $STDR_WS_PATH
- catkin_make
- source devel/setup.bash
- echo "#config stdr_ws env by corvin" >>~/.bashrc
- echo "source ${STDR_WS_PATH}devel/setup.bash" >> ~/.bashrc
- exit 0
|