A sensor signal synchronization method and apparatus, a vehicle, and a storage medium
By acquiring and simulating the encoder and index signals of the LiDAR, the problem of synchronization signal interruption was solved, and the LiDAR and camera were synchronized in time under unstable signal conditions, ensuring stable system operation.
Patent Information
- Application Number
- CN202111680398.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2041-12-30
AI Technical Summary
In existing LiDAR and camera timing synchronization schemes, the LiDAR and camera timing cannot continue to work normally after the synchronization signal is interrupted, mainly due to the instability of the Index and Encoder signals and insufficient anti-interference capabilities.
By acquiring the encoder and index signals of the lidar, determining its status, and generating analog signals, synchronization can be maintained even when the signal is abnormal. This includes the use of signal acquisition, synchronization, and control modules to achieve analog and adaptive processing of the signal.
When the signal is unstable or interrupted, it can maintain the timing synchronization between the lidar and the camera, reduce the impact of signal instability on synchronization, and ensure the stable operation of the system.
Smart Images

Figure CN114355385B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicles, in particular to a sensor signal synchronization method and device, a vehicle and a storage medium. BACKGROUND
[0002] The laser radar has a rotating photoelectric encoder, which is absolutely unique at each position, anti-interference and does not need to be powered off to remember, and has been more and more widely used in angle, length measurement and positioning control in various industrial systems. The vehicle-mounted controller can obtain the orientation of the transmitter and receiver device of the current laser radar by analyzing the Index and Encoder signals sent by the rotating photoelectric encoder. Further, by calculating the time required for camera exposure, the vehicle-mounted controller can control the exposure start time point through the camera Trigger signal. Through the above operation, the time difference between the laser radar and the central scanning area and the middle exposure area of the camera can be calculated, and the vehicle-mounted controller can eliminate the time difference to achieve the time sequence synchronization of the laser radar and the camera.
[0003] In actual vehicle application, common environmental interference factors have a significant impact on the Index and Encoder signals, which seriously affects the implementation of mass production projects. In the existing laser radar and camera time sequence synchronization method, the vehicle-mounted controller has a serious dependence on the quality of the Index and Encoder signals. Once the signal is interrupted, the time sequence synchronization of the laser radar and the camera will stop. Moreover, in the actual vehicle environment, the stability of the Index and Encoder signals cannot be completely guaranteed. The first aspect is the electrical characteristics. The Index and Encoder signals are both 3.3v TTL type electronic signals, which do not have the characteristics of resisting interference, and it is extremely difficult to adapt to the many interference devices in the vehicle layout. The performance is poor. The second aspect is the mechanical characteristics. The Index and Encoder signals can also be affected by the mechanical looseness of the controller connector caused by factors such as temperature and vibration, resulting in temporary signal loss. SUMMARY
[0004] The main purpose of the present application is to provide a sensor signal synchronization method, device, vehicle and storage medium, which aims to solve the problem that the time sequence of the laser radar and the camera cannot continue to work normally after the interruption of the synchronization signal in the existing laser radar and camera synchronization scheme.
[0005] To achieve the above purpose, the present application provides a sensor signal synchronization method, which comprises the following steps:
[0006] obtaining a first reference signal and / or a second reference signal sent by a first sensor;
[0007] generating a third signal according to a state of the first reference signal and / or the second reference signal;
[0008] sending the third signal to the second sensor to synchronize the first reference signal and / or the second reference signal to the second sensor.
[0009] Optionally, the step of generating a third signal according to a state of the first reference signal and / or the second reference signal comprises the following steps:
[0010] determining whether the first reference signal and / or the second reference signal is normal;
[0011] generating a corresponding first analog signal and / or a second analog signal according to the first reference signal and / or the second reference signal;
[0012] if the first reference signal and / or the second reference signal is normal, generating a third signal according to the first reference signal and / or the second reference signal; if the first reference signal and / or the second reference signal is abnormal, generating a third signal according to the first analog signal and / or the second analog signal.
[0013] Optionally, the step of determining whether the first reference signal and / or the second reference signal is normal comprises the following steps:
[0014] setting a first detection rule for detecting the first reference signal and / or setting a second detection rule for detecting the second reference signal;
[0015] detecting the first reference signal according to the first detection rule to obtain a first detection result; and / or detecting the second reference signal according to the second detection rule to obtain a second detection result;
[0016] setting a signal state according to the first detection result and / or the second detection result; the signal state comprises a normal signal state, an unstable signal state, and a signal loss state;
[0017] if the signal state is the normal signal state, the first reference signal and / or the second reference signal is normal; if the signal state is the unstable signal state or the signal loss state, the first reference signal and / or the second reference signal is abnormal;
[0018] setting the signal state as the signal loss state to send an alarm event.
[0019] Optionally, the first detection rule comprises the following steps:
[0020] counting the rising edge of the first reference signal pulse of the first sensor in a first detection period to obtain a first count value;
[0021] setting a first count standard value of the rising edge of the first reference signal pulse in the first detection period;
[0022] obtaining a first difference value between the first count value and the first count standard value;
[0023] The second detection rule comprises the following steps:
[0024] counting the rising edge of the second reference signal pulse of the first sensor in a second detection period to obtain a second count value;
[0025] setting a second count standard value of the rising edge of the second reference signal pulse in the second detection period;
[0026] obtaining a second difference value between the second count value and the second count standard value.
[0027] Optionally, the setting of the signal state according to the first detection result and / or the second detection result comprises the following steps:
[0028] when the first difference value and / or the second difference value is in a first range, setting the signal state as the signal unstable state;
[0029] when the first difference value and / or the second difference value is in a second range, setting the signal state as the signal loss state;
[0030] when the first difference value and / or the second difference value is 0 in n periods (n is greater than or equal to 1), setting the signal state as the signal normal state.
[0031] Optionally, the simulation of the first reference signal to obtain a corresponding first analog signal comprises phase shifting the first reference signal to obtain the corresponding first analog signal.
[0032] The simulation of the second reference signal to obtain a corresponding second analog signal comprises phase shifting the second reference signal to obtain the corresponding second analog signal.
[0033] Optionally, the first sensor is a laser radar, and the second sensor is a shooting device; the first reference signal is an Encoder signal of the laser radar, the second reference signal is an index signal of the laser radar, and the third signal is a shooting device shooting trigger signal.
[0034] In addition, to achieve the above object, the present application also provides a sensor signal synchronization device, which comprises a signal capturing module, a signal synchronization module and a signal control module.
[0035] The signal capturing module is used for acquiring a first reference signal and / or a second reference signal sent by a first sensor, judging whether the first reference signal and / or the second reference signal is normal, and sending the first reference signal and / or the second reference signal to the signal synchronization module when the first reference signal and / or the second reference signal is normal.
[0036] The signal synchronization module is used for simulating the first reference signal to obtain a corresponding first simulation signal, and / or simulating the second reference signal to obtain a corresponding second simulation signal, sending the first reference signal and / or the second reference signal to the signal control module when the first reference signal and / or the second reference signal is normal, and sending the first simulation signal and / or the second simulation signal to the signal control module when the first reference signal and / or the second reference signal is abnormal.
[0037] The signal control module is used for generating a third signal according to the first reference signal and / or the second reference signal when the first reference signal and / or the second reference signal is normal, generating a third signal according to the first simulation signal and / or the second simulation signal when the first reference signal and / or the second reference signal is abnormal, and sending the third signal to a second sensor to synchronize the second sensor with the first reference signal and / or the second reference signal.
[0038] In addition, to achieve the above object, the present application also provides a vehicle, which comprises a memory, a processor and a sensor signal synchronization program stored in the memory and executable on the processor, and the sensor signal synchronization program is configured to implement the steps of the above sensor signal synchronization method.
[0039] In addition, to achieve the above object, the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executable on a processor to implement the steps of the above sensor signal synchronization method.
[0040] In the process of synchronizing the sensor signal, the present application can simulate the signal, and has complete adaptability to the instability of Index and Encoder signals, and can reduce the influence of the instability of Encoder / Index signals on the synchronization of laser radar and camera. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1 A flowchart of a sensor signal synchronization method provided by the present application.
[0042] Figure 2 A flowchart of a third signal production method provided by the present application.
[0043] Figure 3 A flowchart of a sensor signal normality judgment method provided by the present application.
[0044] Figure 4 A flowchart of a sensor signal detection rule provided by the present application.
[0045] Figure 5 Another flowchart of a sensor signal detection rule provided by the present application.
[0046] Figure 6 A flowchart of a signal state setting method provided by the present application.
[0047] Figure 7 A structural block diagram of a sensor signal synchronization device embodiment provided by the present application.
[0048] Figure 8 Another structural block diagram of a sensor signal synchronization device embodiment provided by the present application.
[0049] Figure 9 A vehicle structure diagram of a hardware running environment involved in the embodiment scheme of the present application.
[0050] The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings in combination with the embodiments. DETAILED DESCRIPTION
[0051] In order to make the technical problems, technical schemes and beneficial effects of the present application more clear, the present application will be further described in detail in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0052] In the following description, the suffixes such as "module", "part" or "unit" used for an element are only for facilitating the description of the present application, and have no specific meaning by itself. Therefore, "module", "part" or "unit" can be mixedly used.
[0053] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence.
[0054] In one embodiment, as Figure 1As shown, the present application provides a sensor signal synchronization method, which comprises:
[0055] Step S101, acquiring a first reference signal and / or a second reference signal sent by a first sensor.
[0056] In a preferred embodiment, the first sensor is a laser radar, and the first reference signal and the second reference signal are any signals of the laser radar. In a preferred embodiment, the first reference signal is an Encoder signal of the laser radar, and the second reference signal is an index signal of the laser radar.
[0057] The laser radar is provided with a rotating photoelectric encoder, which is increasingly applied to angle, length measurement and positioning control in various industrial systems due to its absolute uniqueness at each position, anti-interference and no need for power-off memory. The vehicle-mounted controller can obtain the orientation of the transmitter and receiver device of the current laser radar by receiving and analyzing the Index and Encoder signals sent by the rotating photoelectric encoder.
[0058] Step S102, generating a third signal according to the state of the first reference signal and / or the second reference signal.
[0059] The structure diagram of the vehicle-mounted controller internal module and the interface with the laser radar and the camera is shown in Figure 7 .
[0060] In the vehicle-mounted controller, the signal capture module 1 and the signal capture module 2 sample the Encoder and Index signals respectively, for judging whether the signal quality is normal. The signal synchronization module 1 and the signal synchronization module 2 are the analog clocks of the Encoder and the Index respectively. The analog clock is not affected by external electronic and mechanical interference, and it belongs to the implementation of the internal function of the vehicle-mounted controller chip. It can completely simulate the Index and Encoder signals, and provide them to the signal control module for calculation and output of the trigger signal.
[0061] The signal control module needs to generate a trigger signal according to the Encoder and Index signals collected by the signal capture 1 and the signal capture module 2, and then output the trigger signal to the camera. The trigger signal generation process is shown in Figure 2 .
[0062] Step S201, judging whether the first reference signal and / or the second reference signal is normal.
[0063] In the actual vehicle environment, the stability of the Index and Encoder signals cannot be completely guaranteed. The signal instability is mainly caused by two aspects: the first aspect is the electrical characteristics. The Index and Encoder signals are both 3.3v TTL type electronic signals, which do not have the characteristics of resisting interference, and it is extremely difficult to adapt to the many interference devices in the vehicle layout, and the performance is poor. The second aspect is the mechanical characteristics. The Index and Encoder signals will also be affected by the mechanical looseness of the controller connector caused by factors such as temperature and vibration, so there will be temporary signal loss.
[0064] When the existing laser radar and camera are time-synchronized, the vehicle controller has a serious dependence on the quality of the Index and Encoder signals. Once the signal is interrupted, the time-synchronization of the laser radar and the camera will stop. Therefore, the vehicle controller needs to detect the quality of the Index and Encoder signals to determine whether the quality of the Index and Encoder signals is normal. The process of detecting the quality of the Index and Encoder signals by the vehicle controller is shown in Figure 3 .
[0065] Step S301, setting a first detection rule for detecting a first signal and / or setting a second detection rule for detecting a second signal.
[0066] The vehicle controller sets the corresponding detection rules according to different sensors or sensor signals, and then detects the received Index and Encoder signals according to the set detection rules. The detection rule for the first signal is set, and the process is shown in Figure 4 .
[0067] Step S401, counting the rising edge of the first signal pulse of the first sensor in a first detection period to obtain a first count value.
[0068] The rising edge of the Encoder signal in the laser radar Signal is counted in each detection period to obtain a first count value. For example, if a detection period is 10 seconds, the rising edge of the Encoder signal is counted 7203 times.
[0069] Step S402, setting a first count standard value of the rising edge of the first signal pulse in the first detection period.
[0070] The standard count of the rising edge of the Encoder signal in the laser radar Signal in each period is set, for example, the standard count in a period is 7200.
[0071] Step S403, obtaining a first difference value between the first count value and the first count standard value.
[0072] The rising edge of the Encoder signal pulse sent by the laser radar received in a statistical period (such as 10 seconds) is counted as 7203. The standard count of the rising edge of the Encoder signal pulse of the laser radar in a period is 7200. Then the difference between the two is calculated, as shown in the following table.
[0073] Statistical period Standard count Statistical count Difference 1 7200 7203 3 2 7200 7199 1 3 7200 7198 2 4 7200 7201 1
[0074] The detection rule of the second signal is set, referring to the flow shown in Figure 5 .
[0075] Step S501, counting the rising edge of the second signal pulse of the first sensor in the second detection period to obtain a second count value.
[0076] The rising edge of the Index signal pulse in the laser radar Signal is counted in each detection period to obtain a second count value. For example, the rising edge of the Index signal pulse is counted as 100 in a detection period of 10 seconds.
[0077] Step S502, setting a second count standard value of the rising edge of the second signal pulse in the second detection period.
[0078] The standard count of the rising edge of the Index signal pulse in the laser radar Signal in each period is set, for example, the standard count in a period is 100.
[0079] Step S503, obtaining a second difference value of the second count value and the second count standard value.
[0080] The rising edge of the Index signal pulse sent by the laser radar received in a statistical period (such as 10 seconds) is counted as 103. The standard count of the rising edge of the Encoder signal pulse of the laser radar in a period is 100. Then the difference between the two is calculated, as shown in the following table.
[0081] Statistical period Standard count Statistical count Difference 1 100 103 3 2 100 99 1 3 100 98 2 4 100 101 1
[0082] Step S302, detecting the first signal according to the first detection rule to obtain a first detection result; and / or, detecting the second signal according to the second detection rule to obtain a second detection result.
[0083] In each detection period, the Encoder signal and the Index signal sent by the laser radar are detected, or only one of the Encoder signal or the Index signal is detected. Then the count value of the detected signal is compared with the standard count value corresponding to the signal to obtain the following table:
[0084]
[0085]
[0086] Step S303, according to the first detection result and / or the second detection result, setting the signal state; the signal state includes: signal normal state, signal unstable state, signal loss state.
[0087] The vehicle-mounted controller compares the statistical result with the standard value corresponding to the signal according to the statistics of the Encoder and Index signals of the laser radar, and obtains the signal detection result. The vehicle-mounted controller sets the laser radar signal state in the vehicle-mounted control according to the signal detection result. The laser radar signal state includes: signal normal state, signal unstable state, signal loss state, wherein the signal normal state means that the received Encoder and Index signals are the same as the standard value corresponding to the signal within a period of time (such as 1 minute, the specific time can be set according to the demand), that is, the signal is not lost or abnormal within the period of time; the signal unstable state means that the signal is lost within a period of time, but the lost signal is less, which is within the allowable range; the signal loss state means that the signal is lost within a period of time, and the lost signal is more, and the received signal cannot meet the synchronization requirement. For the specific setting process of the signal state, please refer to Figure 6 .
[0088] Step S601, when the first difference and / or the second difference is within the first range, setting the signal state as the signal unstable state.
[0089] The Encoder and Index signals are detected within a period of time, such as 1 minute, to obtain the corresponding detection result, which is shown in the following table:
[0090]
[0091]
[0092] Through detection, it is obtained that the received signal is compared with the standard value within the period of time, and the maximum deviation is 1. The deviation is within the allowable range, that is, the signal can be used for signal synchronization between the laser radar and the camera, and then the signal state is set as the signal unstable state.
[0093] The allowable range of the deviation, and the specific value can be set according to the actual demand, and the technical solution is not limited.
[0094] Step S602, when the first difference and / or the second difference is within the second range, setting the signal state as the signal loss state.
[0095] The Encoder and Index signals are detected within a period of time, such as 1 minute, to obtain corresponding detection results, as shown in the following table:
[0096]
[0097] Through detection, it is obtained that the received signal is compared with the standard value within the period of time, and the maximum deviation is 5. The deviation exceeds the allowable range, that is, the signal cannot be used for signal synchronization between the lidar and the camera, and the signal state is set to a signal loss state.
[0098] If the signal state is set to the signal loss state, the problem is serious at this time, generally the wiring harness is loose or the signal is seriously affected, at this time the vehicle-mounted controller reports an error event to the vehicle-mounted computing unit, informs it of a warning that the synchronization effect quality may decrease in a short time, and the signal synchronization module will maintain its own analog Encoder / Index timing alone, to continue to satisfy the relative timing synchronization between the lidar and the camera for a period of time, to give the system sufficient time to execute the pull-over parking or other emergency actions.
[0099] In step S603, when the first difference and / or the second difference is 0 within n periods (n is greater than or equal to 1), the signal state is set to the signal normal state.
[0100] The Encoder and Index signals are detected within a period of time, such as 1 minute, to obtain corresponding detection results, as shown in the following table:
[0101]
[0102] Through detection, it is obtained that the received signal is compared with the standard value within the period of time, and the deviation is 0, and the signal state is set to the signal normal state.
[0103] In step S304, when the signal state is the signal normal state, the first signal and / or the second signal is normal; when the signal state is the signal unstable state or the signal loss state, the first signal and / or the second signal is abnormal.
[0104] The Encoder and Index signals are detected, and then the signal state is set according to the detection result. The vehicle-mounted control unit can identify whether the current Encoder and Index signals are normal according to the signal state. When the signal state is a signal normal state, the current Encoder and Index signals are normal. When the signal state is a signal unstable state or a signal loss state, the current Encoder and Index signals are abnormal. After identifying whether the Encoder and Index signals are normal, the subsequent vehicle-mounted control unit can process the Encoder and Index signals accordingly.
[0105] In step S202, a corresponding first analog signal and / or a second analog signal are generated according to the first reference signal and / or the second reference signal.
[0106] When the vehicle-mounted controller judges that the Encoder and Index signal state is normal, the signal capture module will synchronize the captured Encoder / Index time sequence to the signal synchronization module in the form of phase shift, keep the time sequence in the signal synchronization module consistent with the lidar, and generate analog Encoder and Index signals according to the received Encoder and Index signals, that is, the signal synchronization module will simulate the Encoder and Index signals in the normal state. For example, according to the frequency of the Encoder and Index signals, the internal clock of the signal synchronization module is used to simulate and generate corresponding Encoder and Index signals. For example, an Encoder signal is received every 50 milliseconds, and an Index signal is received every 300 milliseconds; then, through the internal clock of the signal synchronization module, an Encoder analog signal is generated every 50 milliseconds, and an Index signal is generated every 300 milliseconds. The signal synchronization module will save the sending frequency of the Encoder and Index signals when the Encoder and Index signal state is normal.
[0107] When a fault occurs (i.e., the Encoder or Index signal is abnormal, the signal state is an unstable signal state or a signal loss state), the signal synchronization module does not receive the synchronization mechanism from the signal capture module, and the signal synchronization module will maintain its own simulated Encoder / Index timing (e.g., generating an Encoder simulation signal every 50 milliseconds, and generating an Index simulation signal every 300 milliseconds) until the signal capture module detects the correct Encoder / Index signal normal again, and then restarts the synchronization mechanism; if the signal state is a signal loss state, the problem is serious, generally due to a loose wiring harness or serious signal impact, at this time the signal control module will report the error to the vehicle-mounted computing unit according to the information fed back by the signal capture module, and inform it of the early warning that the synchronization effect quality may decrease in a short time, and at the same time the signal synchronization module will maintain its own simulated Encoder / Index timing to continue to meet the relative timing synchronization between the laser radar and the camera for a period of time, giving the system sufficient time to execute the pull-over parking or other emergency actions.
[0108] When the signal synchronization module simulates the Encoder or Index signal, it will determine whether the frequency of generating the Encoder simulation signal (i.e., receiving a normal Encoder signal frequency, such as receiving an Encoder signal every 50 milliseconds) and the frequency of generating the Index simulation signal (i.e., receiving a normal Index signal frequency, such as receiving an Index signal every 300 milliseconds) has been saved before. If it has been saved, the latest frequency will overwrite the previous frequency. That is, as long as the signal synchronization module receives the Encoder and Index signals in the normal state, it will update the frequency of generating the Encoder simulation signal and the frequency of generating the Index simulation signal in real time, so as to ensure that the signal synchronization module can generate the corresponding simulation signal according to the latest received correct Encoder or Index signal, thereby ensuring that the simulation signal can be updated in real time after the Encoder or Index signal of the laser radar changes, thereby adapting to the signal simulation function of various laser radar devices.
[0109] In step S203, if the first reference signal and / or the second reference signal is normal, a third signal is generated according to the first reference signal and / or the second reference signal; if the first reference signal and / or the second reference signal is abnormal, a third signal is generated according to the first simulation signal and / or the second simulation signal.
[0110] The rotating photoelectric encoder in the laser radar has been widely used in angle, length measurement and positioning control in various industrial systems because of its absolute uniqueness in each position, anti-interference and no need for power-off memory. The vehicle-mounted controller can obtain the orientation of the transmitter and receiver device of the current laser radar by analyzing the Index and Encoder signals sent by the rotating photoelectric encoder. Further, by calculating the time required for camera exposure, the vehicle-mounted controller can control the exposure start time point through the camera trigger signal. Through the above operation, the time difference between the laser radar and the central scanning area and the middle exposure area of the camera can be inferred, and this time difference is eliminated by the vehicle-mounted controller to achieve the time synchronization of the laser radar and the camera.
[0111] The vehicle-mounted controller determines whether the received Encoder and Index signals are normal. If the received Encoder and Index signals are normal, the orientation of the laser radar is obtained according to the Encoder and Index signals, and then the time required for the camera is obtained to generate a trigger signal for triggering the camera to take a picture. For example, when the laser radar is oriented at an angle of 45 degrees, a trigger signal for triggering the camera to take a picture is sent to the camera B. After receiving the trigger signal, the camera B continues to take pictures, and the obtained picture and the point cloud data scanned by the laser radar are in the same area. The vehicle-mounted controller can adjust the sending of the trigger signal for triggering the camera to take a picture when the laser radar is at a certain angle according to the requirements.
[0112] If the received Encoder and Index signals are abnormal, the vehicle-mounted controller uses the simulated Encoder and Index signals to obtain the orientation of the laser radar, and then obtains the time required for the camera to generate a trigger signal for triggering the camera to take a picture.
[0113] In step S103, the third signal is sent to the second sensor to synchronize the first reference signal and / or the second reference signal.
[0114] After the vehicle-mounted controller generates the trigger signal for triggering the camera to take a picture, the trigger signal is sent to the camera. After receiving the trigger signal, the camera takes a picture and then transmits the taken picture to the vehicle-mounted controller. The vehicle-mounted controller has considered the camera shooting time (i.e. exposure time) and the rotation speed of the laser radar when sending the trigger signal, so as to ensure that the picture taken by the camera and the point cloud data scanned by the laser radar are in the same area.
[0115] The application simulates normal Index and Encoder signals in the sensor signal synchronization process, and synchronizes through the simulation signals when the Index and Encoder signals are abnormal, can completely adapt to the instability of the Index and Encoder signals, and reduces the influence of the instability of the Encoder / Index signals on the synchronization of the laser radar and the camera.
[0116] In addition, the embodiment of the application further provides a sensor signal synchronization device, referring to Figure 8 , the sensor signal synchronization device comprises a signal capturing module 10, a signal synchronization module 20 and a signal control module 30.
[0117] The signal capturing module 10 is used for acquiring a first reference signal and / or a second reference signal sent by a first sensor, judging whether the first reference signal and / or the second reference signal is normal, and sending the first reference signal and / or the second reference signal to the signal synchronization module 20 when the first reference signal and / or the second reference signal is normal.
[0118] The signal synchronization module 20 is used for simulating the first reference signal to obtain a corresponding first simulation signal, and / or simulating the second reference signal to obtain a corresponding second simulation signal, sending the first reference signal and / or the second reference signal to the signal control module when the first reference signal and / or the second reference signal is normal, and sending the first simulation signal and / or the second simulation signal to the signal control module when the first reference signal and / or the second reference signal is abnormal.
[0119] The signal control module 30 is used for generating a third signal according to the first reference signal and / or the second reference signal when the first reference signal and / or the second reference signal is normal, generating a third signal according to the first simulation signal and / or the second simulation signal when the first reference signal and / or the second reference signal is abnormal, and sending the third signal to a second sensor.
[0120] The application simulates normal Index and Encoder signals in the sensor signal synchronization process, and synchronizes through the simulation signals when the Index and Encoder signals are abnormal, can completely adapt to the instability of the Index and Encoder signals, and reduces the influence of the instability of the Encoder / Index signals on the synchronization of the laser radar and the camera.
[0121] It should be noted that each unit in the device can be used to realize each step in the above method, and the corresponding technical effects are achieved, and the embodiments will not be described here.
[0122] Referring to Figure 9 , Figure 9 The structural schematic diagram of the vehicle related to the hardware running environment of the embodiment of the application.
[0123] As Figure 9 shown, the vehicle can include a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display screen (Display), an input unit such as a keyboard (Keyboard), and an optional user interface 1003 can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI, 4G, 5G interface). The memory 1005 can be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a magnetic disk memory. The memory 1005 can also be an independent storage device from the aforementioned processor 1001.
[0124] Those skilled in the art can understand that Figure 9 The structure shown in the figure does not constitute a limitation on the vehicle, and can include more or fewer components than the illustrated components, or combine certain components, or different component arrangements.
[0125] As Figure 9 shown, the memory 1005 as a computer storage medium can include an operating system, a network communication module, a user interface module, and a sensor signal synchronization program.
[0126] In Figure 9 the vehicle shown, the network interface 1004 is mainly used for data communication with an external network; the user interface 1003 is mainly used for receiving the input instructions of the user; the vehicle calls the sensor signal synchronization program stored in the memory 1005 through the processor 1001, and performs the following operations:
[0127] Obtain the first reference signal and / or the second reference signal sent by the first sensor;
[0128] Generate a third signal according to the state of the first reference signal and / or the second reference signal;
[0129] Send the third signal to the second sensor to synchronize the first reference signal and / or the second reference signal to the second sensor.
[0130] Optionally, the generating the third signal according to the state of the first reference signal and / or the second reference signal comprises the following steps:
[0131] determining whether the first reference signal and / or the second reference signal is normal;
[0132] generating a corresponding first analog signal and / or a second analog signal according to the first reference signal and / or the second reference signal;
[0133] if the first reference signal and / or the second reference signal is normal, generating the third signal according to the first reference signal and / or the second reference signal; if the first reference signal and / or the second reference signal is abnormal, generating the third signal according to the first analog signal and / or the second analog signal.
[0134] Optionally, the determining whether the first reference signal and / or the second reference signal is normal comprises the following steps:
[0135] setting a first detection rule for detecting the first reference signal and / or setting a second detection rule for detecting the second reference signal;
[0136] detecting the first reference signal according to the first detection rule to obtain a first detection result; and / or detecting the second reference signal according to the second detection rule to obtain a second detection result;
[0137] setting a signal state according to the first detection result and / or the second detection result; the signal state comprises a signal normal state, a signal unstable state, and a signal loss state;
[0138] when the signal state is the signal normal state, the first reference signal and / or the second reference signal is normal; when the signal state is the signal unstable state or the signal loss state, the first reference signal and / or the second reference signal is abnormal;
[0139] when the signal state is set to the signal loss state, an alarm event is sent.
[0140] Optionally, the first detection rule comprises the following steps:
[0141] counting the rising edge of the first reference signal pulse of the first sensor in a first detection period to obtain a first count value;
[0142] setting a first count standard value of the rising edge of the first reference signal pulse in the first detection period;
[0143] obtaining a first difference value between the first count value and a first count standard value;
[0144] the second detection rule comprises the following steps:
[0145] counting the rising edge of the second reference signal pulse of the first sensor in a second detection period to obtain a second count value;
[0146] setting a second count standard value of the rising edge of the second reference signal pulse in the second detection period;
[0147] obtaining a second difference value between the second count value and the second count standard value.
[0148] Optionally, the setting of the signal state according to the first detection result and / or the second detection result comprises the following steps:
[0149] when the first difference value and / or the second difference value is in a first range, setting the signal state as the signal unstable state;
[0150] when the first difference value and / or the second difference value is in a second range, setting the signal state as the signal loss state;
[0151] when the first difference value and / or the second difference value is 0 in n periods (n is greater than or equal to 1), setting the signal state as the signal normal state.
[0152] Optionally, the simulation of the first reference signal to obtain a corresponding first simulation signal comprises: phase shifting the first reference signal to obtain the corresponding first simulation signal;
[0153] the simulation of the second reference signal to obtain a corresponding second simulation signal comprises: phase shifting the second reference signal to obtain the corresponding second simulation signal.
[0154] Optionally, the first sensor is a laser radar, and the second sensor is a shooting device; the first reference signal is an Encoder signal of the laser radar, the second reference signal is an index signal of the laser radar, and the third signal is a shooting device shooting trigger signal.
[0155] In the synchronization process of the sensor signal, the normal Index and Encoder signals are simulated. When the Index and Encoder signals are abnormal, the synchronization is performed through the simulation signal. The Index and Encoder signals have complete adaptability to instability, and the influence of the instability of the Encoder / Index signal on the synchronization of the laser radar and the camera is reduced.
[0156] Furthermore, the embodiment of the present application also provides a computer readable storage medium, and the computer readable storage medium stores a sensor signal synchronization program. The sensor signal synchronization program is executed by a processor to realize the following operations:
[0157] obtaining a first reference signal and / or a second reference signal sent by a first sensor;
[0158] generating a third signal according to a state of the first reference signal and / or the second reference signal;
[0159] sending the third signal to a second sensor to synchronize the first reference signal and / or the second reference signal.
[0160] Optionally, the generating of the third signal according to the state of the first reference signal and / or the second reference signal comprises the following steps:
[0161] judging whether the first reference signal and / or the second reference signal is normal;
[0162] generating a corresponding first analog signal and / or a second analog signal according to the first reference signal and / or the second reference signal;
[0163] if the first reference signal and / or the second reference signal is normal, generating the third signal according to the first reference signal and / or the second reference signal; if the first reference signal and / or the second reference signal is abnormal, generating the third signal according to the first analog signal and / or the second analog signal.
[0164] Optionally, the judging of whether the first reference signal and / or the second reference signal is normal comprises the following steps:
[0165] setting a first detection rule for detecting the first reference signal and / or setting a second detection rule for detecting the second reference signal;
[0166] detecting the first reference signal according to the first detection rule to obtain a first detection result; and / or detecting the second reference signal according to the second detection rule to obtain a second detection result;
[0167] setting a signal state according to the first detection result and / or the second detection result; the signal state comprises a normal signal state, an unstable signal state and a signal loss state;
[0168] when the signal state is the signal normal state, the first reference signal and / or the second reference signal is normal; when the signal state is the signal unstable state or the signal loss state, the first reference signal and / or the second reference signal is abnormal;
[0169] setting the signal state as the signal loss state, sending an alarm event.
[0170] Optionally, the first detection rule comprises the following steps:
[0171] counting the rising edges of the first reference signal pulses of the first sensor in a first detection period to obtain a first count value;
[0172] setting a first count standard value of the rising edges of the first reference signal pulses in the first detection period;
[0173] obtaining a first difference value between the first count value and the first count standard value;
[0174] The second detection rule comprises the following steps:
[0175] counting the rising edges of the second reference signal pulses of the first sensor in a second detection period to obtain a second count value;
[0176] setting a second count standard value of the rising edges of the second reference signal pulses in the second detection period;
[0177] obtaining a second difference value between the second count value and the second count standard value.
[0178] Optionally, setting the signal state according to the first detection result and / or the second detection result comprises the following steps:
[0179] when the first difference value and / or the second difference value is in a first range, setting the signal state as the signal unstable state;
[0180] when the first difference value and / or the second difference value is in a second range, setting the signal state as the signal loss state;
[0181] when the first difference value and / or the second difference value is 0 in n periods (n is greater than or equal to 1), setting the signal state as the signal normal state.
[0182] Optionally, the analog first reference signal is simulated to obtain a corresponding first analog signal, which comprises phase-shifting the first reference signal to obtain the corresponding first analog signal.
[0183] The simulating the second reference signal to obtain a corresponding second analog signal comprises: phase-shifting the second reference signal to obtain the corresponding second analog signal.
[0184] Optionally, the first sensor is a laser radar, and the second sensor is a camera; the first reference signal is an Encoder signal of the laser radar, and the second reference signal is an index signal of the laser radar; and the third signal is a camera shooting trigger signal.
[0185] The application simulates normal Index and Encoder signals in the sensor signal synchronization process. When the Index and Encoder signals are abnormal, the synchronization is performed through the simulated signals. The Index and Encoder signals can be completely adapted to the instability, and the influence of the instability of the Encoder / Index signals on the laser radar and the camera synchronization is reduced.
[0186] It should be noted that, in this document, the terms "comprise", "comprising", or any other variant thereof are intended to cover non-exclusive inclusions, such that processes, methods, articles, or systems that comprise a list of elements do not only include those elements, but also include other elements that are not expressly listed, or other elements inherent to such processes, methods, articles, or systems. Without more limitations, the element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or system that includes the element.
[0187] The above-mentioned embodiment numbers of the application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0188] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and necessary general hardware platforms, of course, they can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, an optical disk) as described above, and includes a plurality of instructions for making a terminal device (which can be a mobile phone, a computer, a server, a controller, or a network device, etc.) execute the methods described in the various embodiments of the application.
[0189] The above is only the preferred embodiment of the application, and does not limit the patent scope of the application, and any equivalent structure or equivalent flow transformation made by using the content of the application specification and drawings, or directly or indirectly applied to other related technical fields, are also included in the patent protection scope of the application.
Claims
1. A method of synchronizing sensor signals, characterized by, The method comprises the following steps: acquiring a first reference signal and a second reference signal sent by a first sensor; generating a third signal according to the state of the first reference signal and the second reference signal; sending the third signal to a second sensor to synchronize the first reference signal and the second reference signal for the second sensor; wherein the step of generating a third signal according to the state of the first reference signal and the second reference signal comprises the following steps: determining whether the first reference signal and the second reference signal are normal; generating a corresponding first analog signal and a second analog signal according to the first reference signal and the second reference signal; if the first reference signal and the second reference signal are normal, generating a third signal according to the first reference signal and the second reference signal; if the first reference signal and the second reference signal are abnormal, generating a third signal according to the first analog signal and the second analog signal; wherein the step of analogizing the first reference signal to obtain a corresponding first analog signal comprises: phase shifting the first reference signal to obtain the corresponding first analog signal; the step of analogizing the second reference signal to obtain a corresponding second analog signal comprises: phase shifting the second reference signal to obtain the corresponding second analog signal; wherein the first sensor is a laser radar, and the second sensor is a shooting device; the first reference signal is an Encoder signal of the laser radar, and the second reference signal is an index signal of the laser radar; and the third signal is a shooting trigger signal of the shooting device.
2. The method of claim 1, wherein, The step of determining whether the first reference signal and the second reference signal are normal comprises the following steps: setting a first detection rule for detecting the first reference signal and setting a second detection rule for detecting the second reference signal; detecting the first reference signal according to the first detection rule to obtain a first detection result, and detecting the second reference signal according to the second detection rule to obtain a second detection result; setting a signal state according to the first detection result and the second detection result; the signal state comprises: a signal normal state, a signal unstable state and a signal loss state; when the signal state is the signal normal state, the first reference signal and the second reference signal are normal; when the signal state is the signal unstable state or the signal loss state, the first reference signal and the second reference signal are abnormal; when the signal state is set to the signal loss state, an alarm event is sent.
3. The method of claim 2, wherein, The first detection rule comprises the following steps: counting the rising edge of the first reference signal pulse of the first sensor in a first detection period to obtain a first count value; setting a first count standard value of the rising edge of the first reference signal pulse in the first detection period; acquiring a first difference value between the first count value and the first count standard value; The second detection rule comprises the following steps: counting the rising edge of the second reference signal pulse of the first sensor in a second detection period to obtain a second count value; set a second count standard value of a rising edge of the second reference signal pulse in the second detection period; obtain a second difference value of the second count value and the second count standard value.
4. The method of claim 3, wherein, the signal state is set according to the first detection result and the second detection result, including the following steps: when the first difference value and the second difference value are in a first range, the signal state is set as the signal unstable state; when the first difference value and the second difference value are in a second range, the signal state is set as the signal loss state; when the first difference value and the second difference value are 0 in n periods, the signal state is set as the signal normal state, wherein n is greater than or equal to 1.
5. A sensor signal synchronizing apparatus characterized by comprising: The sensor signal synchronization device comprises a signal capture module, a signal synchronization module, and a signal control module. The signal capture module is configured to obtain a first reference signal and a second reference signal sent by a first sensor, to determine whether the first reference signal and the second reference signal are normal, and to send the first reference signal and the second reference signal to the signal synchronization module when the first reference signal and the second reference signal are normal. The signal synchronization module is configured to simulate the first reference signal to obtain a corresponding first simulation signal, including phase shifting the first reference signal to obtain the corresponding first simulation signal, to simulate the second reference signal to obtain a corresponding second simulation signal, including phase shifting the second reference signal to obtain the corresponding second simulation signal, to send the first reference signal and the second reference signal to the signal control module when the first reference signal and the second reference signal are normal, and to send the first simulation signal and the second simulation signal to the signal control module when the first reference signal and the second reference signal are abnormal. The signal control module is configured to generate a third signal according to the first reference signal and the second reference signal when the first reference signal and the second reference signal are normal, to generate the third signal according to the first simulation signal and the second simulation signal when the first reference signal and the second reference signal are abnormal, and to send the third signal to a second sensor to synchronize the first reference signal and the second reference signal. The first sensor is a laser radar, the second sensor is a shooting device, the first reference signal is an Encoder signal of the laser radar, the second reference signal is an index signal of the laser radar, and the third signal is a shooting trigger signal of the shooting device.
6. A vehicle, characterized by The vehicle comprises a memory, a processor, and a sensor signal synchronization program stored on the memory and executable on the processor, and the sensor signal synchronization program is configured to implement the steps of the sensor signal synchronization method according to any one of claims 1 to 4.
7. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the steps of the sensor signal synchronization method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Data synchronization method, device and system
CN111736169A