ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
First you need to detect an object you are interested in - I assume you have already done this. Next step would be to publish tf transform for this particular object (line), you can find this tutorial useful:
http://www.ros.org/wiki/tf/Tutorials/Adding%20a%20frame%20%28C%2B%2B%29
Carrot example is really cool :) Of course you should publish tf /object with base /laser (or whatever, according to you detection method). In the part of the code that needs an input about object position place tf listener for transform from /object to /base_link, like in this tutorial:
http://www.ros.org/wiki/tf/Tutorials/Writing%20a%20tf%20listener%20%28C%2B%2B%29
Remember to setup your robot with tfs (in this case you are going to need /base_link and /laser frames).