Python SDK Configuration
Windows
Runtime Environment Setup
1. Install Python
Install Python (compatible version: Python 3.7-Python 3.10, recommended version: Python 3.7.9). Download it from the following URL:
https://www.python.org/downloads/windows/
2. Upgrade pip
Go to PowerShell or Command Prompt and run the following command.
3. Install NumPy and OpenCV-Python
Install NumPy:
If the installation reports an error, run:
Install OpenCV-Python:
If the installation reports an error, run:
If the installation continues to report errors, run:
pip3 install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.com
Running the Examples
1. Install the PyRVC module
Go to PowerShell or Command Prompt and run the following command.
2. Run the Python example
Once installed, the Python examples can be invoked.
Use the cd command, switch to the examples folder in the RVC SDK installation directory, using the CaptureGigE.py as an example: python . \CaptureGigE.py
When the program is finished, the captured point cloud and images will be saved in the Data folder under the current execution path.nst
Linux
Runtime Environment Setup
1. Install CMake
Open a Terminal window and run the following command.
2. Install Python
3. Install NumPy and OpenCV-Python
Install NumPy:
Install OpenCV-Python:
Running the Examples
1. Install the PyRVC module
Open a Terminal window and run the following command.
When you are not connected to the Internet, you can execute the following command to generate a .whl file locally for installation.
Before installation, you can check the name of the .whl file under the generated dist folder, then change the file name in the pip3 command.
2. Run the Python example
Use the cd command, switch to the directory where the Python example is located, and then you can call the example.
For example, to run the AdjustCaptureParameter.py example, enter the following command.
After the example finishes running, the captured point cloud and images are saved in the Data folder of the current execution path by default.