tysik / obstacle_detector

A ROS package for 2D obstacle detection based on laser range data.
541 stars 206 forks source link

Circles extraction #4

Open tqshao opened 6 years ago

tqshao commented 6 years ago

Hi, tysik! Thanks for providing this obstacle_detector package!

I am planning to incorporate this package into Autoware and having some problems to extract circles. In rviz, I can see that the segments have been extracted and displayed, however, some segments are not converted to circles even though the radius should be smaller than the threshold. What do you think could cause this issue?

tysik commented 6 years ago

Hey Man :)

Your welcome and good luck with your project! Hmm... I did not work on that project for quite a while so I do not remember but check the settings of obstacle_extractor and look for sth like "extract_from_visibles" and turn it on. It was supposed to discard conversion of segments that are overlapped by other segments but eventually it did not work that well... I hope it helps!

Kind regards, Mateusz

tysik commented 6 years ago

Hey Man :)

Your welcome and good luck with your project! Hmm... I did not work on that project for quite a while so I do not remember but check the settings of obstacle_extractor and look for sth like "extract_from_visibles" and turn it on. It was supposed to discard conversion of segments that are overlapped by other segments but eventually it did not work that well... I hope it helps!

Kind regards, Mateusz

2018-03-06 22:22 GMT+01:00 TQ notifications@github.com:

Hi, tysik! Thanks for providing this obstacle_detector package!

I am planning to incorporate this package into Autoware and having some problems to extract circles. In rviz, I can see that the segments have been extracted and displayed, however, some segments are not converted to circles even though the radius should be smaller than the threshold. What do you think could cause this issue?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tysik/obstacle_detector/issues/4, or mute the thread https://github.com/notifications/unsubscribe-auth/ABafEv9GvSXA4ipEcxsk5ojq3kLHPvQaks5tbv3egaJpZM4Sfczs .

tqshao commented 6 years ago

Thanks! I will try that!

xperroni commented 6 years ago

Stepped into this issue today. The problem is in lines 447-448 of obstacle_extractor.cpp, where circles are discarded if their centers don't fall within a range of coordinates described by parameters (min|max)_(x|y)_limit. However at this point the center is likely expressed in global coordinates (assuming transform_coordinates is set to true and frame_id to map or something equivalent), while the limits are given relative to the sensor's coordinate frame. The result is that any circle obstacle distant more than (min|max)_(x|y)_limit from the center of the frame_id coordinate frame will be discarded.

I would recommend removing the conditional altogether. Otherwise, this logic needs to be moved above line 409, so it's applied before circle center coordinates are converted to the coordinate frame indicated by frame_id.

songshan0321 commented 5 years ago

Stepped into this issue today. The problem is in lines 447-448 of obstacle_extractor.cpp, where circles are discarded if their centers don't fall within a range of coordinates described by parameters (min|max)_(x|y)_limit. However at this point the center is likely expressed in global coordinates (assuming transform_coordinates is set to true and frame_id to map or something equivalent), while the limits are given relative to the sensor's coordinate frame. The result is that any circle obstacle distant more than (min|max)_(x|y)_limit from the center of the frame_id coordinate frame will be discarded.

I would recommend removing the conditional altogether. Otherwise, this logic needs to be moved above line 409, so it's applied before circle center coordinates are converted to the coordinate frame indicated by frame_id.

I have the same issue and this solve it. Much thanks!

kelvinkefren commented 5 months ago

actually, this is a parameter. For default, all segment that has a distance higher than 10, will not be converted to a obstacle circle. I changed adding these lines below in the launch to until 20.

<param name="min_x_limit"          value="-20.0"/>
<param name="max_x_limit"          value="20.0"/>
<param name="min_y_limit"          value="-20.0"/>
<param name="max_y_limit"          value="20.0"/>