Note: These files are already installed in the Yahboom image provided by us, you do not need to perform this step.
This course just for learning reference.
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
Create astra udev rule(Single product depth camera needs to be implemented)
cd ~/astra_ws/src
./create.sh
launch start up command
Launch file | Start the camera model |
---|---|
astra.launch | Astra,Astra S,Astra mini,Astra mini S |
astraplus.launch | Astra plus |
astrapro.launch | Astra pro |
embedded_s.launch | Deeyea |
dabai_u3.launch | Dabai |
gemini.launch | Gemini |
Operating environment: virtual machine or dual system
xxxxxxxxxx
sudo apt-get install ros-melodic-serial ros-melodic-bfl ros-melodic-mbf-msgs ros-melodic-pointcloud-to-laserscan 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
The folder name may be different, change it according to your needs.
xxxxxxxxxx
tar -zxvf AstraSDK-v2.1.3-Ubuntu18.04-x86_64.tar.gz
cd AstraSDK-v2.1.3-Ubuntu18.04-x86_64.tar.gz/install #Enter the install folder
sudo sh ./install.sh
The output contains the following two lines.
Note: Delete install in the penultimate path:
xxxxxxxxxx
export ASTRA_SDK_INCLUDE=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/install/include
export ASTRA_SDK_LIB=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/install/lib
After deleting install:
xxxxxxxxxx
export ASTRA_SDK_INCLUDE=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/include
export ASTRA_SDK_LIB=/home/yahboom/astra/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/lib
Copy the output to the end of ~/.bashrc
xxxxxxxxxx
gedit ~/.bashrc
source ~/.bashrc
The sample program is in the amples directory, which depends on the include and lib directories
The bin folder is as follows:
Note: You can start by using sudo ./ or ./ in the bin folder. The files with the suffix -SFML will be displayed on the screen; the methods are similar, and other effects can be tested. If it appears in the virtual machine that the startup fails, please try a few more times
xxxxxxxxxx
cd ~/AstraSDK-v2.1.3-Ubuntu18.04-x86_64/bin/
./SimpleBodyViewer-SFML # Bone detection
./SimpleHandViewer-SFML # Finger follow
Install OpenNI
xxxxxxxxxx
unzip OpenNI_2.3.0.55.zip
cd OpenNI_2.3.0.55/Linux/OpenNI-Linux-x64-2.3.0.55
chmod +x install.sh
sudo ./install.sh
Replug the device Initialize the OpenNI environment
xxxxxxxxxx
source OpenNIDevEnvironment
Compile and run
xxxxxxxxxx
cd Samples/SimpleViewer
make
cd Bin/x64-Release
./SimpleViewer
Environment setup
xxxxxxxxxx
sudo apt-get install ros-melodic-async-web-server-cpp ros-melodic-web-video-server ros-melodic-usb-cam
Start up camera
xxxxxxxxxx
roslaunch astra_camera astrapro.launch # Astra
roslaunch usb_cam usb_cam-test.launch # USB
Start up web_video_server
xxxxxxxxxx
rosrun web_video_server web_video_server
View
xxxxxxxxxx
Local web browser view
http://localhost:8080/
Must be in the same local area network, other devices can view
http://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