sync another commit
@@ -56,36 +56,10 @@ typedef struct
} Inertia;
-class Manipulator;
-class Link;
-class Base;
-class Joint;
-class Tool;
-
Eigen::Vector3f makeEigenVector3(float v1, float v2, float v3);
Eigen::Matrix3f makeEigenMatrix3(float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33);
Eigen::Matrix3f makeRotationMatrix(float roll, float pitch, float yaw);
-template <int8_t type_, int8_t joint_size_, int8_t link_size_, int8_t tool_size>
-class Manipulator
-{
- private:
- int8_t dof_;
-
- public:
- Base base_;
- Joint joint_[joint_size_];
- Link link_[link_size_];
- Tool tool_[tool_size];
-
- /////////////////func///////////////////
- Manipulator(int8_t dof);
- ~Manipulator();
-
- void setDOF(int8_t dof);
- ////////////////////////////////////////
-};
-
class Joint
{
private:
@@ -161,11 +135,18 @@ class Link
class Base: public Link
{
private:
+ Pose relative_base_pose_;
+
Pose base_pose_;
public:
/////////////////func///////////////////
Base();
~Base();
+
+ void setRelativeBasePostion(Eigen::Vector3f relative_base_position);
+ void setRelativeBaseOrientation(Eigen::Matrix3f relative_base_orientation);
+ void setRelativeBasePose(Pose relative_base_pose);
+
void setPosition(Eigen::Vector3f base_position);
void setOrientation(Eigen::Matrix3f base_orientation);
void setPose(Pose base_pose);
@@ -181,6 +162,8 @@ class Tool: public Link
{
private:
int8_t tool_type_;
+ Pose relative_tool_pose_;
+
Pose tool_pose_;
public:
/////////////////func///////////////////
@@ -189,6 +172,10 @@ class Tool: public Link
void setToolType(int8_t tool_type);
int8_t getToolType();
+ void setRelativeToolPosition(Eigen::Vector3f relative_tool_position);
+ void setRelativeToolOrientation(Eigen::Matrix3f relative_tool_orientation);
+ void setRelativeToolPose(Pose relative_tool_pose);
+
void setPosition(Eigen::Vector3f tool_position);
void setOrientation(Eigen::Matrix3f tool_orientation);
void setPose(Pose tool_pose);
@@ -200,5 +187,25 @@ class Tool: public Link
////////////////////////////////////////
};
+template <int8_t TYPE, int8_t JOINT_SIZE, int8_t LINK_SIZE, int8_t TOOL_SIZE>
+class Manipulator
+{
+ private:
+ int8_t dof_;
+
+ public:
+ Base base_;
+ Joint joint_[JOINT_SIZE];
+ Link link_[LINK_SIZE];
+ Tool tool_[TOOL_SIZE];
+
+ /////////////////func///////////////////
+ Manipulator(int8_t dof);
+ ~Manipulator();
+
+ void setDOF(int8_t dof);
+ ////////////////////////////////////////
+};
+
#endif // OMMANAGER_H_
