single_dynamixel_monitor.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright 2016 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: Taehun Lim (Darby) */
18 
19 #ifndef DYNAMIXEL_WORKBENCH_SINGLE_DYNAMIXEL_MONITOR_H
20 #define DYNAMIXEL_WORKBENCH_SINGLE_DYNAMIXEL_MONITOR_H
21 
22 #include <ros/ros.h>
23 
26 
27 #include "dynamixel_workbench_msgs/DynamixelCommand.h"
28 #include "dynamixel_workbench_msgs/GetDynamixelInfo.h"
29 #include "message_header.h"
30 
32 {
34 {
35  private:
36  // ROS NodeHandle
38 
39  // ROS Parameters
40 
41  // ROS Topic Publisher
43 
44  // ROS Topic Subscriber
45 
46  // ROS Service Server
49 
51 
52  std::string device_name_;
53  uint32_t dxl_baud_rate_;
54  uint8_t dxl_id_;
55 
56  public:
59  bool controlLoop();
60 
61  private:
62  void initSingleDynamixelMonitor(void);
64 
65  // TODO : Add new Dynamixel
66  void initDynamixelStatePublisher(void);
67  void initDynamixelInfoServer(void);
68  void initDynamixelCommandServer(void);
69  // TODO : Add new Dynamixel
70  void dynamixelStatePublish(void);
71 
72  bool showDynamixelControlTable(void);
73  bool checkValidationCommand(std::string cmd);
74  bool changeId(uint8_t new_id);
75  bool changeBaudrate(uint32_t new_baud_rate);
76  bool changeProtocolVersion(float ver);
77 
78  bool dynamixelInfoMsgCallback(dynamixel_workbench_msgs::GetDynamixelInfo::Request &req,
79  dynamixel_workbench_msgs::GetDynamixelInfo::Response &res);
80 
81  bool dynamixelCommandMsgCallback(dynamixel_workbench_msgs::DynamixelCommand::Request &req,
82  dynamixel_workbench_msgs::DynamixelCommand::Response &res);
83 
84  void AX(void);
85  void RX(void);
86  void EX(void);
87  void MX(void);
88  void MXExt(void);
89  void MX2(void);
90  void MX2Ext(void);
91  void XL320(void);
92  void XL(void);
93  void XM(void);
94  void XMExt(void);
95  void XH(void);
96  void PRO(void);
97  void PROExt(void);
98 };
99 }
100 
101 #endif //DYNAMIXEL_WORKBENCH_SINGLE_DYNAMIXEL_MONITOR_H
bool dynamixelCommandMsgCallback(dynamixel_workbench_msgs::DynamixelCommand::Request &req, dynamixel_workbench_msgs::DynamixelCommand::Response &res)
bool dynamixelInfoMsgCallback(dynamixel_workbench_msgs::GetDynamixelInfo::Request &req, dynamixel_workbench_msgs::GetDynamixelInfo::Response &res)


dynamixel_workbench_single_manager
Author(s): Darby Lim
autogenerated on Mon Jun 10 2019 13:06:14