Klamp't  0.9.0
Public Types | Public Member Functions | Public Attributes | List of all members
Klampt::RobotPoseWidget Class Reference

#include <RobotPoseWidget.h>

Inheritance diagram for Klampt::RobotPoseWidget:

Public Types

enum  {
  ModeNormal, ModeIKAttach, ModeIKPose, ModeIKPoseFixed,

Public Member Functions

 RobotPoseWidget (RobotModel *robot, ViewRobot *viewRobot)
void Set (RobotModel *robot, ViewRobot *viewRobot)
const Config & Pose () const
void SetPose (const Config &q)
vector< IKGoal > & Constraints ()
Config Pose_Conditioned (const Config &qref) const
void SetActiveDofs (const vector< int > &activeDofs)
 Enables / disables editing certain joints.
bool FixCurrent ()
 Adds a pos/rot constraint on the currently hovered link.
bool FixCurrentPoint ()
 Adds a point constraint on the currently hovered link.
bool DeleteConstraint ()
 Deletes the currently hovered constraint or all constraints on the currently hovered link.
void SetAttachIKMode (bool)
 Turn attach IK mode on/off.
void SetPoseIKMode (bool)
 Turn point IK posing on/off.
void SetFixedPoseIKMode (bool)
 Turn fixed IK posing on/off.
void SetDeleteIKMode (bool)
 Turn delete IK widgets on/off.
bool SolveIK (int iters=0, Real tol=0)
 Solves the current IK problem (by default uses 100 iters, tolerance 0.001)
bool SolveIKFixedBase (int iters=0, Real tol=0)
 Solves the current IK problem with a fixed base.
bool SolveIKFixedJoint (int fixedJoint, int iters=0, Real tol=0)
 Solves the current IK problem with a joint fixed in place.
virtual void DrawGL (Camera::Viewport &viewport) override
virtual bool BeginDrag (int x, int y, Camera::Viewport &viewport, double &distance) override
virtual void Drag (int dx, int dy, Camera::Viewport &viewport) override
virtual void EndDrag () override
virtual void Keypress (char c) override
void Snapshot ()
void Undo ()

Public Attributes

bool useBase
GLDraw::TransformWidget basePoser
RobotLinkPoseWidget linkPoser
RobotIKPoseWidget ikPoser
int mode
int attachx
int attachy
Ray3D attachRay
vector< Config > undoConfigs
vector< vector< pair< int, RigidTransform > > > undoTransforms

Detailed Description

A widget that allows full posing and editing of the robot config including IK constraints and base motion.

Member Function Documentation

Config Klampt::RobotPoseWidget::Pose_Conditioned ( const Config &  qref) const

if there are multiple solutions for the current pose, picks the one that most closely matches qref (useful for spin joints)

The documentation for this class was generated from the following file: