Use lidar in ROS2

1、Compile function package

Extract oradar_ lidar_ Oradar from ros2.zip_ Lidar, put oradar_ Lidar is copied to the src directory of the created workspace, where the workspace name is oradar_ Ws as an example, oradar_ The path of ws is in the~directory, and then returns to the workspace directory.

Input following command to complie.

image-20230223113435776

The above picture shows that the compilation has passed.

Then enter the following command to set the environment variable.

2、Run launch

Before operation, you need to refer to the first section and bind the following radar port names.

For details, refer to the section "1. Preparation before use - Bind radar port names". After binding the radar, enter the following command to start the lidar.

image-20230223142535219

You can view lidar node data through the following command.

image-20230223144024597