object_localization - IRS-group/isr_tiago_docs GitHub Wiki
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:
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