Skip to content

object_localization

Rodrigo Serra edited this page Nov 28, 2023 · 1 revision

Run

First the object detector must be running, to do that run:

roslaunch darknet_ros_py darknet_ros_py.launch

Then launch the object localizer:

roslaunch mbot_object_localization mbot_object_localization.launch

Make sure that the object detector output topic matches with the object localizer input topic. You can change them in the launch files.

Finding the object visual center

References

StackOverflow discussion:

https://stackoverflow.com/questions/1203135/what-is-the-fastest-way-to-find-the-visual-center-of-an-irregularly-shaped-pol

State-of-the-art Approximate Method:

https://blog.mapbox.com/a-new-algorithm-for-finding-a-visual-center-of-a-polygon-7c77e6492fbc

https://github.com/mapbox/polylabel

https://github.com/shapely/shapely/blob/main/shapely/algorithms/polylabel.py

Install

pip3 install shapely

Clone this wiki locally