Welcome to RDK X5 Board repository
1.AI VIEW Depth camera use
1、Environment Setup
This section uses Ubuntu 22.04 + ROS Humble as an example to explain how to set up and use a camera in a ROS 2 environment.
1、Install Dependencies
Open a terminal and run:
sudo apt install libgflags-dev nlohmann-json3-dev libgoogle-glog-dev ros-humble-image-transport ros-humble-image-publisherInstall the libuvc library:
xxxxxxxxxxgit clone https://github.com/libuvc/libuvc.gitcd libuvcmkdir build && cd buildcmake .. && make -j4sudo make installsudo ldconfig # Refreshing the link library
2、 Compile
1)Create a Workspace
Using orbbec_ws as the workspace name under the ~ home directory:
xxxxxxxxxxmkdir orbbec_wscd orbbec_wsmkdir src2)Copy the Package into the Workspace
Extract the source archive, then copy the folders (packages) from the src directory into ~/orbbec_ws/src.
3)Compile
Open a terminal and run:
xxxxxxxxxxcd ~/orbbec_wscolcon build4)Add Environment Variables
Open a terminal and run:
xxxxxxxxxxecho "source ~/orbbec_ws/install/setup.bash" >> ~/.bashrc3、Install udev Rules
Open a terminal and run:
xxxxxxxxxxcd orbbec_ws/src/OrbbecSDK_ROS/orbbec_camera/scripts/sudo sh install_udev_rules.shTo verify that the rules file was loaded successfully and the camera is bound, run:
xxxxxxxxxx#gemini maxll /dev/gemini
If the output matches the screenshot above, the setup was successful.
4、Launch the Camera and View Images
Open a terminal and run:
x
#gemini max camera startros2 launch astra_camera gemini.launch.xml
To view the available topics, run:
xxxxxxxxxxros2 topic list
To view the camera images using the rqt_image_view tool, run:
xxxxxxxxxxros2 run rqt_image_view rqt_image_viewColor image

Depth image

Infrared (IR) image

In the rqt window, select the desired topic from the drop-down in the top-left corner to display.
5、Launch the Camera and View Point Cloud
Open a terminal and run:
xxxxxxxxxxros2 launch astra_camera gemini.launch.xmlTo visualize the point cloud data published by the camera, open RViz2:
xxxxxxxxxxrviz2

Once RViz2 is open, configure the point cloud visualization settings as shown in the screenshots above.
