Official website link:https://orbbec3d.com/develop/
Astra camera:https://github.com/orbbec/ros_astra_camera
Ordinary camera:https://github.com/bosch-ros-pkg/usb_cam.git
Linux environment
sudo apt-get install ros-melodic-serial ros-melodic-bfl ros-melodic-mbf-msgs ros-melodic-pointcloud-to-laserscan ros-melodic-astra-camera ros-melodic-astra-launch ros-melodic-rgbd-launch ros-melodic-libuvc-* ros-melodic-uvc-camera ros-melodic-usb-cam ros-melodic-ar-track-alvar ros-melodic-camera-calibration build-essential freeglut3 freeglut3-dev libsfml-dev
Create astra udev rule
xxxxxxxxxxcd ~/astra_ws/src./create.sh
launch start up file
| Launch file | Start the camera model |
|---|---|
| astra.launch | Astra,Astra S,Astra mini,Astra mini S |
| astraplus.launch | Astra plus |
| astraproplus.launch | Astra pro plus |
| embedded_s.launch | Deeyea |
| dabai_u3.launch | Dabai |
| gemini.launch | Gemini |
xxxxxxxxxxsudo apt-get install ros-melodic-serial ros-melodic-bfl ros-melodic-mbf-msgs rosmelodic-pointcloud-to-laserscan ros-melodic-rgbd-launch ros-melodic-libuvc-* rosmelodic-uvc-camera ros-melodic-usb-cam ros-melodic-ar-track-alvar ros-melodiccamera-calibration build-essential freeglut3 freeglut3-dev libsfml-dev
xxxxxxxxxxtar -zxvf AstraSDK-v2.1.3-Ubuntu18.04-x86_64.tar.gzcd AstraSDK-v2.1.3-Ubuntu18.04-x86_64.tar.gz/install #Enter the install foldersudo sh ./install.sh
The output contains the following two lines.
Note: Delete install in the penultimate path:
xxxxxxxxxxexport ASTRA_SDK_INCLUDE=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/install/includeexport ASTRA_SDK_LIB=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/install/lib
After deleting install:
xxxxxxxxxxexport ASTRA_SDK_INCLUDE=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/includeexport ASTRA_SDK_LIB=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/lib
Copy the output to the end of ~/.bashrc
xxxxxxxxxxgedit ~/.bashrcsource ~/.bashrc
The sample program is in the amples directory, which depends on the include and lib directories.
Note: sudo can be used in the bin folder/ Or/ Start the file with - SFML suffix in the mode of; Both ways Similarly, other effects can be tested.
The virtual opportunity fails to start successfully. Please try several times.
xcd ~/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/bin/./SimpleBodyViewer-SFML # Bone detection

Install OpenNI
xunzip OpenNI-Linux-x64-2.3.0.66.zipcd OpenNI-Linux-x64-2.3.0.66chmod +x install.shsudo ./install.sh
Replug the device Initialize the OpenNI environment
xxxxxxxxxxsource OpenNIDevEnvironment
Compile and run
xxxxxxxxxxcd Samples/SimpleViewermakecd Bin/x64-Release./SimpleViewer

Unzip OrbbecViewer for OpenNI2_ v1.1.13_ 20220722_ windows_ X64, enter the unzipped file, double-click to run OrbbecViewer.exe.

Environment setup
xxxxxxxxxxsudo apt-get install ros-melodic-async-web-server-cpp ros-melodic-web-video-server ros-melodic-usb-cam
Start up camera
xroslaunch astra_camera astraproplus.launch # Astra
roslaunch usb_cam usb_cam-test.launch # USBStart up web_video_server
rosrun web_video_server web_video_serverView
xxxxxxxxxxLocal web browser viewhttp://localhost:8080/Must be in the same local area network, other devices can viewhttp://192.168.2.103:8080/(192.168.2.103 is the IP address of the master)Note: It is recommended to use Google Chrome or mobile QQ browser, other browsers may not be able to open the image