-
Notifications
You must be signed in to change notification settings - Fork 16
/
install
executable file
·66 lines (51 loc) · 1.68 KB
/
install
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env bash
set -e
ARCH=$(uname -i)
RELEASE=$(lsb_release -c -s)
if [ $RELEASE == "trusty" ]
then
ROSDISTRO=indigo
elif [ $RELEASE == "xenial" ]
then
ROSDISTRO=kinetic
elif [ $RELEASE == "bionic" ]
then
ROSDISTRO=melodic
elif [ $RELEASE == "focal" ]
then
ROSDISTRO=noetic
else
echo "There's no ROS Distro compatible for your platform"
exit 1
fi
echo Installing ros-$ROSDISTRO
sudo apt update
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt -y update
sudo apt -y install dpkg
if [ $ARCH == "x86_64" ]
then
sudo apt -y install ros-$ROSDISTRO-desktop-full
echo "Installing ROS-$ROSDISTRO Full Desktop Version"
else
sudo apt -y install ros-$ROSDISTRO-ros-base
echo "Installing ROS-$ROSDISTRO Barebones"
fi
source /opt/ros/$ROSDISTRO/setup.bash
echo "source /opt/ros/$ROSDISTRO/setup.bash" >> ~/.bashrc
source ~/.bashrc
if [ $ROSDISTRO == "noetic" ]
then
sudo apt install -y python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
else
sudo apt install -y python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo `which rosdep` init
fi
rosdep update
rosdep install --default-yes --from-paths . --ignore-src --rosdistro $ROSDISTRO
echo ""
echo "ROS $(rosversion -d) Installation Done!"
echo "You can create your catkin workspace now. https://wiki.ros.org/catkin/Tutorials/create_a_workspace"
#rosdep fail
#https://github.com/ros-infrastructure/rosdep/issues/322