1.Depth camera use

Before driving the depth camera, the astra camera device needs to be recognized on the host machine; when entering the docker container, the astra device needs to be mounted to recognize the camera in the docker container. The supporting host has already set up an environment and does not require additional configuration. If it is on a new host, you need to add a rule file. The adding method is very simple. Copy the /etc/udev.rules.d/56-orbbec-usb.rules file under the host to the /etc/udev.rules.d directory in the new environment, and then restart it.

1. Program function description

After the program is run, 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 location of the source code of this function is:

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

Here we take starting the Astraproplus camera as an example. After entering the docker container, enter in the terminal:

This step is to check whether the Astra camera device can be recognized in Docker. If the following content appears, it means that the Astraproplus camera is successfully mounted into the Docker container:

image-20231016110116011

Enter in the Docker terminal,

image-20230424151037829

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

image-20230424151330581

The main topics are as follows:

Topic nameTopic content
/camera/color/image_rawRGB color image data
/camera/depth/image_rawDepth depth image data
/camera/depth/pointsDepth point cloud data
/camera/ir/image_rawIR infrared image data

Use the rqt_image_view tool to view image data and enter in the Docker terminal:

Then select the corresponding image topic that needs to be displayed in the upper left corner to display the RGB image:

image-20231016105115470

Display the depth image:

image-20231016105152479

Display infrared image:

image-20231016105217857

 

Use rviz2 to display the depth point cloud, enter in the Docker terminal:

Then add depth point cloud information in rviz,image-20230424152706695

 

Finally, change Fixed Frame to camera_link to view the point cloud information:

image-20231016105509949

If you only need depth information, Astrapro and Astraproplus only need to start the following commands,

 

View image data on the web page:

Then open the browser, the computer and the host network must be in the same LAN, enter the URL: your host ip+8080,For example, my host network IP is 192.168.2.53, and my docke container also uses the host network, so 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, for example, to display an rgb image, then select image_raw under /camera/color/,

image-20230424160730733Note: Because the format of the depth map is different from that of rgb, the depth map cannot be displayed. If you need to see the depth map, you can view it through rviz or rqt.

 

4. Special instructions

The factory configuration of Muto robot is astro_pro_plus camera. If the user switches to astra_pro camera, please change the camera running part in all courses to run astra_pro camera.