1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #!/bin/bash
- #Item8 ROS ubuntu 18.04 melodic
- #ROS It should be install in user not install in root
- #install
- sudo apt-get install chrony -y
- sudo apt-get install ntpdate -y
- sudo ntpdate -q ntp.ubuntu.com
- #var="deb http://packages.ros.org/ros/ubuntu \$(lsb_release -sc) main"
- sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
- #sudo sh -c "echo $var > /etc/apt/sources.list.d/ros-latest.list"
- sudo apt-key adv --keyserver "hkp://keyserver.ubuntu.com:80" --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
- echo "deb ros packages and keyserver"
- sudo apt-get update -y
- #sudo apt-get upgrade -y
- sudo apt-get install ros-melodic-desktop-full -y
- sudo apt-get install ros-melodic-rqt* -y
- sudo apt-get install python-rosdep -y
- sudo rosdep init
- rosdep update
- sudo apt-get install python-rosinstall -y
- sudo apt-get install python-rosinstall-generator -y
- sudo apt-get install python-wstool -y
- #setup
- echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
- source ~/.bashrc
- #Create Ros Workspace
- mkdir -p /home/使用者/catkin_ws/src
- cd /home/使用者/catkin_ws/;pwd;source /opt/ros/melodic/setup.bash;/opt/ros/melodic/bin/catkin_make
- #Setup
- source /home/使用者/catkin_ws/devel/setup.bash
- echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
- source ~/.bashrc
- # need user name
- echo $ROS_PACKAGE_PATH /home/使用者/catkin_ws/src:/opt/ros/melodic/share
- source ~/.bashrc
- printenv | grep ROS
- echo "ROS done"
|