EAI_X3 Radar ROS2

ROS 2 official website:https://docs.ros.org/

equipment:pc;X3

environment:Ubuntu20.04;ROS2(Foxy)

new workspace

When using this radar, you need to enter the workspace every time you execute a command

Unzip the [X3_ws_src.zip] function package and put it into the src folder of the X3_ws workspace, and open the terminal in the workspace

Note: Every time you modify the code in the function package, you need to [compile] and then [update environment].

Add the workspace to the .bashrc of the environment variable,

1、Remap the USB serial port

Terminal input,

After binding, unplug the radar again.

Use the following command to view modified remap

image-20230304151509797

Note: This is not necessarily ttyUSB0, as long as there is /dev/ydlidar, it means that the binding is successful.

2、terminal test

The first step is to start the corresponding radar

The second step is to view the radar data

You should see rplidar scan results in the console

image-20230304150027870

3、rviz2 visual test

You should see the radar scan results in rviz2

image-20220608193816622

Note: The topic of [Fixed Frame] coordinate system and [LaserScan] should be consistent with the published ones.

4、gmapping mapping test

The first step is to start the corresponding radar

The second step is to start gmapping to build a map

You should see the mapping result in rviz2

image-20220608194335038

Note: [Fixed Frame] coordinate system, [LaserScan] topic, and [map] topic should be consistent with the published ones.