Week 4 | |
On monday and tuesday I tried to guess some constants but that did not go too well. Then i decided to try some new approaches. I read a lot of papers online mostly about mobile robot navigation using a laser. One that cought my eye used a camera and a laser to locate the obstacles. In Integrating a Potential Field Based Pilot Into a Mutiangent Navigation Architecture for Autonomous Robots Manihanth Mohan describes a system which has one force vector per obstacle and divides the obstacles in two categories: linear and circular obstacles. The circular obstacles have a single potential function while the linear obstacles have a function which is constant for very small distances and for larger distances the magnitude of the vector degrees by 1/(distance^2). At the same time the magnitude of the goal vector is constant. Then Mohan suggests to build a corridoor between two obstacles that the robot has to to pass through by using the midpoint of the distance between the two obstacles. The coridoor is parallel to the normal of the distance vector at the midpoint and is of some fixed length that is based on the radius of the robot. If the robot is within that coridoor then he can proceed to move forwards parallel to the normal. However if it is outside of it a temporary goal vector will be assigned to the midpoint that will pull the robot towards it and will then resume to the original goal vector once inside the coridoor. I spent the last two days segmenting the laser data to detect the obstacles. I wasnt sure what would be a close enough distance for two points to count as one segment so i tried several values and concluded that 10cm is satisfactory since the radius of the robot is 30cm. I thought that far away obstacles should not influence the immediate move of the robot so a reasonable distance for an obstacle was 80 cm which i later changed to 1m to see how the behaviour will change. To find the midpoint I decided to pick a point (point A) on the right side of the robot ( the laser readings from -Pi/2 to 0 radians and to calculates its x coordinate in the robot frame of reference. Then I would search through the points in the 0 to Pi/2 range for a point (point B) with a close enough x coordinate to the first point. Afterwards find the distance between the two with the distance formula and the slope. From that information i can find the normal to the distance vector from point A to point B and construct a temporary goal vector if it is needed. However, i ran into some problems. It was hard to find correct points when the robot was facing the two obstacles from a very small angle. Also it was hard to know when the robot has two obstacles in front of it and when it doesnt. Consequently, often there were several points with the same x coordinate. There were to possible coordinates: the pair of points was to be either at the same distance from one of the absolute coordinate frame axes or at the same distance from the x-axis of the x-axis of the robot frame of reference. While the latter was not hard to find when the robot is facing parallel to the normal of the distance, it was difficult to pinpoint either of the two when the robot was at an angle to the normal. |