Search code examples
constraintsroboticsdrake

General Cone Gaze Constraint


I've been using the gaze constraint in order to do inverse kinematics for seeing objects with a camera. However, and I imagine I am not alone in this manner, the output of my camera is square. Because the constraint only allows for circular cones, it only includes about half the area that the camera sees.

I was wondering if it would be possible to introduce a gaze constraint that works with a general purpose cone? If solving such a general problem isn't practical, a gaze constraint that accepted elliptical cones would be a really useful alternative as a user can effectively implement a rectangular cone (using two elliptical cones, each with one arbitrarily large axis).


Solution

  • I added PolyhedronConstraint to Drake's inverse kinematics code. It can handle "target in the rectangle gaze cone". I also added an example to show how to use this constraint.