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

PR2 sensing question

asked 2012-07-13 09:29:42 -0500

joey0702 gravatar image

updated 2014-11-22 17:05:10 -0500

ngrennan gravatar image

HI, I am using Fuerte on Ubuntu 12.04 and have some trouble figuring out how to implement color sensing on my code.

I want PR2 to distinguish a red block and a blue block but I can't find any relative code in the libraries. I found out that in the pick_and_place_manager.py, there is a call_tabletop_detection, which detects graspable objects by numbering them starting from zero relative to the distance of the block from the edge of the table.

Can anyone help me how I can make PR2 distinguish red block and blue block by any method?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-07-26 09:52:24 -0500

hsiao gravatar image

The graspable objects in the pick_and_place_manager contain the point clusters, which have RGB information. These webpages will hopefully make it clear how to access that information: https://kforge.ros.org/Sushi/trac/wiki/Perception/PointCloud2InPython https://kforge.ros.org/Sushi/trac/wiki/Perception/PointCloud2MessageStructure

if you just take the average r and b values for the points in each object, you should be able to tell red from blue.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-07-13 09:29:42 -0500

Seen: 158 times

Last updated: Jul 26 '13