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