Skip to content

Commit 5e011cc

Browse files
committed
updated installation script to utilize the setup script in xrobotoolkit_sdk
1 parent 75d00e1 commit 5e011cc

File tree

3 files changed

+20
-39
lines changed

3 files changed

+20
-39
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Pico teleoperation demo written in python for both mujoco simulation and robot h
77
This project provides a framework for controlling robots in robot hardware and MuJoCo simulation through XR (VR/AR) input devices. It allows users to manipulate robot arms using natural hand movements captured through XR controllers.
88

99
## Installation
10-
1. Download and install `XRoboToolkit PC Service`
10+
1. Download and install `XRoboToolkit PC Service` [todo: include .deb package link]
1111

1212
2. **Clone the repository:**
1313
```bash
@@ -16,22 +16,22 @@ This project provides a framework for controlling robots in robot hardware and M
1616
```
1717

1818
3. **Installation**
19-
19+
**Note:** The setup scripts are currently only tested on Ubuntu 22.04.
2020
It is recommended to setup a Conda environment and install the project using the included script.
2121
```bash
2222
bash setup_conda.sh --conda <optional_env_name>
2323
conda activate <env_name>
2424
bash setup_conda.sh --install
2525
```
2626

27-
If installing on system python (Ubuntu only):
27+
If installing on system python:
2828
```bash
2929
bash setup.sh
3030
```
3131

32-
**Note:** The `setup_conda.sh` script is currently only supported on Ubuntu. For Windows users, please follow these steps:
32+
<!-- **Note:** The `setup_conda.sh` script is currently only supported on Ubuntu. For Windows users, please follow these steps:
3333
1. Manually build the [`xrobotookit_sdk`](https://github.com/XR-Robotics/XRoboToolkit-PC-Service-Pybind).
34-
2. Then, install this package using `pip install -e .` in your activated Conda environment or system Python.
34+
2. Then, install this package using `pip install -e .` in your activated Conda environment or system Python. -->
3535

3636
## Usage
3737

setup.sh

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@ if [[ "$OS_NAME" == "Linux" ]]; then
1111
. /etc/os-release
1212
OS_VERSION=$VERSION_ID
1313
fi
14-
if [[ "$OS_VERSION" != "22.04" && "$OS_VERSION" != "24.04" ]]; then
15-
echo "This script only supports Ubuntu 22.04 or 24.04."
16-
exit 1
14+
if [[ "$OS_VERSION" != "22.04" ]]; then
15+
echo "Warning: This script has only been tested on Ubuntu 22.04"
16+
echo "Your system is running Ubuntu $OS_VERSION."
17+
read -p "Do you want to continue anyway? (y/N): " -n 1 -r
18+
echo
19+
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
20+
echo "Installation cancelled."
21+
exit 1
22+
fi
1723
fi
18-
elif [[ "$OS_NAME" == "MINGW"* || "$OS_NAME" == "CYGWIN"* || "$OS_NAME" == "MSYS"* ]]; then
19-
OS_VERSION="Windows"
20-
echo "Windows detected"
2124
else
2225
echo "Unsupported operating system: $OS_NAME"
2326
exit 1
@@ -29,24 +32,12 @@ echo "Operating system check passed: $OS_NAME $OS_VERSION"
2932
rm -rf dependencies
3033
mkdir dependencies
3134
cd dependencies
32-
git clone https://github.com/XR-Robotics/XRoboToolkit-PC-Service.git
33-
cd XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK
34-
bash build.sh || { echo "Failed to build PXREARobotSDK"; exit 1; }
35-
cd ../../..
3635

3736
git clone https://github.com/XR-Robotics/XRoboToolkit-PC-Service-Pybind.git
3837
cd XRoboToolkit-PC-Service-Pybind
39-
if [[ "$OS_NAME" == "Linux" ]]; then
40-
cp ../XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/build/libPXREARobotSDK.so lib/ || { echo "Failed to copy libPXREARobotSDK.so"; exit 1; }
41-
elif [[ "$OS_NAME" == "MINGW"* || "$OS_NAME" == "CYGWIN"* || "$OS_NAME" == "MSYS"* ]]; then
42-
cp ../XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/build/PXREARobotSDK.dll lib/ || { echo "Failed to copy PXREARobotSDK.dll"; exit 1; }
43-
cp ../XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/build/PXREARobotSDK.lib lib/ || { echo "Failed to copy PXREARobotSDK.lib"; exit 1; }
44-
fi
45-
python setup.py install || { echo "Failed to install xrobotoolkit_sdk"; exit 1; }
46-
cd ..
47-
rm -rf XRoboToolkit-PC-Service
38+
bash setup_ubuntu.sh
4839

49-
cd ..
40+
cd ../..
5041

5142
pip install -e . || { echo "Failed to install xrobotoolkit_teleop with pip"; exit 1; }
5243

setup_conda.sh

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ if [[ "$OS_NAME" == "Linux" ]]; then
1111
. /etc/os-release
1212
OS_VERSION=$VERSION_ID
1313
fi
14-
if [[ "$OS_VERSION" != "22.04" && "$OS_VERSION" != "24.04" ]]; then
15-
echo "Warning: This script has only been tested on Ubuntu 22.04 and 24.04."
14+
if [[ "$OS_VERSION" != "22.04" ]]; then
15+
echo "Warning: This script has only been tested on Ubuntu 22.04"
1616
echo "Your system is running Ubuntu $OS_VERSION."
1717
read -p "Do you want to continue anyway? (y/N): " -n 1 -r
1818
echo
@@ -103,27 +103,17 @@ elif [[ "$1" == "--install" ]]; then
103103
echo "Unsupported operating system: $OS_NAME"
104104
exit 1
105105
fi
106-
export CC=/usr/bin/gcc
107-
export CXX=/usr/bin/g++
108-
109106

110107
# Install the required packages
111108
rm -rf dependencies
112109
mkdir dependencies
113110
cd dependencies
114-
git clone https://github.com/XR-Robotics/XRoboToolkit-PC-Service.git
115-
cd XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK
116-
bash build.sh || { echo "Failed to build PXREARobotSDK"; exit 1; }
117-
cd ../../..
118111

119112
git clone https://github.com/XR-Robotics/XRoboToolkit-PC-Service-Pybind.git
120113
cd XRoboToolkit-PC-Service-Pybind
121-
cp ../XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/build/libPXREARobotSDK.so lib/ || { echo "Failed to copy libPXREARobotSDK.so"; exit 1; }
122-
python setup.py install || { echo "Failed to install xrobotoolkit_sdk"; exit 1; }
123-
cd ..
124-
rm -rf XRoboToolkit-PC-Service
114+
bash setup_ubuntu.sh
125115

126-
cd ..
116+
cd ../..
127117

128118
pip install -e . || { echo "Failed to install xrobotoolkit_teleop with pip"; exit 1; }
129119

0 commit comments

Comments
 (0)