dynamixel_workbench.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: Taehun Lim (Darby) */
18 
19 #ifndef DYNAMIXEL_WORKBENCH_H_
20 #define DYNAMIXEL_WORKBENCH_H_
21 
22 #include "dynamixel_driver.h"
23 
25 {
26  public:
29 
30  bool torque(uint8_t id, int32_t onoff, const char **log = NULL);
31  bool torqueOn(uint8_t id, const char **log = NULL);
32  bool torqueOff(uint8_t id, const char **log = NULL);
33 
34  bool changeID(uint8_t id, uint8_t new_id, const char **log = NULL);
35  bool changeBaudrate(uint8_t id, uint32_t new_baudrate, const char **log = NULL);
36  bool changeProtocolVersion(uint8_t id, uint8_t version, const char **log = NULL);
37 
38  bool itemWrite(uint8_t id, const char *item_name, int32_t data, const char **log = NULL);
39  bool itemRead(uint8_t id, const char *item_name, int32_t *data, const char **log = NULL);
40 
41  bool led(uint8_t id, int32_t onoff, const char **log = NULL);
42  bool ledOn(uint8_t id, const char **log = NULL);
43  bool ledOff(uint8_t id, const char **log = NULL);
44 
45  bool setNormalDirection(uint8_t id, const char **log = NULL);
46  bool setReverseDirection(uint8_t id, const char **log = NULL);
47 
48  bool setVelocityBasedProfile(uint8_t id, const char **log = NULL);
49  bool setTimeBasedProfile(uint8_t id, const char **log = NULL);
50 
51  bool setSecondaryID(uint8_t id, uint8_t secondary_id, const char **log = NULL);
52 
53  bool setCurrentControlMode(uint8_t id, const char **log = NULL);
54  bool setTorqueControlMode(uint8_t id, const char **log = NULL);
55  bool setVelocityControlMode(uint8_t id, const char **log = NULL);
56  bool setPositionControlMode(uint8_t id, const char **log = NULL);
57  bool setExtendedPositionControlMode(uint8_t id, const char **log = NULL);
58  bool setMultiTurnControlMode(uint8_t id, const char **log = NULL);
59  bool setCurrentBasedPositionControlMode(uint8_t id, const char **log = NULL);
60  bool setPWMControlMode(uint8_t id, const char **log = NULL);
61 
62  bool setOperatingMode(uint8_t id, uint8_t index, const char **log = NULL);
63 
64  bool jointMode(uint8_t id, int32_t velocity = 0, int32_t acceleration = 0, const char **log = NULL);
65  bool wheelMode(uint8_t id, int32_t acceleration = 0, const char **log = NULL);
66  bool currentBasedPositionMode(uint8_t id, int32_t current = 0, const char **log = NULL);
67 
68  bool goalPosition(uint8_t id, int value, const char **log = NULL); //keep compatibility with older codes
69  // bool goalPosition(uint8_t id, int32_t value, const char **log = NULL);
70  bool goalPosition(uint8_t id, float radian, const char **log = NULL);
71 
72  bool goalSpeed(uint8_t id, int value, const char **log = NULL); //keep compatibility with older codes
73  bool goalVelocity(uint8_t id, int value, const char **log = NULL); //keep compatibility with older codes
74  // bool goalVelocity(uint8_t id, int32_t value, const char **log = NULL);
75  bool goalVelocity(uint8_t id, float velocity, const char **log = NULL);
76 
77  bool getPresentPositionData(uint8_t id, int32_t* data, const char **log = NULL);
78  bool getRadian(uint8_t id, float* radian, const char **log = NULL);
79 
80  bool getPresentVelocityData(uint8_t id, int32_t* data, const char **log = NULL);
81  bool getVelocity(uint8_t id, float* velocity, const char **log = NULL);
82 
83  int32_t convertRadian2Value(uint8_t id, float radian);
84  float convertValue2Radian(uint8_t id, int32_t value);
85 
86  int32_t convertRadian2Value(float radian, int32_t max_position, int32_t min_position, float max_radian, float min_radian);
87  float convertValue2Radian(int32_t value, int32_t max_position, int32_t min_position, float max_radian, float min_radian);
88 
89  int32_t convertVelocity2Value(uint8_t id, float velocity);
90  float convertValue2Velocity(uint8_t id, int32_t value);
91 
92  int16_t convertCurrent2Value(uint8_t id, float current);
93  int16_t convertCurrent2Value(float current);
94  float convertValue2Current(uint8_t id, int16_t value);
95  float convertValue2Current(int16_t value);
96 
97  float convertValue2Load(int16_t value);
98 };
99 
100 #endif /*DYNAMIXEL_WORKBENCH_H_*/
bool setOperatingMode(uint8_t id, uint8_t index, const char **log=NULL)
bool torqueOff(uint8_t id, const char **log=NULL)
bool changeID(uint8_t id, uint8_t new_id, const char **log=NULL)
bool setCurrentBasedPositionControlMode(uint8_t id, const char **log=NULL)
bool setSecondaryID(uint8_t id, uint8_t secondary_id, const char **log=NULL)
bool getVelocity(uint8_t id, float *velocity, const char **log=NULL)
bool setCurrentControlMode(uint8_t id, const char **log=NULL)
bool changeProtocolVersion(uint8_t id, uint8_t version, const char **log=NULL)
bool torque(uint8_t id, int32_t onoff, const char **log=NULL)
int32_t convertRadian2Value(uint8_t id, float radian)
bool itemWrite(uint8_t id, const char *item_name, int32_t data, const char **log=NULL)
bool torqueOn(uint8_t id, const char **log=NULL)
int32_t convertVelocity2Value(uint8_t id, float velocity)
bool getRadian(uint8_t id, float *radian, const char **log=NULL)
bool ledOn(uint8_t id, const char **log=NULL)
float convertValue2Current(uint8_t id, int16_t value)
bool setTimeBasedProfile(uint8_t id, const char **log=NULL)
float convertValue2Load(int16_t value)
bool getPresentVelocityData(uint8_t id, int32_t *data, const char **log=NULL)
bool goalVelocity(uint8_t id, int value, const char **log=NULL)
int16_t convertCurrent2Value(uint8_t id, float current)
bool setExtendedPositionControlMode(uint8_t id, const char **log=NULL)
bool setMultiTurnControlMode(uint8_t id, const char **log=NULL)
float convertValue2Radian(uint8_t id, int32_t value)
bool setVelocityControlMode(uint8_t id, const char **log=NULL)
bool getPresentPositionData(uint8_t id, int32_t *data, const char **log=NULL)
bool setPWMControlMode(uint8_t id, const char **log=NULL)
bool goalSpeed(uint8_t id, int value, const char **log=NULL)
bool goalPosition(uint8_t id, int value, const char **log=NULL)
bool changeBaudrate(uint8_t id, uint32_t new_baudrate, const char **log=NULL)
bool setNormalDirection(uint8_t id, const char **log=NULL)
bool itemRead(uint8_t id, const char *item_name, int32_t *data, const char **log=NULL)
bool wheelMode(uint8_t id, int32_t acceleration=0, const char **log=NULL)
bool setPositionControlMode(uint8_t id, const char **log=NULL)
bool setTorqueControlMode(uint8_t id, const char **log=NULL)
float convertValue2Velocity(uint8_t id, int32_t value)
bool setReverseDirection(uint8_t id, const char **log=NULL)
bool jointMode(uint8_t id, int32_t velocity=0, int32_t acceleration=0, const char **log=NULL)
bool led(uint8_t id, int32_t onoff, const char **log=NULL)
bool ledOff(uint8_t id, const char **log=NULL)
bool currentBasedPositionMode(uint8_t id, int32_t current=0, const char **log=NULL)
bool setVelocityBasedProfile(uint8_t id, const char **log=NULL)


dynamixel_workbench_toolbox
Author(s): Darby Lim , Ryan Shim
autogenerated on Mon Sep 28 2020 03:37:05