-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
98 lines (90 loc) · 3.58 KB
/
install.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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/bin/bash
# Script to install development tools and libraries for robotics and simulation
echo
echo -e "\033[94m============================================================\033[0m"
echo -e "\033[94m== One-liner Installation Script for ROS-Gazebo Framework ==\033[0m"
echo -e "\033[94m============================================================\033[0m"
echo -e "Requirements: Ubuntu 24.04 LTS Noble"
echo -e "\033[94m============================================================\033[0m"
echo
echo -e "\033[96m(1/4) ------------- Updating the System ----------------\033[0m"
echo "Performing full system upgrade (this might take a while)..."
sudo sudo apt update && apt full-upgrade -y
echo
echo -e "\033[96m(2/4) ------------ Install Dependencies ---------------\033[0m"
echo -e "\033[34mInstalling essential tools and libraries...\033[0m"
sudo apt install -y \
build-essential \
cmake \
cppcheck \
curl \
git \
gnupg \
libeigen3-dev \
libgles2-mesa-dev \
lsb-release \
pkg-config \
protobuf-compiler \
python3-dbg \
python3-pip \
python3-venv \
qtbase5-dev \
ruby \
software-properties-common \
sudo \
cppzmq-dev \
wget
echo
echo -e "\033[96m(3/4) ------------ Install Package Keys ---------------\033[0m"
echo -e "\033[34mInstalling Signing Keys for ROS and Gazebo...\033[0m"
# Remove keyring if exists to avoid conflicts
sudo rm -f /usr/share/keyrings/ros2-latest-archive-keyring.gpg && \
sudo rm -rf /etc/apt/sources.list.d/ros2-latest.list
# Get Keys
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key \
-o /usr/share/keyrings/ros-archive-keyring.gpg
sudo wget https://packages.osrfoundation.org/gazebo.gpg \
-O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
ARCH=$(dpkg --print-architecture)
# shellcheck disable=SC1091
UBUNTU_CODENAME=$( . /etc/os-release && echo "$UBUNTU_CODENAME")
REPO="deb [arch=$ARCH signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] \
http://packages.ros.org/ros2/ubuntu $UBUNTU_CODENAME main"
echo "$REPO" | sudo tee /etc/apt/sources.list.d/ros2.list >/dev/null
DISTRO=$(lsb_release -cs)
REPO="deb [arch=$ARCH signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] \
http://packages.osrfoundation.org/gazebo/ubuntu-stable $DISTRO main"
echo "$REPO" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list >/dev/null
echo
echo -e "\033[96m(4/4) ------------ Install ROS-Gazebo ---------------\033[0m"
DIST=jazzy
GAZEBO=gz-harmonic
echo -e "\033[34mInstalling ROS Gazebo framework...\033[0m"
sudo apt update && apt install -y \
python3-rosdep \
python3-rosinstall-generator \
python3-vcstool \
$GAZEBO \
ros-$DIST-desktop-full \
ros-$DIST-ros-gz \
ros-$DIST-gz-ros2-control \
ros-$DIST-effort-controllers \
ros-$DIST-geographic-info \
ros-$DIST-joint-state-publisher \
ros-$DIST-joy-teleop \
ros-$DIST-key-teleop \
ros-$DIST-moveit-planners \
ros-$DIST-moveit-simple-controller-manager \
ros-$DIST-moveit-ros-visualization \
ros-$DIST-robot-localization \
ros-$DIST-ros2-controllers \
ros-$DIST-teleop-tools \
ros-$DIST-urdfdom-py \
ros-dev-tools
echo
echo -e "\033[32m============================================================\033[0m"
echo -e "\033[32mROS-Gazebo Framework Installation completed. Awesome! 🤘🚀 \033[0m"
echo -e "Following command will set-up ROS environment variables to run it"
echo -e "\033[95msource /opt/ros/jazzy/setup.bash\033[0m"
echo -e "You may check ROS, and Gazebo version installed with \033[33mprintenv ROS_DISTRO\033[0m and \033[33mecho \$GZ_VERSION\033[0m"
echo