ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

detect a red object in my world

asked 2016-12-23 12:28:14 -0500

iguma gravatar image

Hi guys, i'm trying to make my robot rotating until he "see" a red object and then drive to this object. i tried to do it with point cloud library ,i understand i need to subscribe to a certain topic but i don't know which one? also after subscribing i don't know how to isolate the color of the frame from the message just received, can someone please help me? i'm using ros indigo with armadillo model. Thx.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-12-24 09:21:26 -0500

lucasw gravatar image

updated 2016-12-24 09:22:33 -0500

If you are using a depth camera then the PCL library would be appropriate, but if it is a regular color camera then you would want to use OpenCV, and could try out colored blob detection like in https://www.learnopencv.com/blob-dete... (it mentions the blobcolor doesn't work as of that blog post, but I see in http://answers.opencv.org/question/26... that it was fixed which may be available in your version). Or try out inRange to get a binary image of just the places in the image that are red ( http://stackoverflow.com/questions/26... ) and do some other operations to your object.

You should use http://answers.opencv.org for OpenCV specific questions.

If there is a single topic with a name that ends in image_raw or image_color then that might be the topic to subscribe to- use rqt_image_view to select from available image topics and find the right one if there are several options.

edit flag offensive delete link more
0

answered 2016-12-25 08:51:01 -0500

iguma gravatar image

Hi, first of all thanks , but i have to work with PCL. maybe do you have a guide for how to detect object by color with PCL? it think i suppose to subscribe for this topic "/sr300/depth/points", but i don't know how to analyse the msg received.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-12-23 12:28:14 -0500

Seen: 1,791 times

Last updated: Dec 25 '16