25 #ifndef ROBOTIS_MANIPULATOR_COMMON_H 26 #define ROBOTIS_MANIPULATOR_COMMON_H 29 #if defined(__OPENCR__) 34 #include <eigen3/Eigen/Eigen> 35 #include <eigen3/Eigen/LU> 204 void addWorld(Name world_name,
206 Eigen::Vector3d world_position = Eigen::Vector3d::Zero(),
207 Eigen::Matrix3d world_orientation = Eigen::Matrix3d::Identity());
224 void addJoint(Name my_name,
227 Eigen::Vector3d relative_position,
228 Eigen::Matrix3d relative_orientation,
229 Eigen::Vector3d axis_of_rotation = Eigen::Vector3d::Zero(),
230 int8_t joint_actuator_id = -1,
231 double max_position_limit = M_PI,
232 double min_position_limit = -M_PI,
233 double coefficient = 1.0,
235 Eigen::Matrix3d inertia_tensor = Eigen::Matrix3d::Identity(),
236 Eigen::Vector3d center_of_mass = Eigen::Vector3d::Zero());
251 void addTool(Name my_name,
253 Eigen::Vector3d relative_position,
254 Eigen::Matrix3d relative_orientation,
256 double max_position_limit = M_PI,
257 double min_position_limit = -M_PI,
258 double coefficient = 1.0,
260 Eigen::Matrix3d inertia_tensor = Eigen::Matrix3d::Identity(),
261 Eigen::Vector3d center_of_mass = Eigen::Vector3d::Zero());
267 void addComponentChild(Name my_name, Name child_name);
271 void printManipulatorSetting();
281 void setWorldPose(Pose world_pose);
286 void setWorldKinematicPose(
KinematicPose world_kinematic_pose);
291 void setWorldPosition(Eigen::Vector3d world_position);
296 void setWorldOrientation(Eigen::Matrix3d world_orientation);
301 void setWorldDynamicPose(
DynamicPose world_dynamic_pose);
306 void setWorldLinearVelocity(Eigen::Vector3d world_linear_velocity);
311 void setWorldAngularVelocity(Eigen::Vector3d world_angular_velocity);
316 void setWorldLinearAcceleration(Eigen::Vector3d world_linear_acceleration);
321 void setWorldAngularAcceleration(Eigen::Vector3d world_angular_acceleration);
327 void setComponent(Name component_name,
Component component);
333 void setComponentActuatorName(Name component_name, Name actuator_name);
339 void setComponentPoseFromWorld(Name component_name, Pose pose_to_world);
345 void setComponentKinematicPoseFromWorld(Name component_name,
KinematicPose pose_to_world);
351 void setComponentPositionFromWorld(Name component_name, Eigen::Vector3d position_to_world);
357 void setComponentOrientationFromWorld(Name component_name, Eigen::Matrix3d orientation_to_wolrd);
363 void setComponentDynamicPoseFromWorld(Name component_name,
DynamicPose dynamic_pose);
369 void setJointPosition(Name name,
double position);
375 void setJointVelocity(Name name,
double velocity);
381 void setJointAcceleration(Name name,
double acceleration);
387 void setJointEffort(Name name,
double effort);
393 void setJointValue(Name name, JointValue joint_value);
398 void setAllActiveJointPosition(std::vector<double> joint_position_vector);
403 void setAllActiveJointValue(std::vector<JointValue> joint_value_vector);
408 void setAllJointPosition(std::vector<double> joint_position_vector);
413 void setAllJointValue(std::vector<JointValue> joint_value_vector);
418 void setAllToolPosition(std::vector<double> tool_position_vector);
423 void setAllToolValue(std::vector<JointValue> tool_value_vector);
443 Name getWorldChildName();
458 Eigen::Vector3d getWorldPosition();
463 Eigen::Matrix3d getWorldOrientation();
473 int8_t getComponentSize();
478 std::map<Name, Component> getAllComponent();
483 std::map<Name, Component>::iterator getIteratorBegin();
488 std::map<Name, Component>::iterator getIteratorEnd();
494 Component getComponent(Name component_name);
500 Name getComponentActuatorName(Name component_name);
506 Name getComponentParentName(Name component_name);
512 std::vector<Name> getComponentChildName(Name component_name);
518 Pose getComponentPoseFromWorld(Name component_name);
524 KinematicPose getComponentKinematicPoseFromWorld(Name component_name);
530 Eigen::Vector3d getComponentPositionFromWorld(Name component_name);
536 Eigen::Matrix3d getComponentOrientationFromWorld(Name component_name);
542 DynamicPose getComponentDynamicPoseFromWorld(Name component_name);
548 KinematicPose getComponentRelativePoseFromParent(Name component_name);
554 Eigen::Vector3d getComponentRelativePositionFromParent(Name component_name);
560 Eigen::Matrix3d getComponentRelativeOrientationFromParent(Name component_name);
566 int8_t getId(Name component_name);
572 double getCoefficient(Name component_name);
578 Eigen::Vector3d getAxis(Name component_name);
584 double getJointPosition(Name component_name);
590 double getJointVelocity(Name component_name);
596 double getJointAcceleration(Name component_name);
602 double getJointEffort(Name component_name);
608 JointValue getJointValue(Name component_name);
614 double getComponentMass(Name component_name);
620 Eigen::Matrix3d getComponentInertiaTensor(Name component_name);
626 Eigen::Vector3d getComponentCenterOfMass(Name component_name);
631 std::vector<double> getAllJointPosition();
636 std::vector<JointValue> getAllJointValue();
641 std::vector<double> getAllActiveJointPosition();
646 std::vector<JointValue> getAllActiveJointValue();
651 std::vector<double> getAllToolPosition();
656 std::vector<JointValue> getAllToolValue();
661 std::vector<uint8_t> getAllJointID();
666 std::vector<uint8_t> getAllActiveJointID();
671 std::vector<Name> getAllToolComponentName();
676 std::vector<Name> getAllActiveJointComponentName();
688 bool checkJointLimit(Name Component_name,
double value);
695 bool checkComponentType(Name component_name, ComponentType component_type);
706 Name findComponentNameUsingId(int8_t
id);
710 #endif // ROBOTIS_MANIPULATOR_COMMON_H struct robotis_manipulator::World World
struct robotis_manipulator::DynamicPose DynamicPose
std::vector< Name > child
std::map< Name, Component > component_
struct robotis_manipulator::JointConstant JointConstant
struct robotis_manipulator::Time Time
struct robotis_manipulator::Point JointValue
ComponentType component_type
struct robotis_manipulator::Dynamicvector Dynamicvector
struct robotis_manipulator::Point ActuatorValue
struct robotis_manipulator::Point ToolValue
std::vector< JointValue > JointWaypoint
struct robotis_manipulator::Pose Pose
Eigen::Matrix3d inertia_tensor
JointConstant joint_constant
struct robotis_manipulator::KinematicPose KinematicPose
struct robotis_manipulator::ChainingName ChainingName
struct robotis_manipulator::Relative Relative
Eigen::Vector3d acceleration
Eigen::Vector3d center_of_mass
struct robotis_manipulator::Component Component
Eigen::Matrix3d orientation
struct robotis_manipulator::Limit Limit
struct robotis_manipulator::Pose TaskWaypoint
struct robotis_manipulator::Inertia Inertia
KinematicPose pose_from_parent
struct robotis_manipulator::Point Point