1、Depth camera usage

Before driving a depth camera, it is necessary for the host to be able to recognize the Astra camera device; When entering the Docker container, you need to mount this Astra device to recognize the camera in the Docker container. The supporting host has already been built in an environment and does not require additional configuration. If it is on a new host, a rule file needs to be added. The addition method is very simple. Copy the "/etc/udev rules. d/56 orbbec-usb rules" file from the host computer to the "/etc/udev rules. d" directory in the new environment, and then restart system

1、Program Function Description

After the program runs, drive the Astra camera to obtain color RGB, depth, infrared IR image information, and depth point cloud information.

2、Program code reference path

After entering the Docker container, the source code for this function is located at,

3、Program startup

Launch startup command

Launch fileCamera model
ros2 launch astra_camera astra_pro.launch.xmlAstrapro
ros2 launch astra_camera astro_pro_plus.launch.xmlAstraproplus
ros2 launch astra_camera astra.launch.xmlAstramini

Taking starting the Astrapro camera as an example, after entering the Docker container, the terminal enters the following command:

Taking the Astrapro camera as an example, after entering the Docker container, the terminal inputs the camera model,

image-20230424150715943

Enter in the Docker terminal,

image-20230424151037829

You can use the following command to view topics, enter in the Docker terminal,

image-20230424151330581

The main topics are as follows:

Topic Nametopical contents
/camera/color/image_rawRGB color image data
/camera/depth/image_rawDepth image data
/camera/depth/pointsDepth point cloud data
/camera/ir/image_rawIR infrared image data

Using rqt_ Image_ View tool to view image data, input in Docker terminal,

Then select the corresponding image topic to be displayed in the upper left corner, taking displaying RGB images as an example,

image-20230424152126462

Use rviz2 to display deep point clouds, input in Docker terminal,

Then add deep point cloud information in rviz,

image-20230424152706695

Finally, modify the 【 Fixed Frame】 to 【camera_ Link 】 to view point cloud information,

image-20230424152932393

If only depth information is needed, Astrapro and Astraproplus only need to start the following command,

Viewing image data on web pages,

Then open the browser, and the computer and host network must be on the same local area network. Enter the URL: your host IP+8080, for example, my host network IP is 192.168.2.53, and my dock container also uses the host network. Therefore, the network IPs of the two are the same, so enter the URL in the browser:

image-20230424160242827

Then, select one of the image topic data, such as displaying an rgb image, and select "image_raw" under "/camera/color/".

image-20230424160730733