Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

With just camera, no because you need depth information. And I don't think info from sonar can be easily mapped onto image. Most common thing would be to have pointcloud. And then you can use move_base to get obstacle info. But if you want to go the other way around, that's how I'd do it:

  1. Map lidar points onto image so that you have XYZRGB info as a new pointcloud message.
  2. Use clustering algorithm on pointcloud(XYZ) to get the clusters.
  3. Through yolo you already have bounding boxes, find overlap between those bounding boxes and pointcloud clusters.
  4. You can set up a limit for %age overlap, so if overlap is greater than 50% then that cluster belongs to human.
  5. Now you can make custom obstacle layer and feed four extreme points of clusters to it and it will mark that as an obstacle on costmap (optional, if you have done all above this should be easy).
  6. These are the same co-ordinates of person so you can give a goal relative to map frame and it should go to that person.

And people detection and tracking is already explained in a comment. There are package available like leg_detector that can detect a person and you can get coordinate info from there as well and give that as a goal. And for your case detection should be enough I guess.

Hope this explained things a bit.