Choreonoid  1.8
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 
18 class CNOID_EXPORT PinDragIK : public InverseKinematics
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  enum AxisSet { NO_AXES = 0, TRANSLATION_3D = 0x1, ROTATION_3D = 0x2, TRANSFORM_6D = 0x3 };
32  void setPin(Link* link, AxisSet axes = TRANSLATION_3D, double weight = 1.0);
33  AxisSet pinAxes(Link* link);
34  void clearPins();
35  int numPinnedLinks();
36 
37  void setIKErrorThresh(double e);
38  bool hasAnalyticalIK();
39  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 Isometry3& T) override;
50 
51 private:
52  PinDragIKImpl* impl;
53 };
54 
55 }
56 
57 #endif
cnoid::Isometry3
Eigen::Isometry3d Isometry3
Definition: EigenTypes.h:73
cnoid::PinDragIK
Definition: PinDragIK.h:18
cnoid::PinDragIK::AxisSet
AxisSet
Definition: PinDragIK.h:31
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::InverseKinematics
Definition: InverseKinematics.h:13
cnoid::Body
Definition: Body.h:28
InverseKinematics.h