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

detect a red object in my world

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

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

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

lucasw gravatar image

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

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 (it mentions the blobcolor doesn't work as of that blog post, but I see in 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 ( ) and do some other operations to your object.

You should use 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

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

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


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

Seen: 1,784 times

Last updated: Dec 25 '16