-
Notifications
You must be signed in to change notification settings - Fork 6
/
gen_install.sh
executable file
·87 lines (73 loc) · 2.87 KB
/
gen_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
#!/bin/bash
set -e
## Install ROS core :
echo "BEGINING ROS INSTALL"
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt-get -qq update -y
if(($(cat /etc/os-release | grep VERSION_ID|grep -o '".*"' | sed 's/"//g' | cut -c1-2 )==16));then
ROS_VERSION="kinetic"
else
if(($(cat /etc/os-release | grep VERSION_ID|grep -o '".*"' | sed 's/"//g' | cut -c1-2 )==18)); then
ROS_VERSION="melodic"
else
if(($(cat /etc/os-release | grep VERSION_ID|grep -o '".*"' | sed 's/"//g' | cut -c1-2 )==20)); then
ROS_VERSION="noetic"
fi
fi
fi
echo "installing for ros version: ${ROS_VERSION}"
sudo apt-get install -qq -y ros-${ROS_VERSION}-desktop-full
source /opt/ros/${ROS_VERSION}/setup.bash
## install rosmon, it would be weird for this to be in one of the packages:
#sudo apt-get install ros-${ROS_VERSION}-rosmon
sudo apt-get -qq install -y python3-rosdep
[ ! -d "/etc/ros/rosdep/sources.list.d" ] && sudo rosdep init -q
rosdep update -q --include-eol-distros
sudo apt-get -qq install -y python3-rosinstall python3-rosinstall-generator python3-wstool build-essential python3-catkin-tools
## Install packages we need:
echo "INSTALLING DEPENDENCIES NOT FOUND IN ROSDEP"
#pip install pyqtgraph --user
#I think I have replaced this by adding a symlink:
#python flo_face/teensy/src/serial_coms/computer/python/serial-coms/setup.py install --user
# Mutagen has dropped python 2 support. Last supported version was 1.43.0:
sudo apt-get -qq install -y python3-pip
pip install 'mutagen==1.43.0' --user -q
echo "INSTALLING ROSDEP DEPENDENCIES"
sudo apt-get -qq install python3-rosdep -y
cd ~/catkin_ws
echo "===== CHECK"
rosdep install --from-paths src --ignore-src -q -r -y --skip-keys "realsense2_camera realsense2_description rosbridge_suite rosbridge_server rosbridge_library rosbridge_msgs video_stream_opencv kobuki"
echo "===== CHECK"
cd -
echo "checking vars"
echo "github_actions: $GITHUB_ACTIONS"
echo "ci: $CI"
if [ "$GITHUB_ACTIONS" = true ]
then
echo "in github actions, SKIPPING REALSENSE"
else
echo "INSTALLING REALSENSE"
# bash realsense_install.sh
fi
echo "Adding updated webrtcros"
sudo apt-get install -qq -y libjsoncpp-dev #ros-melodic-webrtc
prior=$(pwd)
cd ~/catkin_ws/src
if [ ! -d "webrtc_ros" ] ; then
git clone --single-branch --branch develop https://github.com/RobotWebTools/webrtc_ros.git #https://github.com/anht-nguyen/webrtc_ros.git
fi
cd $prior
echo "Adding rosbridge without unsub"
prior=$(pwd)
cd ~/catkin_ws/src
if [ ! -d "rosbridge_suite" ] ; then
git clone --single-branch --branch nousub https://github.com/mjsobrep/rosbridge_suite.git
fi
cd $prior
# build it all
cd ~/catkin_ws && catkin build
source devel/setup.bash
cd -
## Create a folder for bag files
mkdir ~/flo_data -p