19 #include "../include/open_manipulator_p_libs/open_manipulator_p.h" 43 math::vector3(0.0, 0.0, 0.126),
44 math::convertRPYToRotationMatrix(0.0, 0.0, 0.0),
51 math::inertiaMatrix(3.4543422e-05, -1.6031095e-08, -3.8375155e-07,
52 3.2689329e-05, 2.8511935e-08,
54 math::vector3(-3.0184870e-04, 5.4043684e-04, 0.018 + 2.9433464e-02)
60 math::vector3(0.0, 0.0, 0.033),
61 math::convertRPYToRotationMatrix(0.0, 0.0, 0.0),
68 math::inertiaMatrix(3.3055381e-04, 9.7940978e-08, -3.8505711e-05,
69 3.4290447e-04, -1.5717516e-06,
71 math::vector3(1.0308393e-02, 3.7743363e-04, 1.0170197e-01)
77 math::vector3(0.030, 0.0, 0.264),
78 math::convertRPYToRotationMatrix(0.0, 0.0, 0.0),
85 math::inertiaMatrix(3.0654178e-05, -1.2764155e-06, -2.6874417e-07,
86 2.4230292e-04, 1.1559550e-08,
88 math::vector3(9.0909590e-02, 3.8929816e-04, 2.2413279e-04)
94 math::vector3(0.195, 0.0, 0.030),
95 math::convertRPYToRotationMatrix(0.0, 0.0, 0.0),
102 math::inertiaMatrix(8.0870749e-05, 0.0, -1.0157896e-06,
105 math::vector3(4.4206755e-02, 3.6839985e-07, 8.9142216e-03)
111 math::vector3(0.063, 0.0, 0.0),
112 math::convertRPYToRotationMatrix(0.0, 0.0, 0.0),
119 math::inertiaMatrix(8.0870749e-05, 0.0, -1.0157896e-06,
122 math::vector3(4.4206755e-02, 3.6839985e-07, 8.9142216e-03)
128 math::vector3(0.123, 0.0, 0.0),
129 math::convertRPYToRotationMatrix(0.0, 0.0, 0.0),
136 math::inertiaMatrix(8.0870749e-05, 0.0, -1.0157896e-06,
139 math::vector3(4.4206755e-02, 3.6839985e-07, 8.9142216e-03)
143 double gripper_len = 0.0;
147 gripper_len = 0.1223;
151 math::vector3(gripper_len, 0.0, 0.0),
153 math::convertRPYToRotationMatrix(0.0, 0.0, 0.0),
159 math::inertiaMatrix(9.5568826e-06, 2.8424644e-06, -3.2829197e-10,
160 2.2552871e-05, -3.1463634e-10,
162 math::vector3(0.028 + 8.3720668e-03, 0.0246, -4.2836895e-07)
173 void *p_with_gripper = &with_gripper;
176 if (using_actual_robot_state)
185 STRING dxl_comm_arg[2] = {usb_port, baud_rate};
186 void *p_dxl_comm_arg = &dxl_comm_arg;
189 std::vector<uint8_t> jointDxlId;
190 jointDxlId.push_back(1);
191 jointDxlId.push_back(2);
192 jointDxlId.push_back(3);
193 jointDxlId.push_back(4);
194 jointDxlId.push_back(5);
195 jointDxlId.push_back(6);
199 STRING joint_dxl_mode_arg =
"position_mode";
200 void *p_joint_dxl_mode_arg = &joint_dxl_mode_arg;
210 uint8_t gripperDxlId = 7;
214 STRING gripper_dxl_mode_arg =
"current_based_position_mode";
215 void *p_gripper_dxl_mode_arg = &gripper_dxl_mode_arg;
260 static bool onoff =
false;
277 std::vector<Name> tool_component_name;
278 tool_component_name =
getManipulator()-> getAllToolComponentName();
280 if (using_actual_robot_state)
297 double angle = distance.at(0).position;
304 result_vector.push_back(result);
306 return result_vector;
312 double distance = angle.at(0).position;
319 result_vector.push_back(result);
321 return result_vector;
#define CUSTOM_TRAJECTORY_HEART
void addTool(Name my_name, Name parent_name, Eigen::Vector3d relative_position, Eigen::Matrix3d relative_orientation, int8_t tool_id=-1, double max_position_limit=M_PI, double min_position_limit=-M_PI, double coefficient=1.0, double object_mass=0.0, Eigen::Matrix3d object_inertia_tensor=Eigen::Matrix3d::Identity(), Eigen::Vector3d object_center_of_mass=Eigen::Vector3d::Zero())
std::vector< JointValue > getToolGoalValue()
std::vector< JointValue > receiveAllToolActuatorValue()
std::vector< JointValue > getJointGoalValueFromTrajectory(double present_time, int option=DYNAMICS_ALL_SOVING)
robotis_manipulator::ToolActuator * tool_
void addJoint(Name my_name, Name parent_name, Name child_name, Eigen::Vector3d relative_position, Eigen::Matrix3d relative_orientation, Eigen::Vector3d axis_of_rotation=Eigen::Vector3d::Zero(), int8_t joint_actuator_id=-1, double max_position_limit=M_PI, double min_position_limit=-M_PI, double coefficient=1.0, double mass=0.0, Eigen::Matrix3d inertia_tensor=Eigen::Matrix3d::Identity(), Eigen::Vector3d center_of_mass=Eigen::Vector3d::Zero(), double torque_coefficient=1.0)
void setKinematicsOption(const void *arg)
robotis_manipulator::JointActuator * actuator_
#define CUSTOM_TRAJECTORY_LINE
std::vector< JointValue > JointWaypoint
std::vector< JointValue > receiveAllJointActuatorValue()
void setToolActuatorMode(Name actuator_name, const void *arg)
#define CUSTOM_TRAJECTORY_SIZE
void solveForwardKinematics()
void processOpenManipulator(double present_time, bool using_actual_robot_state, bool with_gripper=false)
#define CUSTOM_TRAJECTORY_CIRCLE
Manipulator * getManipulator()
virtual ~OpenManipulator()
robotis_manipulator::Kinematics * kinematics_
bool sendAllToolActuatorValue(std::vector< JointValue > value_vector)
bool sendAllJointActuatorValue(std::vector< JointValue > value_vector)
void setJointValue(Name name, JointValue joint_value)
void initOpenManipulator(bool using_actual_robot_state, STRING usb_port="/dev/ttyUSB0", STRING baud_rate="1000000", float control_loop_time=0.010, bool with_gripper=false)
void addCustomTrajectory(Name trajectory_name, CustomJointTrajectory *custom_trajectory)
#define CUSTOM_TRAJECTORY_RHOMBUS
void addKinematics(Kinematics *kinematics)
void addJointActuator(Name actuator_name, JointActuator *joint_actuator, std::vector< uint8_t > id_array, const void *arg)
void setJointActuatorMode(Name actuator_name, std::vector< uint8_t > id_array, const void *arg)
JointWaypoint distanceToAngle(JointWaypoint distance)
robotis_manipulator::CustomTaskTrajectory * custom_trajectory_[CUSTOM_TRAJECTORY_SIZE]
JointWaypoint angleToDistance(JointWaypoint angle)
void addWorld(Name world_name, Name child_name, Eigen::Vector3d world_position=Eigen::Vector3d::Zero(), Eigen::Matrix3d world_orientation=Eigen::Matrix3d::Identity())
void addToolActuator(Name tool_name, ToolActuator *tool_actuator, uint8_t id, const void *arg)