5. Bind the device ID

5. Bind the device ID5.1 Device view5.2. Device Binding5.2.1 Astra Camera Binding5.2.2 PCB and radar binding5.3 Introduction to Rule file syntax

When the robot uses two or more USB serial port devices, the corresponding relationship between the device name and the device is not fixed, but is assigned according to the order in which the device is connected to the system. Inserting a device and then another device can determine the relationship between the device and the device name, but each time the system starts, you need to insert and remove the device, which is very troublesome. The serial port can be mapped to a fixed device name, regardless of the insertion order, the device will be mapped to the new device name, we only need to use the new device name to read and write operations on the device.

Note: The ID of the matching device has been bound to the system image. The following steps can be used for binding new devices.

5.1 Device view

After SSH connects to the car, terminal input,

Astra has an official binding of the ID number of each device file, the handle generally does not need to be bound, the main binding PCB and radar can be.

1685347660010

Device number view

1685348405441

1685348504224

5.2. Device Binding

5.2.1 Astra Camera Binding

The binding rules file for the Astra camera is [56-orbbec-usb.rules], provided by the Astra manufacturer and demonstrated here with Astra Pro.

Place the [56-orbbec-usb.rules] file in the following directory in the cart:

Run the following command on the terminal to refresh the USB rules to bind Astra camera.

After the binding is complete, enter the following command,

1685344640447

If the output is as follows, the binding is successful.

5.2.2 PCB and radar binding

The car terminal executes the following command,

Write the following (see tutorial [Linux Basics] for vim command usage)

Save and exit to make the rule take effect. Perform the following operations:

After the binding is complete, enter the following command,

1685351624469

If the output is as follows, the binding is successful.

5.3 Introduction to Rule file syntax

Parsing

From [6.1], it can be seen that the device number of the PCB is [ttyUSB0], which is easy to jump, and the ID number is [1a86, 7523], which is fixed. [ttyUSB*] means that no matter the device number becomes [ttyUSB] in the future, it is followed by [0, 1, 2, 3, 4,...]. Both are bound to [myserial]; Radar equipment [ttyACM0] the same; The same applies to binding other devices.

Note: When using an alias, do not use some device names that already exist in the system. Otherwise, it will fail.