rosInstall.sh 1.2 KB

1234567891011121314151617
  1. echo "nvidia" | sudo -S sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
  2. echo "nvidia" | sudo -S apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
  3. echo "nvidia" | sudo -S apt-get update
  4. echo "nvidia" | sudo -S apt-get install ros-melodic-desktop-full
  5. echo "nvidia" | sudo -S apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
  6. echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
  7. source ~/.bashrc
  8. echo "nvidia" | sudo -S apt-get install python-rosdep
  9. echo "nvidia" | sudo -S pip3 install rosdepc
  10. #echo "nvidia" | sudo -S sed -i '311i url="https://ghproxy.com/"+url' /usr/lib/python2.7/dist-packages/rosdep2/sources_list.py
  11. #echo "nvidia" | sudo -S sed -i '204i gbpdistro_url="https://ghproxy.com/"+gbpdistro_url' /usr/lib/python2.7/dist-packages/rosdep2/gbpdistro_support.py
  12. #echo "nvidia" | sudo -S find . -name '*.py' |sed -i "s/https\:\/\/raw\.githubusercontent\.com/https\:\/\/ghproxy\.com\/https\:\/\/raw\.githubusercontent\.com/g" \
  13. #`xargs -t grep "https://raw.githubusercontent.com" -rl`
  14. echo "nvidia" | sudo -S rosdepc init
  15. rosdepc update