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

Move a robot head toward a 3D point

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

CarolineQ gravatar image

updated 2016-10-24 08:59:17 -0500

ngrennan gravatar image

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 flag offensive close merge delete

Comments

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 ?

Stephane.M gravatar image Stephane.M  ( 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 ?

CarolineQ gravatar image CarolineQ  ( 2013-04-11 05:40:04 -0500 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2013-04-11 23:16:40 -0500

updated 2013-04-11 23:19:31 -0500

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.

edit flag offensive delete link more

Comments

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

fergs gravatar image fergs  ( 2013-04-18 18:45:59 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 424 times

Last updated: Apr 11 '13