-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathinstall.sh
executable file
·85 lines (71 loc) · 2.55 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
#!/usr/bin/env bash
# Supported versions ['melodic', 'noetic']
# shellcheck disable=SC1091
if [ "$(
. /etc/os-release
echo "$VERSION_ID"
)" = "20.04" ]; then
ROS_VERSION='noetic'
PYTHON_SUFFIX=3
else
PYTHON_SUFFIX=""
ROS_VERSION='melodic'
fi
# Create a log file of the installation process as well as displaying it
exec > >(tee telecarla-install.log)
exec 2>&1
echo "Setup TELECARLA for ROS $ROS_VERSION"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
WS_SRC="${SCRIPT_DIR}"/..
pushd "$WS_SRC" || exit
echo "Installing General Packages"
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
git \
software-properties-common \
apt-utils \
python3-pip
if [ -z "$PYTHON_SUFFIX" ]; then
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
python-pip \
python-protobuf
fi
echo "Installing Carla Ros Bridge"
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
ros-$ROS_VERSION-opencv-apps \
ros-$ROS_VERSION-ackermann-msgs \
ros-$ROS_VERSION-derived-object-msgs \
ros-$ROS_VERSION-vision-opencv \
ros-$ROS_VERSION-rospy-message-converter \
ros-$ROS_VERSION-rviz \
ros-$ROS_VERSION-rqt-image-view \
ros-$ROS_VERSION-pcl-ros
git clone --recurse-submodules https://github.com/carla-simulator/ros-bridge.git
rm -rf "$WS_SRC"/ros-bridge/rqt_carla_control \
"$WS_SRC"/ros-bridge/rviz_carla_plugin \
"$WS_SRC"/ros-bridge/pcl_recorder \
"$WS_SRC"/ros-bridge/carla_ad_demo
rosdep update
rosdep install --from-paths src --ignore-src -r
pip3 install -r "$WS_SRC"/ros-bridge/requirements.txt
if [ -z "$PYTHON_SUFFIX" ]; then
pip install -r "$WS_SRC"/ros-bridge/requirements.txt
fi
echo "Installing Carla Scenario Runner"
git clone https://github.com/carla-simulator/scenario_runner.git
if [ -z "$PYTHON_SUFFIX" ]; then
pip2 install -r "$WS_SRC"/scenario_runner/requirements.txt
fi
pip3 install -r "$WS_SRC"/scenario_runner/requirements.txt
echo "Installing TELECARLA GUI dependencies"
"$SCRIPT_DIR"/telecarla_gui/script/install_dependencies.sh "$PYTHON_SUFFIX"
echo "Installing TELECARLA RPC dependencies"
"$SCRIPT_DIR"/telecarla_rpc/script/install.sh
echo "Installing TELECARLA Scenario Evaluation Runner dependencies"
if [ -z "$PYTHON_SUFFIX" ]; then
pip2 install -r "$SCRIPT_DIR"/telecarla_scenario_runner/requirements.txt
fi
pip3 install -r "$SCRIPT_DIR"/telecarla_scenario_runner/requirements.txt
echo "Installing GStreaming dependencies"
"$SCRIPT_DIR"/gstreaming/setup/install_gstreamer.sh
echo "Finished TELECARLA Setup"