CN106200642A - The two-wheeled balance car of a kind of realizing route automatic Memory and reproduction independently goes on patrol method - Google Patents

The two-wheeled balance car of a kind of realizing route automatic Memory and reproduction independently goes on patrol method Download PDF

Info

Publication number
CN106200642A
CN106200642A CN201610635587.2A CN201610635587A CN106200642A CN 106200642 A CN106200642 A CN 106200642A CN 201610635587 A CN201610635587 A CN 201610635587A CN 106200642 A CN106200642 A CN 106200642A
Authority
CN
China
Prior art keywords
data
buffer area
balance car
group
path
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610635587.2A
Other languages
Chinese (zh)
Other versions
CN106200642B (en
Inventor
崔昊杨
黄琼
曾俊冬
江超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai University of Electric Power
University of Shanghai for Science and Technology
Original Assignee
Shanghai University of Electric Power
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai University of Electric Power filed Critical Shanghai University of Electric Power
Priority to CN201610635587.2A priority Critical patent/CN106200642B/en
Publication of CN106200642A publication Critical patent/CN106200642A/en
Application granted granted Critical
Publication of CN106200642B publication Critical patent/CN106200642B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0212Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
    • G05D1/0223Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory involving speed control of the vehicle
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0212Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
    • G05D1/0217Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory in accordance with energy consumption, time reduction or distance reduction criteria
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0212Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
    • G05D1/0221Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory involving a learning process

Abstract

nullThe two-wheeled balance car that the present invention relates to a kind of realizing route automatic Memory and reproduction independently goes on patrol method,Described balance car is with controller and mileage measurement device,Described method includes: after controller initializes,Select patrol pattern,If path memory pattern,Then balance car travels from the off,Mileage measurement device carries out data sampling to the mileage of revolver and right wheel respectively,Controller generates paths record data according to mileage sampled data,And write external memory storage,Terminate until travelling,If reproduction path pattern,Then controller is from external memory storage read path record data,Balance car is made to travel by path,Compared with prior art,The data when present invention has given up the interlude data of linear motion or circular motion and suspended,The problem overcoming the huge data volume that routing information local repeatability causes greatly,Only record valid data,Give up redundant path information,Easy to operate,Good stability,Real-time is high.

Description

The two-wheeled balance car of a kind of realizing route automatic Memory and reproduction independently goes on patrol method
Technical field
The present invention relates to a kind of balance car path memory and replay method, especially relate to a kind of realizing route automatic Memory And the two-wheeled balance car reappeared independently goes on patrol method.
Background technology
In recent years, two-wheeled balance car because of its motion flexibly, Based Intelligent Control, simple to operate, save the spy such as the energy, environmental protection Point is applied more and more extensive in the modern means of communication, as daily walking-replacing tool, the inspection of police's public security, advertisement a surname Pass, assist shooting etc..But, in addition to its manned function, two-wheeled balance car is as a member in family of robot, automatic at it Patrol robot can be substituted in many instances after carrying some sensor on the basis of the basic functions such as walking, attitude regulation Complete a lot of task, as power station patrol and examine, community security, daily patrol, environmental monitoring, military surveillance etc..
For possessing the balance car of autonomous patrol function, one of them critical function is the road traveled across by balance car Footpath information preserves, and so has only to control balance car under different application scene and goes on patrol once, and balance car can afterwards According to this path of data reproduction of memory in this traveling process, independently complete patrol.For carrying the two-wheeled balance of speedometer For car, it is by letters such as presetting time period (such as every 10ms) the record mileage of left and right wheels, speed during memory routing information Breath, when go on patrol path distance longer time or need storage number of passes more when, data volume is huge, can occupy substantial amounts of Storage area, and actually balance car a lot of data of record during advancing are all redundant datas, for reproduction path also Nonessential, it is therefore necessary to provide path memory and the replay method of a kind of two-wheeled balance car, the method can save balance in a large number The data volume of storage during car memory path.
Summary of the invention
Defect that the purpose of the present invention is contemplated to overcome above-mentioned prior art to exist and provide a kind of memory data output little, Realizing route automatic Memory and the two-wheeled balance car of reproduction that reliability is high independently go on patrol method.
The purpose of the present invention can be achieved through the following technical solutions:
The two-wheeled balance car of a kind of realizing route automatic Memory and reproduction independently goes on patrol method, and described balance car is with control Device processed and mileage measurement device, described method includes:
After controller initializes, selecting patrol pattern, if path memory pattern, then balance car travels from the off, Mileage measurement device carries out data sampling to the mileage of revolver and right wheel respectively, and controller generates path according to mileage sampled data Record data, and write external memory storage, terminate until travelling, if reproduction path pattern, then controller is from external memory storage Read path record data, make balance car travel by path.
Paths record data include the many groups of calculating data that order preserves, and often group calculates data by a left side for certain sampling instant Wheel mileage SLiWith right wheel mileage SRiBeing calculated, often group calculating data include: the revolver mileage difference △ S of this sampling instantLi, left Wheel speed VLiWith left and right wheels speed difference △ VLRi, wherein, i represents the sequence number of this sampling instant, revolver mileage difference △ SLi=SLi— SLi-1, SLiFor the revolver mileage of this sampling instant, SLi-1Revolver for the upper one group calculating data place sampling instant being saved Mileage, revolver speed VLi=(SLi-SLi-1)/T, T are the sampling interval, left and right wheels speed difference Δ VLRi=VLi-VRi=(SLi- SLi-1)/T-(SRi-SRi-1)/T, VRiFor right wheel speed, its Computing Principle and revolver speed VLiIdentical.
In path memory pattern, controller calculate in real time often group calculate data, and judge this group calculate data be saved or Being rejected, wherein, the calculating data of beginning or end are saved, and the judgment rule that non-beginning or end calculates data is: Calculate data sampling instants to this group, if the motion of balance car is straight line from the upper one group sampling instant calculating data place Motion (including linear uniform motion and non-linear uniform motion) or circular motion (include that uniform circular motion and curvature are constant Non-uniform circular motion) or suspend traveling, then give up this group and calculate data, otherwise preserve this group and calculate data.
In described path memory pattern, controller calculates often group in real time and calculates data, and judges that this group calculates data quilt Preserving or be rejected, wherein, the calculating data of starting point are saved, and the calculating data judge process of non-starting point is included following step Rapid:
S11, calculates left and right wheels speed difference changing value △ △ VLRi, △ △ VLRi=△ VLRi—△VLRi-1If, △ △ VLRi= 0, then enter step S12, otherwise enter step S13;
S12, it is judged that this group calculates data whether respective path terminal, the most then preserve this group and calculate data, otherwise give up This group calculates data;
S13, it is judged thatWhether set up, if being false, then preserve this group and calculate data, and will store temporarily V in unitL、△VLRValue is updated to the V of current timeLi、ΔVLRiIf,Set up, then return step S12, its In, VL、△VLRIt is respectively the revolver speed in upper one group of calculating data being saved and left and right wheels speed difference, is stored in and deposits temporarily In storage unit, it is judged that during, as △ VLRiWhen=0, agreementAs △ VLRWhen=0, agreement
In reproduction path pattern, controller reads from external memory storage and calculates data, and according to calculating data and balance car Actual revolver velocity amplitude is balanced the right wheel velocity amplitude that car is actual, and two groups calculate between data, the left and right wheel speed of balance car Degree difference keeps constant, until reappearing next group to calculate data.
In path memory pattern, paths record data are written into the process of external memory storage and include: controller in order will Each group calculating data are saved in preset to be write in buffer area, and the data writing buffer area transmit the serial ports to controller, by string In mouth write external memory storage file.
In path memory pattern, writing buffer area and arrange multiple, paths record data write buffer area in a looping fashion, tool Body comprises the following steps:
S21, the calculating data in paths record data are saved in first in order and write buffer area, when first is write caching When district writes full, data are transmitted to serial ports, and fall clearly first data writing in buffer area;
S22, follow-up each group calculates data and continues the write next one in order and write in buffer area, write buffer area write full after, will Data transmit to serial ports, and remove the data in this buffer area, if this writes buffer area is that last writes buffer area, then return Returning step S21, otherwise return step S22, to the last one group of calculating data is written into.
In reproduction path pattern, controller is by the calculating data in serial ports reading external memory in order, and presses suitable Sequence stores to reading in buffer area, and meanwhile, balance car carries out reproduction path according to the calculating data read in buffer area, completes to go on patrol Journey.
In reproduction path pattern, reading buffer area and arrange multiple, quantity is with to write buffer area identical, and paths record data are with circulation Mode writes reading buffer area, specifically includes following steps:
S31, controller is set up with external memory storage and is connected, selects the respective file in external memory storage;
S32, controller reads the part in respective file in order by serial ports and calculates data, and data volume is according to single reading The size of buffer area determines, and packing stores to first reading buffer area, and balance car is according to the calculating read in buffer area simultaneously Data carry out reproduction path, and current cache district writes after full and corresponding reproduction path completes, and removes this buffer area data;
S33, follow-up each group of calculating data continue packing in order and write in next one reading buffer area, and this reading buffer area is write full And after the reproduction path of correspondence completes, remove the data in this reading buffer area, if this reading buffer area is last reads buffer area, Then returning step S32, otherwise return step S33, to the last one group of calculating data is reproduced.
Compared with prior art, the invention have the advantages that
(1) in path memory pattern, by left and right wheels mileage is carried out data sampling, can produce and can reappear by realizing route Paths record data, be stored in external memory storage, in reproduction path pattern, by the data in reading external memory, Balance car can be instructed to travel by path, and the recordable mass data of outside storage, reliability is high, and recordable a plurality of standard routes is believed Breath, the path selecting corresponding data file can realize according to selecting from outside stores during reproduction path is gone on patrol automatically.
(2) paths record data include the many groups of calculating data that order preserves, and often group calculates data by certain sampling instant Revolver mileage SLiWith right wheel mileage SRiIt is calculated, revolver speed poor including revolver mileage and left and right wheels speed difference, passes through These three data, can uniquely obtain the kinestate of current balance car and two groups calculate between data, balance car is passed by Journey, during reproduction path, amount of calculation is little, is conducive to improving the fluency of patrol process.
(3) in path memory pattern, in time calculating the sampling instant at data place to this group calculating data sampling for upper one group Between quarter, if the motion of balance car for linear motion or circular motion or suspends traveling, then give up this group and calculate data, otherwise protect Deposit this group and calculate data, data when i.e. having given up the interlude data of linear motion or circular motion and suspended, overcome The problem of the huge data volume that routing information local repeatability causes greatly, only records valid data, has given up redundant path information, Easy to operate, good stability, real-time is high.
(4) in reproduction path pattern, two groups calculate between data, only need left and right wheels speed difference and the revolver speed of balance car Ratio keep constant, until reappear next group calculate data, can make balance car according to standard routes walk, the speed to left and right wheels Degree is without definitely limiting.
(5) in patrol pattern, writing buffer area and arrange multiple, paths record data write in a looping fashion and write buffer area;Road In the reproduction mode of footpath, reading buffer area and arrange multiple, quantity is with to write buffer area identical, and paths record data write reading in a looping fashion Buffer area.Opening up of buffer area, is conducive to improving path memory and the fluency of reproduction path.
(6) hardware realizes simple, and only need to carry a speedometer respectively at revolver and right wheel can realize, low cost.
Accompanying drawing explanation
Fig. 1 is the FB(flow block) of the present embodiment method;
Fig. 2 be the present embodiment method under path memory pattern, for determining whether to give up the flow process of current time data Figure;
Fig. 3 is to be stored in data under the present embodiment method path memory pattern to preset the flow chart writing buffer area.
Detailed description of the invention
The present invention is described in detail with specific embodiment below in conjunction with the accompanying drawings.The present embodiment is with technical solution of the present invention Premised on implement, give detailed embodiment and concrete operating process, but protection scope of the present invention be not limited to Following embodiment.
Embodiment
The two-wheeled of the present embodiment balances autonomous cruiser control system kernel and uses the ARM chip of Cortex M3 kernel STM32, revolver and right wheel at balance car carry a speedometer, respectively revolver and the right side in record balance car traveling process respectively The mileage value of wheel.After balance car start, gather a left side respectively according to a sampling time interval T (such as T=10ms) determined Right wheel mileage value SLiAnd SRi, wherein, i represents ith sample time sequence number.
The present invention includes two parts, and first two-wheeled balances autonomous cruiser according to the form automatic Memory patrol set Path, and by routing information according to certain form and the method that is sequentially written in outside storage, it two is that two-wheeled balances car weight The method that the path that existing path, i.e. balance car store in storing according to outside carries out going on patrol.
The data record format of the sampling instant of needs record is:
Revolver mileage difference △ SLi: revolver velocity amplitude VLi: left and right wheels speed difference △ VLRi
Wherein, revolver mileage difference △ SLiRevolver speedometer by current revolver speedometer mileage value Yu a upper measuring point moment The difference of mileage value, the revolver velocity amplitude of current time is calculated by revolver mileage value and sampling time interval, i.e. VLi=(SLi- SLi-1)/T, the left and right wheels speed difference △ V of current timeiRefer to the difference of revolver velocity amplitude and right wheel velocity amplitude, i.e. Δ VLRi=VLi- VRi=(SLi-SLi-1)/T-(SRi-SRi-1)/T.Revolver mileage is poor, revolver velocity amplitude and left and right wheels speed difference are 64 integers Value, i.e. long types value.
Refering to shown in Fig. 1, balance autonomous cruiser automatic Memory path and the method for reproduction path for two-wheeled of the present invention FB(flow block).After two-wheeled balance car initializes, judge according to which kind of mode to go on patrol, such as mode according to the value of mode parameter mode =0, then open the patrol of path memory pattern, such as mode=1, then open the patrol of reproduction path pattern.
The patrol process of two-wheeled balance car under path memory pattern, it comprises the steps of
First, balance car starts patrol from starting point, and left and right wheels mileage initial value is respectively SL0And SR0, in revolver Path difference initial value is set to Δ SL0=0.After balance car starts to advance, gather a left side respectively according to a sampling time interval T determined Right wheel mileage value, it is assumed that acquisition time Serial No. i (i=1,2,3 ...), left and right wheels mileage value in traveling process It is designated as S respectivelyLiAnd SRi, can get revolver mileage difference △ S according to aforementioned calculation methodLi, revolver velocity amplitude VLiWith left and right wheels speed Difference △ VLRi
As balance car is linear motion (including linear uniform motion and non-linear uniform motion) within certain period or turns Curved motion (includes the non-at the uniform velocity turning motion that at the uniform velocity turning motion and turn curvature are definite value), turning motion i.e. circular motion, Then can only record the initial time of this period and the data value of finish time, the data of intermediate period all can be given up.This Outward, the data of the period temporarily stopped at certain point during patrol for balance car can also be given up.
The starting point moment in balance car patrol path and the data value in terminating point moment are always intended to record, and balance car arrives When reaching starting point, system provides a marking signal fstart, by this starting point time data of form record.When arriving terminating point, System provides a marking signal fend, by this terminating point time data of form record.Starting point and ending point under normal circumstances Data value △ SLi、VLiWith △ VLRiIt is zero.
Open up 2 data storage cells at internal memory, store V the most temporarilyL、△VLR, the initial value of these 2 data is initial The value in some moment, after the data judging in a certain moment is record, by VLWith △ VLRValue be updated to current time value, otherwise protect Hold constant.Judge, when whether certain moment point data records, first to keep in this moment point data VLi、△VLRi, in conjunction with temporary stored-value VL、△VLRJudge, if it is at the uniform velocity or during non-linear uniform motion that current time point goes up a record moment relatively, △ VLRi= 0, △ △ VLRi=| △ VLRi-△VLR|=0;If current time point relatively go up one record the moment be at the uniform velocity turning motion time, △ △VLRi=| △ VLRi-△VLR|=0;And for non-at the uniform velocity turning motion, current time point goes up the △ V in a record moment relativelyLR With △ △ VLRiAll it is not zero, now needs to combine turn curvature and judge, for the non-at the uniform velocity turning motion that curvature is definite value, The data value of intermediate period can also be given up.
If the radius of curvature in certain section of turning path is ρ, by curvature radius formula:
ρ = V w = ( V L + V R ) / 2 ( V L - V R ) / R
Wherein, V is balance car mass center line speed, and w is balance car centroid angle speed, VLFor balance car revolver linear velocity, VRFor Balance car right wheel linear velocity, Δ VLR=VL-VR, R is balance car revolver and right wheel two axles spacing.
If current time point goes up a record moment when being the constant non-at the uniform velocity turning motion of curvature relatively, ρi=ρ, it may be assumed that
ρ i = ( V L i + V R i ) / 2 ( V L i - V R i ) / R = ρ = ( V L + V R ) / 2 ( V L - V R ) / R
Obtain after abbreviationTherefore whether can send out according to the ratio of revolver speed with left and right wheels speed difference Changing judges that whether it is the constant non-at the uniform velocity turning motion of curvature.
If balance car temporarily stops at certain point during patrol, then the data of blocking period can also be given up, this Time △ VLRi=0, △ △ VLRi=0.
According to above-mentioned derivation, refering to shown in accompanying drawing 2, it is judged that the flow process whether current data is given up is as follows:
First determine whether whether balance car arrives starting point, if current time arrives starting point, then record the number in this moment According to value, and by the V in this momentL、△VLRValue is stored in internal memory temporary storage cell;If not starting point, then keep in this point VLi、△VLRiValue, and combine the V in temporary storage cellL、△VLRValue judges, as △ △ VLRi≠ 0 when being false, and then sentences Whether this point disconnected is the terminating point in balance car patrol path, if it is, the data value of current time is judged to record, if not It is terminating point, does not the most record current time data;As △ △ VLRi!During=0 establishment, then judgeWhether become Vertical, if be false, then the data value of current time is judged to record, and updates in temporary storage cell by current time value VL、△VLRValue;IfSet up, then turn to the node judging that whether this point is terminating point.It should be noted that JudgeDuring this condition, there is two specific cases which, one is as △ VLRi=0 and △ VLR≠ 0, corresponding flat Weighing apparatus car becomes the turning point of turning motion from linear motion;Another kind is △ VLRi≠ 0 and △ VLR=0, corresponding balance car is from turning Motion becomes the turning point of linear motion.The data in the two turning point moment all should be recorded, but nowThis calculating formula is nonsensical, therefore does an agreement at this: as △ VLRiWhen=0, agreement As △ VLRWhen=0, agreement
According to this judgment criterion, linear motion and turning motion only record the initial time of this section of motion and finish time Data value, the data value in other moment is required to record, and all data that need to record are recorded according to aforementioned record format, and Write the default of STM32 in order to write in buffer area.Preset and write buffer size and number by sampling time interval, storage data The parameters such as form, Serial Port Transmission speed, outside storage writing rate together decide on.Preset by 2 as a example by writing buffer area, refer to Shown in accompanying drawing 3, STM32 opens up two equal-sized presetting and writes caching differentiation A, B, buffer area mark letter is set during initialization Number flag=0, when needing to write data, first write buffer area A, when buffer area A writes full, flag signal is set to 1, will be slow The data depositing district A transmit to serial ports, concurrently disinfect the data in buffer area A, outside ARM is received data by serial ports and write In the SD card file in portion.And follow-up data will write buffer area B successively, in like manner, when buffer area B writes full, flag signal is put Being 0, transmit the data of buffer area B to serial ports, concurrently disinfect the data in buffer area B, ARM receives data by serial ports And continue to write in the SD card file of outside.In all data that need to record recurrent wrIting buffer area A, B in this way and It is saved in eventually in the file of outside SD.The capacity of outside SD card is by storing data form, the total distance in memory path, remembering path The parameters such as big quantity together decide on.
After balance car is reached home, terminate this patrol path memory, this continuous path is stored in SD card The named Road_N of data file, wherein N represent record the N article patrol path (N=1,2,3 ...), all paths literary composition Part is stored in external memory storage, completes path automatic Memory function.All patrol paths in external memory storage are the most available Use when two-wheeled balances autonomous cruiser at reproduction path.
The patrol process of two-wheeled balance car under reproduction path pattern, it comprises the steps of.
First, balance car selects certain paths Road_N in external memory storage, prepares to advance by the patrol of this paths.? Presetting multiple reading buffer areas in STM32, its number and size are with aforementioned to write buffer area identical.Still as a example by 2 reading buffer areas, in advance If reading buffer area be divided into buffer area C and buffer area D, its size is all identical with buffer area A size.
ARM inversely reads divided data in the middle part of file Road_N by storage order, and data volume is by buffer area C (or buffer area D) Size determine.Just the opposite with the data storage procedure during path memory, first by data packing by serial ports send to STM32, and stored to reading in buffer area C, after storage, ARM continues inversely to read file Road_N by storage order In remaining data, data are sent to STM32 by serial ports, and are stored to reading in buffer area D, STM32 reads simultaneously Packet in buffer area C, and direction and the distance of balance car is controlled according to mileage way of contrast.When this section of reproduction path is complete After, remove the data in buffer area C, follow-up data is stored in buffer area C the most in this way, and STM32 reads caching simultaneously Packet in district D, and direction and the distance of balance car is controlled according to mileage way of contrast.Cycle alternation reads in this way Packet in buffer area C and buffer area D, and make balance car according to these data reproduction circulating paths.
When reading the data in buffer area, judge whether some period is linear motion or turns according to data characteristics Motion, STM32 controls balance car direction and distance according to mileage way of contrast.
Such as the △ V of previous measuring point in adjacent two measuring pointsLR=0, then the motion of this section is linear motion, and STM32 presses According to mileage way of contrast control balance car according to this segment data straight line moving, i.e. according to the revolver in rear measuring point record data Mileage difference △ SLiValue determines the distance of dolly straight line moving.
Such as the △ V of previous measuring point in adjacent two measuring pointsLR≠ 0, then the motion of this section is turning motion, and STM32 presses The concrete grammar controlling balance car traveling according to mileage way of contrast is as follows.
If in preassigned path (i.e. the path of certain automatic Memory), the radius of curvature of this section of turning motion is ρ, by song Rate radius formula:
ρ = V w = ( V L + V R ) / 2 ( V L - V R ) / R
Wherein, V is balance car mass center line speed, and w is balance car centroid angle speed, VLFor balance car revolver linear velocity, VRFor Balance car right wheel linear velocity, Δ VLR=VL-VR, R is balance car revolver and right wheel two axles spacing.
For ensureing that balance car is advanced according to standard routes in reproduction path, it is necessary to assure it is also with fixing curvature ρ at the uniform velocity Turn, if its curvature is ρ ', i.e. need to meet:
ρ '=ρ
That is:
( V L ′ + V R ′ ) / 2 ( V L ′ - V R ′ ) / R = ( V L + V R ) / 2 ( V L - V R ) / R
Wherein, VL' for revolver linear velocity during balance car reproduction path, VR' for right wheel linear velocity during balance car reproduction path, VL'=VR'+ΔVLR'。
Obtain after abbreviation:
V R ′ V L ′ = V R V L
Revolver velocity amplitude V according to previous measuring point recordLWith left and right wheels speed difference △ VLRRevolver speed V can be obtainedL With right wheel speed VR, when reproduction path, balance car revolver linear velocity V can be setL' value, then can be calculated balance according to above formula Car right wheel linear velocity VR'.Revolver mileage difference △ S in conjunction with latter data pointLValue, enters according to these three parameter controlled balance garage △SLBalance car can be completed in reproduction path, complete this section of turning motion according to standard routes.
When data all in file Road_N read in buffer area the most successively, balance car is also according to notes all in buffer area The data of record sequentially complete traveling, after i.e. balance car is reached home, complete the N article memory path in storing outside Reappear.

Claims (10)

1. the two-wheeled balance car of realizing route automatic Memory and reproduction independently goes on patrol a method, and described balance car is with control Device and mileage measurement device, it is characterised in that described method includes:
After controller initializes, selecting patrol pattern, if path memory pattern, then balance car travels from the off, mileage Metering device carries out data sampling to the mileage of revolver and right wheel respectively, and controller generates paths record according to mileage sampled data Data, and write external memory storage, terminate until travelling, if reproduction path pattern, then controller reads from external memory storage Paths record data, make balance car travel by path.
The two-wheeled balance car of a kind of realizing route automatic Memory the most according to claim 1 and reproduction independently goes on patrol method, It is characterized in that, paths record data include the many groups of calculating data that order preserves, and often group calculates data by certain sampling instant Revolver mileage SLiWith right wheel mileage SRiBeing calculated, often group calculating data include: revolver mileage difference △ of this sampling instant SLi, revolver speed VLiWith left and right wheels speed difference △ VLRi, wherein, i represents the sequence number of this sampling instant, revolver mileage difference △ SLi= SLi—SLi-1, SLiFor the revolver mileage of this sampling instant, SLi-1For the upper one group calculating data place sampling instant being saved Revolver mileage, revolver speed VLi=(SLi-SLi-1)/T, T are the sampling interval, left and right wheels speed difference Δ VLRi=VLi-VRi, VRiFor the right side Wheel speed, its Computing Principle and revolver speed VLiIdentical.
A kind of realizing route automatic Memory the most according to claim 1 and 2 and the two-wheeled balance car independently side of patrol of reproduction Method, it is characterised in that in path memory pattern, controller calculates often group in real time and calculates data, and judges that this group calculates data quilt Preserving or be rejected, wherein, the calculating data of beginning or end are saved, and non-beginning or end calculates the judgement rule of data It is then: calculate data sampling instants to this group from the upper one group sampling instant calculating data place, if the motion of balance car For linear motion circular motion or suspend travel, then give up this group calculate data, otherwise preserve this group calculating data.
The two-wheeled balance car of a kind of realizing route automatic Memory the most according to claim 2 and reproduction independently goes on patrol method, It is characterized in that, in path memory pattern, controller calculates often group in real time and calculates data, and judges that this group calculates data and is saved Or be rejected, wherein, the calculating data of starting point are saved, and comprise the following steps the calculating data judge process of non-starting point:
S11, calculates left and right wheels speed difference changing value △ △ VLRi, △ △ VLRi=△ VLRi—△VLRi-1If, △ △ VLRi=0, then Enter step S12, otherwise enter step S13;
S12, it is judged that this group calculates data whether respective path terminal, the most then preserve this group and calculate data, otherwise give up this group Calculate data;
S13, it is judged thatWhether set up, if being false, then preserve this group and calculate data, and by temporary storage cell In VL、△VLRValue is updated to the V of current timeLi、ΔVLRiIf,Set up, then return step S12, wherein, VL、△VLRIt is respectively the revolver speed in upper one group of calculating data being saved and left and right wheels speed difference, is stored in interim storage In unit, it is judged that during, as △ VLRiWhen=0, agreementAs △ VLRWhen=0, agreement
The two-wheeled balance car of a kind of realizing route automatic Memory the most according to claim 4 and reproduction independently goes on patrol method, It is characterized in that, in described reproduction path pattern, controller reads from external memory storage and calculates data, and according to calculating data The revolver velocity amplitude actual with balance car is balanced the right wheel velocity amplitude that car is actual, and two groups calculate between data, balance car Left and right wheels speed difference and the ratio of revolver speed keep constant, until reappearing next group to calculate data.
The two-wheeled balance car of a kind of realizing route automatic Memory the most according to claim 1 and reproduction independently goes on patrol method, It is characterized in that, in path memory pattern, paths record data are written into the process of external memory storage and include: controller is in order Being saved in preset by each group of calculating data writes in buffer area, and the data writing buffer area transmit the serial ports to controller, pass through In serial ports write external memory storage file.
The two-wheeled balance car of a kind of realizing route automatic Memory the most according to claim 6 and reproduction independently goes on patrol method, It is characterized in that, writing buffer area and arrange multiple, paths record data write buffer area in a looping fashion, specifically include following step Rapid:
S21, the calculating data in paths record data are saved in first in order and write buffer area, when first is write buffer area and write Data are transmitted to serial ports by Man Shi, and fall clearly first data writing in buffer area;
S22, follow-up each group calculates data and continues the write next one in order and write in buffer area, write buffer area write full after, by data Transmit to serial ports, and remove the data in this buffer area, if this writes buffer area is that last writes buffer area, then return step Rapid S21, otherwise returns step S22, and to the last one group of calculating data is written into.
The two-wheeled balance car of a kind of realizing route automatic Memory the most according to claim 7 and reproduction independently goes on patrol method, It is characterized in that, in reproduction path pattern, controller is by the calculating data in serial ports reading external memory in order, and presses Sequential storage is to reading in buffer area, and meanwhile, balance car carries out reproduction path according to the calculating data read in buffer area, completes patrol Process.
The two-wheeled balance car of a kind of realizing route automatic Memory the most according to claim 8 and reproduction independently goes on patrol method, It is characterized in that, in reproduction path pattern, read buffer area and arrange multiple, quantity with to write buffer area identical, paths record data with Buffer area is read in endless form write, specifically includes following steps:
S31, controller is set up with external memory storage and is connected, selects the respective file in external memory storage;
S32, controller reads the part in respective file in order by serial ports and calculates data, and packing stores to first reading In buffer area, balance car carries out reproduction path according to the calculating data read in buffer area simultaneously, and current cache district writes full and corresponding Reproduction path complete after, remove this buffer area data;
S33, follow-up each group of calculating data continue packing in order and write in next one reading buffer area, and this reading buffer area is write full and right After the reproduction path answered completes, remove the data in this reading buffer area, if this reading buffer area is last reads buffer area, then return Returning step S32, otherwise return step S33, to the last one group of calculating data is reproduced.
The two-wheeled balance car of a kind of realizing route automatic Memory the most according to claim 1 and reproduction independently goes on patrol method, It is characterized in that, described mileage measurement device includes the speedometer being separately positioned in revolver and right wheel.
CN201610635587.2A 2016-08-05 2016-08-05 A kind of realizing route automatic Memory and the two-wheeled balance car of reproduction independently go on patrol method Active CN106200642B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610635587.2A CN106200642B (en) 2016-08-05 2016-08-05 A kind of realizing route automatic Memory and the two-wheeled balance car of reproduction independently go on patrol method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610635587.2A CN106200642B (en) 2016-08-05 2016-08-05 A kind of realizing route automatic Memory and the two-wheeled balance car of reproduction independently go on patrol method

Publications (2)

Publication Number Publication Date
CN106200642A true CN106200642A (en) 2016-12-07
CN106200642B CN106200642B (en) 2018-12-11

Family

ID=57496989

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610635587.2A Active CN106200642B (en) 2016-08-05 2016-08-05 A kind of realizing route automatic Memory and the two-wheeled balance car of reproduction independently go on patrol method

Country Status (1)

Country Link
CN (1) CN106200642B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107346134A (en) * 2017-08-29 2017-11-14 北京矿冶研究总院 Unmanned control method and device for underground mining articulated vehicle
CN108551490A (en) * 2018-05-14 2018-09-18 西京学院 A kind of industry flow data coding/decoding system and method
CN110109454A (en) * 2019-04-18 2019-08-09 福建信息职业技术学院 A kind of intelligent carriage motion profile clone method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101862245A (en) * 2010-05-28 2010-10-20 上海市古美高级中学 Hospital service robot
CN102096413A (en) * 2010-12-23 2011-06-15 中国民航大学 Security patrol robot system and control method thereof
CN103196444A (en) * 2013-03-05 2013-07-10 好孩子儿童用品有限公司 Path generation method of intelligent electric children chair, and intelligent electric children chair
US20130197718A1 (en) * 2012-01-30 2013-08-01 Electronics And Telecommunications Research Institute Apparatus and method for unmanned surveillance, and robot control device for unmanned surveillance
CN103869820A (en) * 2014-03-18 2014-06-18 北京控制工程研究所 Ground navigation planning control method of rover
CN103900586A (en) * 2012-12-25 2014-07-02 上海博泰悦臻电子设备制造有限公司 Interest point planning method and apparatus
CN105094130A (en) * 2015-07-29 2015-11-25 广东省自动化研究所 AGV (Automatic Guided Vehicle) navigation method and device constructed by laser guidance map

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101862245A (en) * 2010-05-28 2010-10-20 上海市古美高级中学 Hospital service robot
CN102096413A (en) * 2010-12-23 2011-06-15 中国民航大学 Security patrol robot system and control method thereof
US20130197718A1 (en) * 2012-01-30 2013-08-01 Electronics And Telecommunications Research Institute Apparatus and method for unmanned surveillance, and robot control device for unmanned surveillance
CN103900586A (en) * 2012-12-25 2014-07-02 上海博泰悦臻电子设备制造有限公司 Interest point planning method and apparatus
CN103196444A (en) * 2013-03-05 2013-07-10 好孩子儿童用品有限公司 Path generation method of intelligent electric children chair, and intelligent electric children chair
CN103869820A (en) * 2014-03-18 2014-06-18 北京控制工程研究所 Ground navigation planning control method of rover
CN105094130A (en) * 2015-07-29 2015-11-25 广东省自动化研究所 AGV (Automatic Guided Vehicle) navigation method and device constructed by laser guidance map

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107346134A (en) * 2017-08-29 2017-11-14 北京矿冶研究总院 Unmanned control method and device for underground mining articulated vehicle
CN108551490A (en) * 2018-05-14 2018-09-18 西京学院 A kind of industry flow data coding/decoding system and method
CN108551490B (en) * 2018-05-14 2021-06-18 西京学院 Industrial stream data coding and decoding system and method
CN110109454A (en) * 2019-04-18 2019-08-09 福建信息职业技术学院 A kind of intelligent carriage motion profile clone method

Also Published As

Publication number Publication date
CN106200642B (en) 2018-12-11

Similar Documents

Publication Publication Date Title
CN101275836B (en) Traffic information system
CN106200642A (en) The two-wheeled balance car of a kind of realizing route automatic Memory and reproduction independently goes on patrol method
CN102568240A (en) Traffic Information System, Traffic Information Acquisition Device And Traffic Information Supply Device
CN107664993A (en) A kind of paths planning method
CN104851300A (en) Road condition pre-identifying system based on Internet of Things and suitable for vehicle suspension control
CN109649490A (en) Automatic calibration method, system and the vehicle of vehicle steering wheel zero bias
CN102792350A (en) Wrong-way driving detection device for vehicle
CN107813830A (en) A kind of method and device for aiding in vehicle drive
CN108172005A (en) Road vehicle speed-limiting control method, system, storage medium and computer equipment
CN105526937B (en) A kind of CAN bus based aided positioning system and method
CN106023629A (en) Path recommendation method and path recommendation device
CN111328412A (en) Adaptive traffic control based on vehicle trajectory data
CN101981604A (en) Signalized intersection information acquiring device, signalized intersection information acquiring method, and signalized intersection information acquiring program
CN102101487B (en) Method and system for acquiring tracking status of train
CN102298839A (en) Method and device for computing OD travel time
Gresenz et al. An off-road terrain dataset including images labeled with measures of terrain roughness
CN102679997B (en) Guider
CN100472579C (en) Traffic information calculation device, traffic information calculation method, traffic information display method, and traffic information display device
CN103209206A (en) Multi-terminal vehicle driving recording system based on mobile phone intelligent system
CN109470257A (en) A kind of lost personnel's guidance method based on block chain technology
CN108447261A (en) Based on multimode vehicle queue length computational methods and device
CN201796499U (en) Fuzzy controller for traffic system
CN107015565A (en) A kind of AGV magnetic Combinated navigation method
JPH0544603B2 (en)
CN107036619A (en) High accuracy geography signal reconstruct method, device, Vehicle Decision Method system and server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant