This question is related to my final project. In gazebo simulation environment, I am trying to detect obstacles' colors and calculate the distance between robot and obstacles. I am currently identifying their colors with the help of OpenCV methods (object with boundary box) but I don't know how can i calculate their distances between robot. I have my robot's position. I will not use stereo. I know the size of the obstacles. Waiting for your suggestions and ideas. Thank you!
My robot's topics :
- cameras/camera/camera_info (Type: sensor_msgs/CameraInfo)
- cameras/camera/image_raw (Type: sensor_msgs/Image)
- sensors/lidars/points (Type: sensor_msgs/PointCloud2)