Welcome to ROSMASTER M1 repository
1.Basic use of depth camera
Basic Use of Depth Camera
For Raspberry Pi and Jetson-Nano boards, you need to enter the Docker container first. For RDKX5 and Orin controllers, this is not necessary, and the device ID has already been bound.
Note: Before driving the depth camera, the host machine must be able to recognize the ASJ camera device. When entering the Docker container, you must mount this ASJ device in the startup script for the camera to be recognized within the Docker container. The corresponding host machine has a pre-configured environment and requires no additional configuration. If using a new host machine, you will need to add a rules file. Adding this is simple: copy the /etc/udev/rules.d/asj.rules file from the host machine to the /etc/udev/rules.d/ directory in the new environment, then reboot.
1. Program Functional Description
After running the program, it drives the NUWA camera and can obtain color RGB image information and depth point cloud information.
2. Program Code Reference Path
~/yahboomcar_ros2_ws/software/library_ws/src/ascamera/launch/hp60c.launch.py3. Program Launch
3.1. Launch Command
After entering Docker, enter the following command in the terminal to check whether the camera device is mounted properly.
xxxxxxxxxxll /dev/as*
If the following appears, it means the camera is successfully mounted in the Docker container.

In the terminal, enter:
xxxxxxxxxxros2 launch ascamera hp60c.launch.py
If the following appears, the launch was successful.

You can view topics by entering the following command in the Docker terminal. (Note that the terminal here needs to be in the same Docker container terminal, not a separate Docker container launched by running a script. For information on how to enter the same container terminal, see [Docker Course] --- [3. Docker Submission and Multiple Terminal Access].)
xxxxxxxxxxros2 topic list

The main topics are as follows:
| Topic Name | Topic Content |
|---|---|
| /ascamera_hp60c/camera_publisher/rgb0/image | RGB color image data |
| /ascamera_hp60c/camera_publisher/depth0/image_raw | Depth image data |
| /ascamera_hp60c/camera_publisher/depth0/points | Depth point cloud data |
Use the rqt_image_view tool to view image data. Enter in the Docker terminal (note that the terminal here must be in the same Docker container terminal)
xxxxxxxxxxros2 run rqt_image_view rqt_image_view
Then select the image topic you want to display in the upper left corner.


Use rviz2 to display the depth point cloud. In the Docker terminal, enter:
xxxxxxxxxxrviz2

After opening rviz, follow the steps above to set up the point cloud data visualization.
