A kind of UTM-30LX two-dimensional laser radar data collection system based on arm processor
Technical field
The utility model relates to two-dimensional laser radar scanning systems and embedded system field, specially a kind of to be based on ARM
The UTM-30LX two-dimensional laser radar data collection system of processor.
Background technique
Two-dimensional laser radar (LIDAR) is a kind of laser measurement and surveying device, principle and conventional microwave radar range finding
Method is similar.But laser radar uses laser beam, has the characteristics that strong antijamming capability, high resolution, in the nothing of trolley
People's guidance and obstacle detection, the automatic obstacle-avoiding of unmanned aerial vehicle and navigation, the security protection protection of residential houses and the environment of robot
Identification etc. gradually expanded application.In pesticide target spraying, using the measuring technique of laser sensor compared to use
The measuring technique of ultrasonic wave and microwave remote sensor, detection accuracy is high, performance is stable and is not illuminated by the light intensity effect.Currently based on sharp
The accurate variable rate spray technology of optical radar becomes new research hotspot, therefore the two-dimensional laser radar of the utility model patent design
Ranging data acquisition system meets actual demand very much.
The north Japanese Hokuyo(sun) company's production UTM-30LX two-dimensional laser radar, have measurement angle wide (270 °),
The advantages that far measuring distance (30m), measurement accuracy is high.But the driver and application model that producer provides only support PC machine platform
Under data acquisition, in terms of published data, there is no the UTM-30LX two-dimensional laser radar based on embeded processor at present
Data collection system.
Utility model content
Problem to be solved in the utility model is, provides a kind of based on the embedded of STM32F429 arm processor
Two-dimensional laser radar UTM-30LX data collection system.Its core is driver of the autonomous Design based on arm processor, benefit
It, can be by STM32F429 ARM using UTM-30LX two-dimensional laser radar as from equipment with USB2.0 standard communication protocol
Processor identification;Recycle SCIP2.0 private communication protocol, by under ARM platform data acquisition module carry out STM32F429 with
Command communication between UTM-30LX two-dimensional laser radar, acquisition 270 ° of scanning ranges of laser radar in survey away from information, timestamp,
Angle information.
The utility model solves its technical problem and adopts the following technical solutions realization:
A kind of UTM-30LX two-dimensional laser radar data collection system based on arm processor, including main equipment ARM processing
Device and from equipment UTM-30LX two-dimensional laser radar module, arm processor onboard data acquisition processing module and USB communication
Module;UTM-30LX two-dimensional laser radar turns USB interface access arm processor using serial ports, and arm processor is communicated by USB
Master-slave equipment relationship is established between module and UTM-30LX, realizes that arm processor knows the equipment of UTM-30LX two-dimensional laser radar
Not and data communication, the original ranging information then UTM-30LX two-dimensional laser radar fed back by digital sampling and processing into
Row receives and processing, to obtain two-dimensional surface ranging information, timestamp and angle information.
As a preferred embodiment of the utility model, USB communication module includes USB HOST communication module and USB
VCP communication module, in which:
USB HOST communication module, for detecting and identifying that the UTM-30LX two dimension as arm processor external equipment swashs
Optical radar;
USB VCP communication module, for realizing the data conversion between the USB port and UTM-30LX serial ports of arm processor.
As a preferred embodiment of the utility model, digital sampling and processing passes through private communication protocol
SCIP2.0 and UTM-30LX two-dimensional laser radar carry out command communication.
As a preferred embodiment of the utility model, model STM32F429, STM32F103 of arm processor or
Person STM32F407.
As a preferred embodiment of the utility model, the original ranging information of UTM-30LX two-dimensional laser radar feedback
It is to be obtained by being detected in 270 ° of scanning ranges.
Compared with prior art, the utility model has the following advantages and beneficial effects:
(1) data collection system provided by the utility model uses STM32F429 arm processor as the master control of system
Chip has widened the application range of UTM-30LX two-dimensional laser radar, allows to be conveniently applied to embedded system;In fact
The embeded processor of other type is applied equally to novel thought.
(2) compared with the UTM-30LX two-dimensional laser radar collection system that tradition is constituted based on PC machine, the utility model base
In embeded processor, power consumption and cost are lower, are more suitable for outdoor work and mass commodity production.
Detailed description of the invention
Fig. 1 is that the UTM-30LX two-dimensional laser radar data based on STM32F429 arm processor of the utility model is adopted
Collecting system structural schematic diagram;
Fig. 2 is that the UTM-30LX two-dimensional laser radar data based on STM32F429 arm processor of the utility model is adopted
Collecting system functional block diagram;
Fig. 3 is that the UTM-30LX two-dimensional laser radar data based on STM32F429 arm processor of the utility model is adopted
The circuit diagram of collecting system USB HOST communication module;
Fig. 4 is the UTM-30LX two-dimensional laser radar data acquisition based on STM32F429 arm processor of utility model
The circuit diagram of system USB VCP communication module;
Fig. 5 is the UTM-30LX two-dimensional laser radar data acquisition based on STM32F429 arm processor of utility model
System Data Collection Module flow chart;
Fig. 6 (a) and (b) show the UTM-30LX data acquisition system based on STM32F429 arm processor of the utility model
System is directed to the comparison laboratory experiment of same covered court with PC machine acquisition data;Wherein:
The interior Fig. 6 (a) STM32F429 ARM data coordinates scatter plot;
The interior Fig. 6 (b) PC machine data coordinates scatter plot;
Fig. 7 (a) and (b) show the UTM-30LX data acquisition system based on STM32F429 arm processor of the utility model
System is directed to the comparison outdoor experiment of same outdoor scene with PC machine acquisition data;Wherein:
Data coordinates scatter plot of the outdoor Fig. 7 (a) based on STM32F429 ARM;
The outdoor Fig. 7 (b) PC machine data coordinates scatter plot;
Fig. 8-Figure 12 is UTM-30LX two-dimensional laser radar data of the utility model based on STM32F429 arm processor
Each hardware circuit principle figure of acquisition system;
Wherein:
Fig. 8 is the reset circuit schematic diagram of acquisition system;
Fig. 9 is the crystal oscillating circuit schematic diagram of acquisition system;
Figure 10 is the cpu power circuit diagram of acquisition system;
Figure 11 is the lowering and stabilizing blood pressure schematic diagram of acquisition system;
Figure 12 is the serial port circuit schematic diagram of acquisition system.
Specific embodiment of the present utility model is shown in detail by following embodiment and its attached drawing.
Specific embodiment
Below in conjunction with attached drawing, to according to specific embodiment provided by the utility model, structure, feature and its effect, in detail
It describes in detail bright as after.
The overal system design of the utility model refers to Fig. 1 and Fig. 2.It is described in the utility model based on arm processor
UTM-30LX two-dimensional laser radar data collection system makes arm processor by the combination of USB VCP and USB HOST module
Equipment identification is carried out to laser radar UTM-30LX;Data acquisition module is first on the basis of USB VCP and USB HOST module
The upper docking for carrying out port, port combine the private communication instruction and data coding skill of UTM-30LX laser radar after being successfully connected
Art is received and is handled to laser radar initial data collected, and final two-dimensional surface ranging information, timestamp are obtained
And angle information.Model STM32F429, STM32F103 of arm processor or STM32F407 etc..
Below with reference to what is shown in attached drawing, with the UTM-30LX bis- of the arm processor foundation of model STM32F429
Laser radar data acquisition system is tieed up, to explain the technical solution of the utility model in detail.
The utility model is broadly divided into three parts:
(1) USB HOST communication pattern is designed
The module design of USB HOST is divided into bottom, middle layer and three, upper layer structure.Fabric is mainly that hardware is taken out
As layer, for the reading and calling of USB register function, and receive to send the definition for interrupting service function;Media layer damage master
It is responsible for the initialization of each function in USB, the management of USB communication protocol and the control of terminal point information function, wherein usb protocol
Management contains the control information processing of USB various types of request and endpoint.Superstructure contain USB power on, adjust electricity, hang up and
Recovery event handles the configuration of the system functions such as function and USB fundamental clock, interruption, memory initialization, and is responsible for each
Class USB interrupt event makees poll processing and host and carries out information configuration to the descriptor of external equipment, and configuration file contains
The initialization of USB pin, register parameters initialization, interrupts call back function etc..Its pin is with reference to Fig. 3 USB HOST interface electricity
Road schematic diagram is made that corresponding function structure body designs for its hardware module in superstructure.
(2) design USB VCP virtual serial port driving
By the configuration of USB clock, logical, USB interrupts setting and function initializes three for the function configuration of USB virtual serial port
Distribution is constituted, and USB interruption setting contains USB interruption and wakes up function, USB lower-priority data processing interrupt function.With reference to
Fig. 4 USB HOST interface circuit schematic diagram, function also need the hardware design for USB virtual serial port module to be matched with postponing
It sets, each communications parameter connecting with serial port module is set.The baud rate that the Interface design of this module uses is 115200,8
Data bit, no parity position and 1 stop position.
(3) data acquisition module program writing and debugs
Data acquisition module flow chart refers to Fig. 5, when microprocessor and laser radar carry out command communication, needs basis
The laser radar returned data that SCIP2.0 communication instruction receives buffer area distinguishes, continues to communicate if correct, wrong
Mistake then returns to upper level function.Such as: when microprocessor sends " QT n " order, if UTM-30LX laser radar return value
For " 00P n ", show that communication correctly continues to send data acquisition instructions;Otherwise COM docking is returned, is recommunicated.It is set in module
During meter, examine each communication alleviation can normal operation by the feedback command of UTM-30LX.
When STM32F429 microprocessor needs to obtain the measurement data of laser radar, passed through according to SCIP2.0 communication protocol
Microprocessor sends specific data acquisition command to laser sensor.When system sends data acquisition instructions, also to following
Several aspects are designed:
1. laser radar return initial data by timestamp, verification and and initial range data constitute.
2. the measurement data that laser radar UTM-30LX is returned is by multiple data chunks at each row of data block is all 64 words
Section.
3. range data is made of 1081 data, part of key measurement data such as farthest measurement distance, recently
Measurement distance, just before putting measurement data etc. needs extract.
Due to the difference of distance, cause byte digit different, according to data encoding principle in SCIP2.0 communication protocol, when
Data more than three bytes can be separated at end.Therefore in the data transmission and reception of ARM, microprocessor buffer
(buffer area) for the temporary of data, integrality of the data in communication process that be set as of buffer area provides guarantee.Consider
To every row distance information that in measurement data acquisition, UTM-30LX laser radar is sent by the range data and one of 64 bytes
A verification and composition, data acquisition module obtain the character string quantity that each row of data is sent by laser radar, and then to caching
The size in area carries out assignment.Then its data is temporarily stored in buffer area by the function write.
Data acquisition module is before data decoding, by line_length to the raw data word section number of buffer area
Determine, the initial data of acquisition is extracted and separated.First according to the byte length of timestamp, it is corresponding to extract its acquisition
Time data;Then according to the ending mark of every row measuring data block " 0 ", entire measurement data is separated, and is stored in
The decoding of measurement data is used in Data array;Finally by front and back measurement data characteristic in comparison buffer area array, realizes and close
The extraction of key data.
Laser radar institute's ranging from length correspond to the size of its measurement data byte, therefore microprocessor STM32F429
ARM need to carry out corresponding Character decoder according to the data length of initial data, to obtain UTM-30LX bis- before data decoding
Tie up measurement distance values of the laser radar within a certain period of time under corresponding angle.Laser radar data acquisition module is not in order to facilitate
Requirement with user to measurement can carry out different settings to the number of setting DATA REASONING.To verify utility model content
Validity indoor and outdoors number has been carried out based on designed UTM-30LX two-dimensional laser radar data collection system respectively
It is tested according to acquisition.And the UTM-30LX two-dimensional laser radar data collection system result pair based on PC machine by experimental result and tradition
Than.
Fig. 6 (a) and (b) illustrate real in the UTM-30LX data collection system room based on STM32F429 arm processor
Data comparison figure now is acquired with PC machine, wherein Fig. 6 (a) is the data acquisition floating-point figure based on STM32F429 arm processor, figure
6(b) be then computer under indoor scene identical as Fig. 6 (a) data coordinates scatter plot.The coordinate scatter plot of the two almost one
It causes, the critical data of experiment is compared below.Wherein ranging information longest 2.909m obtained by ARM, most short 0.830m;Phase
With under the conditions of, the ranging information longest 2.911m of PC machine acquisition, most short 0.831m, the two error is within 0.1 to 0.2mm, master
If due to ARM acquisition and PC machine acquisition be by several times complete, twice acquisition between laser radar apparatus position due to vibration etc.
Small change has occurred in reason.
It, will be based on STM32F429 arm processor in order to verify the feasibility of system since outdoor environment is relative complex
Laser radar UTM-30LX data collection system room is placed in outer experimental site and is tested, as shown in Fig. 7 (a), Fig. 7 (b): Fig. 7
It (a) is the outdoor data coordinates scatter plot based on STM32F429 arm processor;Fig. 7 (b) is outdoor scene identical as Fig. 7 (a)
Under outdoor PC machine data coordinates scatter plot;It is found by comparing, the data which acquires in outdoor experiment are in the end PC
The data point cloud atlas of driver acquisition is almost overlapped.Wherein ARM ranging information longest 2.841m collected is most short
0.738m;The ranging information longest 2.845m of PC machine, most short 0.737m, the two error is within 0.1 to 0.4mm.Source of error
With the error analysis of front laboratory experiment, no longer repeat here.
UTM-30LX two-dimensional laser radar data acquisition system based on STM32F429 arm processor in the present invention
System each hardware circuit further comprise system reset circuit, crystal oscillating circuit, cpu power circuit, system decompression voltage regulator and
Serial port circuit etc., schematic diagram is as shown in Fig. 8-Figure 12.
It should be noted that the content being not described in detail in the utility model specification belongs to this field professional technique people
Existing theory and technology well known to member.Above embodiments are only to illustrate the technical idea of the utility model, this cannot be limited with this
The protection scope of utility model, it is all according to the utility model proposes technical idea, done on the basis of technical solutions appoint
What is changed, and is each fallen within scope of protection of the utility model.