19 #include "../include/open_manipulator_libs/open_manipulator.h" 43 math::vector3(0.012, 0.0, 0.017),
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.0595),
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.024, 0.0, 0.128),
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.124, 0.0, 0.0),
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)
110 math::vector3(0.126, 0.0, 0.0),
111 math::convertRPYToRotationMatrix(0.0, 0.0, 0.0),
117 math::inertiaMatrix(9.5568826e-06, 2.8424644e-06, -3.2829197e-10,
118 2.2552871e-05, -3.1463634e-10,
120 math::vector3(0.028 + 8.3720668e-03, 0.0246, -4.2836895e-07)
130 if(using_actual_robot_state)
139 STRING dxl_comm_arg[2] = {usb_port, baud_rate};
140 void *p_dxl_comm_arg = &dxl_comm_arg;
143 std::vector<uint8_t> jointDxlId;
144 jointDxlId.push_back(11);
145 jointDxlId.push_back(12);
146 jointDxlId.push_back(13);
147 jointDxlId.push_back(14);
151 STRING joint_dxl_mode_arg =
"position_mode";
152 void *p_joint_dxl_mode_arg = &joint_dxl_mode_arg;
161 uint8_t gripperDxlId = 15;
165 STRING gripper_dxl_mode_arg =
"current_based_position_mode";
166 void *p_gripper_dxl_mode_arg = &gripper_dxl_mode_arg;
170 STRING gripper_dxl_opt_arg[2];
171 void *p_gripper_dxl_opt_arg = &gripper_dxl_opt_arg;
172 gripper_dxl_opt_arg[0] =
"Profile_Acceleration";
173 gripper_dxl_opt_arg[1] =
"20";
176 gripper_dxl_opt_arg[0] =
"Profile_Velocity";
177 gripper_dxl_opt_arg[1] =
"200";
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)
#define CUSTOM_TRAJECTORY_CIRCLE
void processOpenManipulator(double present_time)
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)
robotis_manipulator::JointActuator * actuator_
std::vector< JointValue > JointWaypoint
std::vector< JointValue > receiveAllJointActuatorValue()
void setToolActuatorMode(Name actuator_name, const void *arg)
#define CUSTOM_TRAJECTORY_HEART
void solveForwardKinematics()
virtual ~OpenManipulator()
robotis_manipulator::Kinematics * kinematics_
bool sendAllToolActuatorValue(std::vector< JointValue > value_vector)
bool sendAllJointActuatorValue(std::vector< JointValue > value_vector)
void initOpenManipulator(bool using_actual_robot_state, STRING usb_port="/dev/ttyUSB0", STRING baud_rate="1000000", float control_loop_time=0.010)
#define CUSTOM_TRAJECTORY_LINE
#define CUSTOM_TRAJECTORY_SIZE
#define CUSTOM_TRAJECTORY_RHOMBUS
void addCustomTrajectory(Name trajectory_name, CustomJointTrajectory *custom_trajectory)
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)
robotis_manipulator::CustomTaskTrajectory * custom_trajectory_[CUSTOM_TRAJECTORY_SIZE]
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)