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

# Move a robot head toward a 3D point

Hello,

I am working with a Kinect and two dynamixel motors (to have a pan/tilt). I would like to send commands to the motors so that the kinect look at a point in 3D space.

I managed to have the Kinect look in a specified direction using the pan motor. But that was only in 2D space so I used Euler angles and trigonometry. Using the same in 3D space would be much more complicated.

I would like to know if there are some tools to help doing such things ? I heard that maybe using tf could help me but I don't know how I should do that. Can someone help me ?

Thanks Caroline

edit retag close merge delete

As I understood, your kinect is fixed, and you can only turn it. So why would you change the 2D thing you already did ? As you can't go neerer from the point, finally, the distance of the point doesn't really matter, and you only need to turn you kinect left-right like you did up-down, no ?

( 2013-04-11 05:10:04 -0500 )edit

I can move the Kinect up-down and left-right. You are probably right and I could split the 3D problem into two 2D problems, but I thought there were simpler solutions for 3D problems like that, using directly 3D coordinates. Do you know things that could help ?

( 2013-04-11 05:40:04 -0500 )edit

Sort by » oldest newest most voted

You could have a look at how the PR2 does it: pr2_head_action. Basically, they use tf to transform the 3D point into the pan and tilt frames, and then use two lines of trigonometry to get the corresponding pan and tilt angles.

more

2

Also, I would suggest using the control_msgs/PointHeadAction message, as this is basically a new standard message derived from the pr2 version. See http://ros.org/wiki/control_msgs

( 2013-04-18 18:45:59 -0500 )edit

## Stats

Asked: 2013-04-11 04:53:29 -0500

Seen: 425 times

Last updated: Apr 11 '13