Robotis Manipulator  1.0.0
robotis_manipulator_manager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright 2018 ROBOTIS CO., LTD.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *******************************************************************************/
16 
17 /* Authors: Darby Lim, Hye-Jong KIM, Ryan Shim, Yong-Ho Na */
18 
25 #ifndef ROBOTIS_MANIPULATOR_MANAGER_H_
26 #define ROBOTIS_MANIPULATOR_MANAGER_H_
27 
28 #if defined(__OPENCR__)
29  #include <Eigen.h> // Calls main Eigen matrix class library
30 #else
31  #include <eigen3/Eigen/Eigen>
32 #endif
33 
35 
36 namespace robotis_manipulator
37 {
42 {
43 public:
45  virtual ~Kinematics() {}
46 
51  virtual void setOption(const void *arg) = 0;
58  virtual Eigen::MatrixXd jacobian(Manipulator *manipulator, Name tool_name) = 0;
63  virtual void solveForwardKinematics(Manipulator *manipulator) = 0;
72  virtual bool solveInverseKinematics(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector<JointValue>* goal_joint_position) = 0;
73 };
74 
79 {
80 public:
82 
83  JointActuator() : enabled_state_(false) {}
84  virtual ~JointActuator() {}
85 
91  virtual void init(std::vector<uint8_t> actuator_id, const void *arg) = 0;
97  virtual void setMode(std::vector<uint8_t> actuator_id, const void *arg) = 0;
102  virtual std::vector<uint8_t> getId() = 0;
103 
107  virtual void enable() = 0;
111  virtual void disable() = 0;
112 
119  virtual bool sendJointActuatorValue(std::vector<uint8_t> actuator_id, std::vector<ActuatorValue> value_vector) = 0;
125  virtual std::vector<ActuatorValue> receiveJointActuatorValue(std::vector<uint8_t> actuator_id) = 0;
126 
132  bool findId(uint8_t actuator_id);
137  bool getEnabledState();
138 };
139 
144 {
145 public:
150 
154  ToolActuator():enabled_state_(false){}
158  virtual ~ToolActuator() {}
159 
165  virtual void init(uint8_t actuator_id, const void *arg) = 0;
170  virtual void setMode(const void *arg) = 0;
175  virtual uint8_t getId() = 0;
176 
180  virtual void enable() = 0;
184  virtual void disable() = 0;
185 
191  virtual bool sendToolActuatorValue(ActuatorValue value) = 0;
196  virtual ActuatorValue receiveToolActuatorValue() = 0;
197 
203  bool findId(uint8_t actuator_id);
208  bool getEnabledState();
209 };
210 
215 {
216 public:
219 
226  virtual void makeJointTrajectory(double move_time, JointWaypoint start, const void *arg) = 0;
231  virtual void setOption(const void *arg) = 0;
237  virtual JointWaypoint getJointWaypoint(double tick) = 0;
238 };
239 
244 {
245 public:
248 
255  virtual void makeTaskTrajectory(double move_time, TaskWaypoint start, const void *arg) = 0;
260  virtual void setOption(const void *arg) = 0;
266  virtual TaskWaypoint getTaskWaypoint(double tick) = 0;
267 };
268 
269 } // namespace ROBOTIS_MANIPULATOR
270 #endif
main namespace
virtual void solveForwardKinematics(Manipulator *manipulator)=0
solveForwardKinematics
virtual bool solveInverseKinematics(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector< JointValue > *goal_joint_position)=0
solveInverseKinematics
std::vector< JointValue > JointWaypoint
virtual void setOption(const void *arg)=0
setOption
virtual Eigen::MatrixXd jacobian(Manipulator *manipulator, Name tool_name)=0
jacobian