ZHANG Guo-wei()(),LU Qiu-hong()
1 School of Electric Power & Automation,Shanghai University of Electric Power,Shanghai 200090,China
2 School of Information Science and Technology,Donghua University,Shanghai 201620,China
3 School of Mechanical Engineering ,Shanghai Dianji University,Shanghai 200240,China
Behaviour control on laser cruise of autonomous mobile robot is a hot research recently.For an autonomous mobile robot,cruise algorithms are very important because mobile robot usually moves in a complex nonstructural environment.The key technique of robot cruise is avoiding obstacles[1- 5].Several types of sensors can be used to help the robot avoid obstacles,such as position sensitive detector (PSD),sonar,laser,and camera.Being a 2D sensor,a laser can get the distance between other objects and the robot during a wide angle range,so it has advantages comparing with PSD or sonar[6-11].Moreover,mapping the environment by the data of laser is very useful for an intelligent robot moving autonomously and safely in a complex environment.
Behaviour control method is used widely in robotics.Arkin presented “motor-mode” structure,in which behaviours mapped the sensor data vector to motor value vector,and combine linearly to output[7,12].Maesetal.created behaviour switching parallel architecture by behaviour net,in which the robot chose behaviour independently by comparing and updating stimulating levels of all behaviours[11].Brooks subsumption architecture is another behaviour switching example[1,8].It uses suppressive mechanism to make higher priority behaviours shield lower priority behaviours for a while.Through driving the executor by arbitration system,the subsumption architecture makes the robot automatically avoid obstacles,navigate and accomplish tasks in a dynamic and complex nonstructural environment.
A wide-range laser is fixed on the robot in this research,and makes it move autonomously.The basic algorithm with S-type arbiter and an improved algorithm with I-type arbiter are compared in this paper.In addition,in mapping obstacles,through adjusting the spread angle according to different distances to obstacles in scaled vector field histogram (SVFH) algorithm,the robot can turn more sharply in near obstacles than in far obstacles,which makes the robot move more safely and smoothly in a cluttered room.
There are different existing robotics control architectures from the decomposition of robot control software.They are layered architecture,subsumption architecture,and hybrid architecture according to their appearance time sequence.Layered architecture parts the system to layers and modules by time sequence and functions,i.e.,it is a planning-based system.Subsumption architecture is a system based on behaviour adopting “sense-action” mode.Hybrid architecture is a system integrating plan and behaviour,and it has both advantages while avoiding their disadvantages.
Compared with the traditional control technique based on layered architecture,i.e.,in a “sensor,modeling,planning,action” mode,the behaviour-based control imitates the “stimulation→reflection” principle of organisms and describes robot behaviours in accordance with their characteristics,and expresses them as a series of basic behaviours,where all behaviours are parallel.As shown in Fig.1,the control architecture includes some behaviour modules,a control module “n” and an executor module “r”.All behaviour modules send commands to the control module at the same time but the controller provides one and only output to the executor.The controller’s output is always determined by single behaviour module.However,in any certain time,the output of controller can be subject to a certain behaviour.The more understand each module’s behaviour,the more easily design the controller,so it can make the robot sometimes avoid obstacles and sometimes trace.After testing each module,the robot will complete its task well.
Fig.1 Behaviour control block diagram of laser-based cruise
An important advantage of behaviour-based parallel control is its bionics character.Complicated organism,such as human eye,is benefited from real large-scale parallel.The goal of behaviour-based control is to understand this general strategy of biology,and use it in robotics.The disadvantage of parallel control is that it maybe very difficult to validate the robot character indexes.Because this type of control system usually includes real parallel and multi-process implement,a lot of tests are done according to experience.
According to practical experience in years,subsumption architecture and behaviour-based control method are used to analyse mobile robots system.Through a laser ranger the robot can get information from the environment and know what is an obstacle or what is a passable way,then avoid obstacles and get its way to the goal.The behaviour control algorithm based on subsumption architecture is discussed in detail in the following.
Using a laser ranger,the robot can get the distance between other objects and itself.Different from sonar or PSD sensor,the laser sensor gets 2D data.According to these data,robot can know the position and orientation of obstacles,and it can adopt different avoidance strategies.Figure 2 is the behaviour control diagram of laser-based cruise.In the diagram,every block is defined as a special software module with corresponding behaviour.Lasermodule’s function is collecting distance information continuously.It corresponds to behaviourLaser.Avoidmodule’s function is to judge obstacle based on laser data and send command to the actuator.It corresponds to behaviourAvoid.Actuatormodule’s function is driving motors by appropriate signals S.Cruisemodule’ function sends forward command to theActuator,in accordance with behaviourCruise.
Fig.2 Behaviour control diagram of laser-based
In the preceding algorithm,S-type arbiter is used in the behaviour response judgment.S is a suppressor,which can make the signal from higher priority behaviour overwrite the signal from lower priority behaviour.This control mode has to judge all behaviours every time,and if there is a time slice switching to actuator process before the arbiter process finishes,it may produce a mistake command output.Besides S-type arbiters in behaviour-based control system,there is another one called I-type.I is an inhibitor,which can make the lower
priority no sending commands.If we use I-type arbiter,judge from the highest priority behaviour,and when it has a command,the lower priority behaviour will be ignored,we can not only save some judging time but also avoid some mistakes.
AddingLifebehaviour in the behaviour control diagram in Fig.2,and using I-type arbiter,a new diagram can be got which is shown in Fig.3.TheSensormodule’s function is to get current,voltage,temperature,and other information.If a parameter goes beyond its setting scope,which may injure the robot itself,theSensormodule sends an alarm toLifemodule,which is corresponding to behaviourLife.Other four modules are the same as those in Fig.2.
Fig.3 New behaviour control digram of laser-based cruise
Figure 4 is partial flowchart of the algorithm discussed above,wherein (a) showsLaser_processand (b) showsAvoid_process.Laser_processdescribes behaviour of laser sensing.After this process starting,the laser sensor reads and stores distance data of the obstacles in its measurable range.Then divide the data to three regions according to orientation,0-80° left,80-160° front,160-240° right.The obstacle flag of a direction is set in “true” if there is any obstacle nearer than the safe distance in a region.The obstacle flags are taken account inAvoid_process,if the obstacle locates in left-side,the robot turns to right-side; if the obstacle locates in right-side,the robot turns to left-side; if the obstacle locates in front,the robot moves backward and then turns to right.
The program is written in Visual C++ to test the algorithm.There are four processes in main program,and they are corresponding to the four behaviours above,they areMotionDriver_process,Cruise_process,Laser_process,andArbiter_process.All processes should run almost at the same time when the program starts.
(a) Laser_process (b) Avoid_process
TheArbiter_processis: ifLifebehaviour has command output,theActuatorresponds it; ifLifebehaviour has no output,seeAvoidbehaviour; ifAvoidbehaviour has output,theActuatorresponds it; only when bothLifebehaviour andAvoidbehaviour have no output,theActuatorrespondsCruisebehaviour.
The written program has two more processes asLife_processandLifeSensor_process.Moreover,for using I-type arbiters,the judgment processes in the program is simpler and faster.
A laser ranger is fixed on the mobile robot as in Fig.5.A laser sensor has three important parameters: measurable range is defined how far the sensor can see; scan angle is the scope in rotation orientation; resolution determines the precision of distance.For the robot,which usually moves indoors,we choose a smart wide-range laser,whose range is 4 m,scan angle is 240°,and resolution is 1 mm.
The robot also has a camera which can help it see the world.At first,the robot is told where to go through picking a goal in the image.Then the robot moved and measured distances of objects around itself at the same time.According to the algorithms above,the robot can avoid obstacles when it moves.The experiment proves that an I-type arbiter in theLaser_processgets better effect than an S-type one.
Moreover,since the laser needs some time from starting to getting data,the robot cannot run too fast or else it will be too late to response to obstacles.On the other hand if the avoidance distance is long,the robot will turn early before obstacles and it will be easier to turn round and round but cannot go through a small space among obstacles.After lots of experiments,a suitable avoidance distance is selected as 40 cm and the robot speed as 0.2 m/s.In the case,the robot moved slowly but safely in a cluttered room,and it can run through a narrow path.
Fig.5 The robot fixed a laser ranger
By dividing the laser data into three areas as front,right side,and left side,the robot can simply avoid obstacles by a turn of angle.As further research,more works are done in making the robot choose a suitable direction nearest to its target rather than cruise randomly.
First,the control program gathered the laser data per 0.36 degrees for every 100 ms,and then a map formed just as shown in Fig.6.If there is an obstacle,there will be a block area in the laser map.For example,in Fig.6,the robot moving in a room and two poles are before it,and the laser data graph shows the two poles.The robot should choose the heading without any block in its avoidance distance according to the laser map.
To know which heading is passable,a vector field histogram (VFH) developed in Ref.[6] can be used.The VFH method uses an intermediate data structure,called the polar histogramH.His an array of angular sectors.To account for the robot’s changing position and new sensor readings,the polar histogram is completely rebuilt once during each sampling interval.
Fig.6 An example of laser data map
In the standard VFH technique,an occupancy grid is created,and a polar histogram of the obstacle locations is created,relative to the robot’s current location.The contents of each active cell in the histogram grid are now treated as an obstacle vector,and the direction of which is determined by the directionβfrom the cell to the vehicle center point (VCP).
(1)
and the magnitude is given by
(2)
The meanings of the symbols in Eqs.(1) and (2) are listed in Table 1.
Table 1 The meanings of the symbols in Eq.(2)
Polar histogramHhas an arbitrary angular resolutionαsuch thatn=360/αis an integer (e.g.,α=5° andn=72).
k=int(βi,j/α).
(3)
For each sectork,the polar obstacle densityhkis calculated by
(4)
Eachactivecellis related to a certain sector by Eqs.(1) and (3).
Figure 7 shows how the individual occupancy cells are mapped to a corresponding wedge or “sector” of space in the polar histogram.Each sector corresponds to a histogram bin,and the value for each bin is equal to the sum of all the occupancy grid cell values within the sector.Figure 8(a) shows the polar histogram (H) bin values mapped against their bearings relative to the robot’s heading.Figure 8(b) shows the same histogram bins mapped to the physical space around the robot.In this figure,the black squares correspond to the occupancy grid cells,with the larger squares corresponding to the cells with higher occupancy values.
Fig.7 Mapping obstacles onto the polar histogram
A bin value threshold,indicated by the black line in Fig.8(a) and the black circle in Fig.8(b),is used to determine whether the bearing corresponding to a specific bin is open or blocked.If the bin value is under this threshold,the corresponding direction is considered clear.If the bin value meets or exceeds this threshold,the corresponding direction is considered blocked.
(a) Polar histogram bin values
(b) Polar histogram mapped to physical space
Since the robot is not a point object,an obstacle that may be easily avoided at long range may require more drastic avoidance maneuvers at short range.An extension VFH technique called SVFH was used in our algorithm.It is similar to VFH,except that the occupancy values are spread across neighboring bins,and this is reflected in the bin values of SVFH.
The extent of the spread is given by:
θ=k/r,
(5)
where,kis the spread factor,ris the range reading,andθis the spread angle.For example: ifk=0.4 andr=1 m,the spread angle is 0.4 rad (23°).So a range reading at 1 m for a bearing of 45° will increment the bins from 22°(45-23=22) to 68°(45+23=68).For a range reading of 0.5 m,the spread angle would be 0.8 rad (46°),so a range reading at 0.5 m will increment the bins from -1°(45-46 = -1) to 91°(45+46=91).In this way,SVFH causes the robot to turn more sharply to avoid nearby obstacles than to avoid more distant obstacles.
Once it determines which way is open and which is blocked,the robot then picks the heading closest to its desired heading toward its target and moves in that direction.In our work,the map included 24 sectors,so there were 24 corresponding directions which should be judged.In almost indoors environment,the robot was able to choose passable directions and avoid obstacles.
The following pictures in Fig.9 are examples of laser mapping when the robot is in different scenes,where the bold vectors represent distances got from laser and the thin vectors mean ways the robot can pass.Figure 9(a) shows the robot moving in a hallway.SVFH has determined that the robot may move in two general directions (forwards or backwards along the hall),and that,since the hallway is wide,some deviation from these headings is allowed.This enables the robot to follow the hallway while steering around obstacles in its path.Figure 9(b) shows the robot is next to a open door.The robot is still free to move forwards or backwards down the hall,but in addition,it is also free to navigate through the open doorway.Since the doorway is just slightly wider than the robot,the robot must maintain a fairly precise heading to navigate the doorway,and this heading is indicated by the single thin vector pointing to the right.Figure 9(c) shows the robot is in a open area.In this open space,there are few obstacles close to the robot,and as a result,the robot is free to move in all directions except those that would bring it too close to those obstacles.
(a) The robot in a hallway
(b) The robot next to a open door
(c) The robot in a open area
In our work,a laser ranger is fixed on our mobile robot to do obstacles avoidance.Behaviour algorithms are used in programming.Using an I-type arbiter in theLaser_processgets better effect than using an S-type one.By simply dividing the laser data into three areas,the robot can fast avoid obstacles and cruise safely in cluttered rooms.The extension technique of VFH is used in mapping of obstacles.By gathering the laser data,real-time maps are created to a polar histogram.By adjusting the spread angle in different distances to obstacles,the robot turns more sharply near obstacles than far obstacles,which makes the robot move more safely and smoothly.Combining with camera,the robot is able to get its target in a cluttered room.
[1] Brooks R A.A Robust Layered Control System for a Mobile Robot [J].IEEEJournalofRoboticsandAutomation,1986,2(1): 14-23.
[2] Yu S,Zhao Y Z.Study on Rotational Stabilization in a Laser Tracking System [J].JournalofShanghaiJiaotongUniversity:Science,2009,14(3): 316-320.
[3] Murphy R R.Introduction to AI Robotics [M].Cambridge: MIT Press,2000: 102-200.
[4] Xue Z H,Sun Z Q.A Laser Tracking 3D Coordinates Vision Measuring System [C].Proceedings of the Ninth International
Conference on Machine Learning and Cybernetics,Qingdao,China,2010: 2105-2108.
[5] Newman P M,Leonard J J,Tardos J D,etal.Explore and Return: Experimental Validation of Real Time Concurrent Mapping and Localization [C].Proceedings of the 2002 IEEE International Conference on Robotics and Automation,Washington DC,2002: 1802-1809.
[6] Bai Y,Wang D L.Dynamic Modelling of the Laser Tracking Gimbal Used in a Laser Tracking System [J].InternationalJournalofModelling,IdentificationandControl,2011,12(1/2): 149-159.
[7] Luo Z,Liu H Y,Wang F.Error Analysis of Robot Detecting System with Laser Sensors in Unknown Environment [J].InternationalJournalofModelling,IdentificationandControl,2011,12(1/2): 160-165.
[8] Joseph L.Robot Programming-A Practical Guide to Behavior-Based Robotics [M].USA: McGraw-Hill Companies,Inc.2004: 256-278.
[9] Park S.Autonomous Mobile Robot Navigation Using Passive RFID in Indoor Environment [J].IEEETransactionsonIndustrialElectronics,2009,56(7): 2366-2373.
[10] Matthies L,Xiong Y,Hogg R,etal.A Portable Autonomous Urban Reconnaissance Robot [J].RoboticsandAutonomousSystems,2002,40(2): 163-172.
[11] Maes P,Brooks R A.Learning to Coordinate Behaviors [C].Proceedings AAAI-90,Boston,1990: 796- 802.
[12] Arkin R C.Motor Schema Based Navigation for a Mobile Robot: an Approach to Programming by Behavior [C].Proceedings of the 1987 IEEE Conference on Robotics and Automation,Raleigh,NC,1987: 264-271.
Journal of Donghua University(English Edition)2013年6期