Robotics StackExchange | Archived questions

How to find template on LaserScan?

Hello,

Does anyone knows the way how to find specific patter on LaserScan msg. Maybe there are already existed pkgs in the ROS for that?

For example, I want to find my custom dock station patter.

Thank you in advance.

Asked by Yehor on 2020-08-12 02:25:02 UTC

Comments

If you want object detection with point clouds maybe you should look into PCL (Point cloud library)...I found this package target_obejct_detector but I'm not sure if that's what you want..

Asked by rfn123 on 2020-08-12 04:07:56 UTC

@rfn123 No, I want to find dock station on Lidar LaserScan

Asked by Yehor on 2020-08-12 04:17:15 UTC

can you be more specific? Like do you have a 3D or 2D laser scanner?

Asked by rfn123 on 2020-08-12 04:27:22 UTC

@rfn123 2d laser scan which includes ranges and intensities

Asked by Yehor on 2020-08-12 04:41:34 UTC

From #q337861 it seems that you have a ydlidar X4, do you still have this one ? Because I don't think it supports intensites, if you have intensity values in ROS it should be fixed or 0 if the beam hasn't been received.

Asked by Delb on 2020-08-12 07:39:57 UTC

@Delb I have changed the lidar. Now I am using lidar from xiaomi vacuum cleaner. And it returns me intensities.

Asked by Yehor on 2020-08-12 07:42:45 UTC

I would recommend you to put the lidar in front of the docking station and check the intensities returned (since you can approximatively know at which angles the docking station is) and then look for a pattern. If you can find one easily then you probably won't even need a complex algorithm to find it in your application.

Asked by Delb on 2020-08-12 07:55:22 UTC

@Delb, Yes, currently I am trying to do exactly what you suggested. However, I asked because maybe there are some more robust algorithms.

Asked by Yehor on 2020-08-12 09:00:57 UTC

Answers

You should check this paper presenting the Adaptative Ray Clustering (ARC) algorithm. It believe it could be adpated to work with the intensenties too.

Basically it parses all the distances returned by the lidar, for each beam you check the difference of its distance with the dstance of the next beam. If this difference is under a threshold (that you define) then you put the two beams in the same cluster, if not then you create another cluster. Doing that you can create multiples cluster and use those clusters for lines/corners extraction.

Since you have a custom docking station you should know how many clusters you should have and their length so you could apply the same algorithm using the intensities if the variation of the intenisty is big enough to detect the pattern.

Asked by Delb on 2020-08-12 09:31:37 UTC

Comments