forked from Tiryoh/ros_setup_scripts_ubuntu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathros-noetic-ros-base-testing.sh
executable file
·41 lines (30 loc) · 1.42 KB
/
ros-noetic-ros-base-testing.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
set -eu
[[ "$(lsb_release -sc)" == "focal" ]] || exit 1
ROS_DISTRO=noetic
sudo sh -c 'echo "deb http://packages.ros.org/ros-testing/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-testing.list'
sudo apt-get install -y curl
curl -k https://raw.githubusercontent.com/ros/rosdistro/master/ros.key | sudo apt-key add -
sudo apt-get update || echo ""
sudo apt-get install -y ros-${ROS_DISTRO}-ros-base
sudo apt-get install -y python3-rosdep
ls /etc/ros/rosdep/sources.list.d/20-default.list > /dev/null 2>&1 && sudo rm /etc/ros/rosdep/sources.list.d/20-default.list
sudo rosdep init
rosdep update
sudo apt-get install -y python3-rosinstall python3-rosinstall-generator python3-wstool build-essential python3-vcstool
sudo apt-get install -y python3-catkin-tools python3-osrf-pycommon
grep -F "source /opt/ros/${ROS_DISTRO}/setup.bash" ~/.bashrc ||
echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc
grep -F `catkin locate --shell-verbs` ~/.bashrc ||
echo "source `catkin locate --shell-verbs`" >> ~/.bashrc
grep -F "ROS_IP" ~/.bashrc ||
echo "export ROS_IP=127.0.0.1" >> ~/.bashrc
grep -F "ROS_MASTER_URI" ~/.bashrc ||
echo "export ROS_MASTER_URI=http://\$ROS_IP:11311" >> ~/.bashrc
echo ""
echo "Success installing ROS ${ROS_DISTRO}"
echo "Run 'source ~/.bashrc'"
echo ""
echo "If any error occurs, please refer to the following URL."
echo "https://github.com/Tiryoh/ros_setup_scripts_ubuntu/"
echo ""