Choreonoid  1.1
PinDragIK.h
[詳解]
1 
6 #ifndef CNOID_BODY_PIN_DRAG_IK_H_INCLUDED
7 #define CNOID_BODY_PIN_DRAG_IK_H_INCLUDED
8 
9 #include "Body.h"
10 #include "InverseKinematics.h"
11 #include <boost/shared_ptr.hpp>
12 #include "exportdecl.h"
13 
14 namespace cnoid {
15 
16  class PinDragIKImpl;
17 
19  {
20  public:
21 
22  PinDragIK(BodyPtr body);
23  ~PinDragIK();
24 
25  BodyPtr body() const;
26 
27  void setBaseLink(Link* baseLink);
28  void setFreeRootWeight(double translation, double rotation);
29  void setTargetLink(Link* targetLink, bool isAttitudeEnabled = false);
30  void setJointWeight(int jointId, double weight);
31 
32  void setPin(Link* link, InverseKinematics::AxisSet axes = InverseKinematics::TRANSLATION_3D, double weight = 1.0);
33  InverseKinematics::AxisSet pinAxes(Link* link);
34  void clearPins();
35  int numPinnedLinks();
36 
37  virtual void setIKErrorThresh(double e);
38  virtual bool hasAnalyticalIK();
39  virtual InverseKinematics::AxisSet targetAxes() const;
40  void setSRInverseParameters(double k0, double w0);
41  void enableJointRangeConstraints(bool on);
42 
47  bool initialize();
48 
49  virtual bool calcInverseKinematics(const Vector3& end_p, const Matrix3& end_R);
50 
51  private:
52 
53  PinDragIKImpl* impl;
54 
55  };
56 
57  typedef boost::shared_ptr<PinDragIK> PinDragIKptr;
58 }
59 
60 #endif
boost::intrusive_ptr< Body > BodyPtr
Definition: Body.h:22
Definition: PinDragIK.h:18
Definition: InverseKinematics.h:13
AxisSet
Definition: InverseKinematics.h:16
Definition: InverseKinematics.h:16
Eigen::Vector3d Vector3
Definition: EigenTypes.h:26
#define CNOID_EXPORT
Definition: Util/exportdecl.h:13
bool initialize()
boost::shared_ptr< PinDragIK > PinDragIKptr
Definition: PinDragIK.h:57
Eigen::Matrix3d Matrix3
Definition: EigenTypes.h:25