forked from XR-Robotics/XRoboToolkit-Teleop-Sample-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
54 lines (44 loc) · 1.41 KB
/
setup.sh
File metadata and controls
54 lines (44 loc) · 1.41 KB
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
#!/bin/bash
# Check the operating system
OS_NAME=$(uname -s)
OS_VERSION=""
if [[ "$OS_NAME" == "Linux" ]]; then
if command -v lsb_release &>/dev/null; then
OS_VERSION=$(lsb_release -rs)
elif [[ -f /etc/os-release ]]; then
. /etc/os-release
OS_VERSION=$VERSION_ID
fi
if [[ "$OS_VERSION" != "22.04" ]]; then
echo "Warning: This script has only been tested on Ubuntu 22.04"
echo "Your system is running Ubuntu $OS_VERSION."
read -p "Do you want to continue anyway? (y/N): " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Installation cancelled."
exit 1
fi
fi
else
echo "Unsupported operating system: $OS_NAME"
exit 1
fi
echo "Operating system check passed: $OS_NAME $OS_VERSION"
# Install the required packages
rm -rf dependencies
mkdir dependencies
cd dependencies
git clone https://github.com/XR-Robotics/XRoboToolkit-PC-Service-Pybind.git
cd XRoboToolkit-PC-Service-Pybind
bash setup_ubuntu.sh
cd ..
git clone https://github.com/zhigenzhao/R5.git
cd R5
git checkout dev/python_pkg
cd py/ARX_R5_python/
pip install .
cd ../../../..
pip install -e . || { echo "Failed to install xrobotoolkit_teleop with pip"; exit 1; }
echo -e "\n"
echo -e "[INFO] xrobotoolkit_teleop is installed in conda environment '$ENV_NAME'.\n"
echo -e "\n"