# Usage of Falkolib(OpenSLAM) for 2D lidar landmark extraction

I am using Falkolib for landmark extraction in a 2D environment. Currently I am using the testKeypointOC executable from the bin directory.

I have changed the testKeypointOC.cpp file and the testData.cpp file slightly to accommodate my own laser readings. I am using a simulation in Gazebo to get the laser readings from a Kinect mounted on a pioneer.

In the testData.cpp I am adding my laser readings into the testRangesOrtho1 list. I have 640 readings from the Kinect and hence I am changing the num of beams parameter to 640 in the testKeypointOC.cpp.

I'm also changing the field of view to 0.977384 (it translates to 56 degrees which is the FOV for the Kinect laser) in the same file and also the min angle to -0.513199985027 (I got this value from the rostopic echo).

After all this, I am still getting the number of keypoints as 0 and hence no landmarks detected. Has anyone used the Falkolib in their project by modifying these values?

After considerable I was able to figure out how to use the Falkolib library. So, after you download the source code from github, you will have a folder called test. In that folder, there will be sample code for using the various detectors.

In my case I experimented with the Falko detector and the OC detector. However I found some issues with the OC detector in my case.

I assumed it to be used in environments where there are walls running parallel(on both sides) to the path of the robot. I assumed this because I understood that this is the use case of the OC detector from the documentation. But it appears that I was wrong and it cannot be used for that purpose.

I tried using the OC in that scenario in simulation and it started to detect landmarks in places where there was no landmark (mostly towards the front and the front was mostly clear). Hence then I experimented with the Falko detector and it worked perfectly.

I imagined the parallel walls scenario to be unique because the walls were always running parallel to the path of the robot and hence I thought that in this case it would be difficult to extract landmarks as it was a very monotonous environment and hence the algorithm would have a work extra hard and find landmarks only on the sides even though the sides would be really similar in most cases(office doors and labs were to the sides and as you know the office doors would appear very similar at each point along the corridor). But again, Falko worked well here.

Now onto how to use Falko: I started off with the testKeypointFalko.cpp file in the test folder. In that file, a LaserScan object is created in the beginning of the main function and inside that object certain parameters are passed. The first parameter is the start angle of the LIDAR, second is the end angle, and the last is the number of beams that the LIDAR shoots.

In my case, I was using a Kinect Laser Scanner and hence I got the start and end angle details by doing a rostopic echo on the Kinect Scanner. And you can find the number of beams for your scanner in the manual. Change those 3 parameters according to the scanner you are using.

Then for the entering the range data, I used the testData.cpp file in which you can manually put in the LIDAR scan ranges in testRanges and testRanges2 array. The testRangesOrtho1 and 2 are if you are going to use the OC detector.

There are 2 arrays for the Falko detector i.e testRanges and testRanges2 because the Falko detector not only extracts the landmarks but also compares the the laser range readings (testRanges and testRanges2 in our case) to find out the similar landmarks.

Once you update the testData.cpp file you can make and run the Falko detector and the you will get the output on the terminal about the landmarks and also the similar landmarks in the 2 laser range readings. Also, in order to detect different types of landmarks, for example circular, you may play with the following variables in the testKeypointOC.cpp file :

• RangeRes
• RangeMax