Welcome to AI View Depth camera repository
2. Environment Construction
2. Environment setup
Note: The supporting virtual machine has already set up the environment, so there is no need to set it up again. Here is the work that needs to be done on a new motherboard or virtual machine.
The configuration of the virtual machine environment is as follows:
Ubuntu20.04 + ROS-Noetic+ OpenCV 4.2+Python3.8
2.1. Install related dependencies
Terminal input,
xxxxxxxxxxsudo apt install libgflags-dev ros-$ROS_DISTRO-image-geometry ros-$ROS_DISTRO-camera-info-manager ros-$ROS_DISTRO-image-transport ros-$ROS_DISTRO-image-publisher libgoogle-glog-dev libusb-1.0-0-dev libeigen3-dev2.2. Create a ROS workspace
Take the creation of a workspace named orbbec_ws in the ~ directory as an example.
Input in the terminal,
xxxxxxxxxxmkdir -p ~/orbbec_ws/srcUnzip the "source" folder, copy the Orbbec-ros-sdk folder to ~/orbbec_ws/src, and then input the following command to compile,
xxxxxxxxxxcd ~/orbbec_wscatkin_makeAfter the compilation is complete, input the following command to open and edit the ~/.bashrc file,
xxxxxxxxxxsudo vim ~/.bashrcPress the [i] key to enter the editing mode, add the workspace to the environment variable, and add the last sentence of the file,
xxxxxxxxxxsource ~/orbbec_ws/devel/setup.bashPress [ESC] to exit the editing mode, then input [:] and then input [wq] and press Enter, save and exit, then input the following command to refresh,
xxxxxxxxxxsource ~/.bashrc2.3. Install the camera udev rule file
Terminal input,
xxxxxxxxxxcd ~/orbbec_ws/src/orbbec-ros-sdk/scriptsudo chmod 777 install.shsudo bash install.sh

After the installation is complete, it is best to restart.
Enter the following command to verify,
xxxxxxxxxx#astraproplusll /dev/astro_pro_plus#geminill /dev/gemini*The following content indicates successful binding
astraproplus displays,

gemini2 displays,

2.4, Use the camera
Terminal input,
xxxxxxxxxx#astraproplusroslaunch orbbec_camera astra.launch#geminiroslaunch orbbec_camera gemini.launchastraproplus camera

The red error and yellow warning are because the SDK is compatible with multiple cameras and the corresponding camera model is not found. The log printed by the terminal does not affect the use.
gemini camera

Use rviz to view the image, input in the terminal,
xxxxxxxxxxrviz
Change Fixed Frame to camera_link, then install as shown below, add Image display plug-in,

Then, click Image, select Display color image in the Image Topic column: /camera/color/image_raw

Also in Image Select the depth image in the Topic column: /camera/depth/image_raw

Also select the IR image in the Image Topic column: /camera/ir/image_raw
