Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
youbot_driver
youbot
ProtocolDefinitions.hpp
Go to the documentation of this file.
1
/****************************************************************
2
*
3
* Copyright (c) 2011
4
* All rights reserved.
5
*
6
* Hochschule Bonn-Rhein-Sieg
7
* University of Applied Sciences
8
* Computer Science Department
9
*
10
* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11
*
12
* Author:
13
* Jan Paulus, Nico Hochgeschwender, Michael Reckhaus, Azamat Shakhimardanov
14
* Supervised by:
15
* Gerhard K. Kraetzschmar
16
*
17
* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
18
*
19
* This sofware is published under a dual-license: GNU Lesser General Public
20
* License LGPL 2.1 and BSD license. The dual-license implies that users of this
21
* code may choose which terms they prefer.
22
*
23
* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
24
*
25
* Redistribution and use in source and binary forms, with or without
26
* modification, are permitted provided that the following conditions are met:
27
*
28
* * Redistributions of source code must retain the above copyright
29
* notice, this list of conditions and the following disclaimer.
30
* * Redistributions in binary form must reproduce the above copyright
31
* notice, this list of conditions and the following disclaimer in the
32
* documentation and/or other materials provided with the distribution.
33
* * Neither the name of the Hochschule Bonn-Rhein-Sieg nor the names of its
34
* contributors may be used to endorse or promote products derived from
35
* this software without specific prior written permission.
36
*
37
* This program is free software: you can redistribute it and/or modify
38
* it under the terms of the GNU Lesser General Public License LGPL as
39
* published by the Free Software Foundation, either version 2.1 of the
40
* License, or (at your option) any later version or the BSD license.
41
*
42
* This program is distributed in the hope that it will be useful,
43
* but WITHOUT ANY WARRANTY; without even the implied warranty of
44
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45
* GNU Lesser General Public License LGPL and the BSD license for more details.
46
*
47
* You should have received a copy of the GNU Lesser General Public
48
* License LGPL and BSD license along with this program.
49
*
50
****************************************************************/
51
52
#ifndef PROTOCOLDEFINITIONS_HPP
53
#define PROTOCOLDEFINITIONS_HPP
54
55
namespace
youbot
{
56
57
//Opcodes of all TMCL commands that can be used in direct mode
58
typedef
enum
TMCLCommandNumber
{
59
ROR
= 1,
//Rotate right
60
ROL
= 2,
//Rotate left
61
MST
= 3,
//Motor stop
62
MVP
= 4,
//Move to position
63
SAP
= 5,
//Set axis parameter
64
GAP
= 6,
//Get axis parameter
65
STAP
= 7,
//Store axis parameter into EEPROM
66
RSAP
= 8,
//Restore axis parameter from EEPROM
67
SGP
= 9,
//Set global parameter
68
GGP
= 10,
//Get global parameter
69
STGP
= 11,
//Store global parameter into EEPROM
70
RSGP
= 12,
//Restore global parameter from EEPROM
71
RFS
= 13,
72
SIO
= 14,
73
GIO
= 15,
74
SCO
= 30,
75
GCO
= 31,
76
CCO
= 32,
77
FIRMWARE_VERSION
= 136
78
}
CommandNumber
;
79
80
#define USER_VARIABLE_BANK 2
81
82
//Opcodes of TMCL control functions (to be used to run or abort a TMCL program in the module)
83
#define TMCL_APPL_STOP 128
84
#define TMCL_APPL_RUN 129
85
#define TMCL_APPL_RESET 131
86
87
//Options for MVP commandds
88
#define MVP_ABS 0
89
#define MVP_REL 1
90
#define MVP_COORD 2
91
92
//Options for RFS command
93
#define RFS_START 0
94
#define RFS_STOP 1
95
#define RFS_STATUS 2
96
97
//Result codes for GetResult
98
#define TMCL_RESULT_OK 0
99
#define TMCL_RESULT_NOT_READY 1
100
#define TMCL_RESULT_CHECKSUM_ERROR 2
101
102
enum
YouBotJointControllerMode
{
103
MOTOR_STOP
= 0,
104
POSITION_CONTROL
= 1,
105
VELOCITY_CONTROL
= 2,
106
NO_MORE_ACTION
= 3,
107
SET_POSITION_TO_REFERENCE
= 4,
108
CURRENT_MODE
= 6,
109
INITIALIZE
= 7
110
};
111
112
enum
TMCLModuleAddress
{
113
DRIVE
= 0,
114
GRIPPER
= 1
115
};
116
117
/*
118
enum ProcessDataErrorFlags {
119
OVER_CURRENT = 1,
120
UNDER_VOLTAGE = 2,
121
OVER_VOLTAGE = 4,
122
OVER_TEMPERATURE = 8,
123
HALTED = 16,
124
HALL_SENSOR = 32,
125
ENCODER = 64,
126
MOTOR_WINDING = 128,
127
CYCLE_TIME_VIOLATION = 256,
128
INIT_SIN_COMM = 512,
129
};
130
*/
131
132
enum
MailboxErrorFlags
{
133
OVER_CURRENT
= 0x1,
134
UNDER_VOLTAGE
= 0x2,
135
OVER_VOLTAGE
= 0x4,
136
OVER_TEMPERATURE
= 0x8,
137
MOTOR_HALTED
= 0x10,
138
HALL_SENSOR_ERROR
= 0x20,
139
// ENCODER_ERROR = 0x40,
140
// INITIALIZATION_ERROR = 0x80,
141
// PWM_MODE_ACTIVE = 0x100,
142
VELOCITY_MODE
= 0x200,
143
POSITION_MODE
= 0x400,
144
TORQUE_MODE
= 0x800,
145
// EMERGENCY_STOP = 0x1000,
146
// FREERUNNING = 0x2000,
147
POSITION_REACHED
= 0x4000,
148
INITIALIZED
= 0x8000,
149
TIMEOUT
= 0x10000,
150
I2T_EXCEEDED
= 0x20000
151
152
};
153
154
155
enum
YouBotMailboxStatusFlags
{
156
MAILBOX_SUCCESS
= 100,
//formerly called "NO_ERROR", renamed due to name clash with Windows define
157
INVALID_COMMAND
= 2,
158
WRONG_TYPE
= 3,
159
INVALID_VALUE
= 4,
160
CONFIGURATION_EEPROM_LOCKED
= 5,
161
COMMAND_NOT_AVAILABLE
= 6,
162
REPLY_WRITE_PROTECTED
= 8
163
};
164
165
enum
ParameterType
{
166
MOTOR_CONTOLLER_PARAMETER
,
167
API_PARAMETER
168
};
169
170
enum
GripperErrorFlags
{
171
STALL_GUARD_STATUS
= 0x1,
172
GRIPPER_OVER_TEMPERATURE
= 0x2,
173
PRE_WARNING_OVER_TEMPERATURE
= 0x4,
174
SHORT_TO_GROUND_A
= 0x8,
175
SHORT_TO_GROUND_B
= 0x10,
176
OPEN_LOAD_A
= 0x20,
177
OPEN_LOAD_B
= 0x40,
178
STAND_STILL
= 0x80
179
};
180
181
}
// namespace youbot
182
183
#endif
/* PROTOCOLDEFINITIONS_HPP */
184
youbot::GIO
Definition:
ProtocolDefinitions.hpp:73
youbot::YouBotMailboxStatusFlags
YouBotMailboxStatusFlags
Definition:
ProtocolDefinitions.hpp:155
youbot::SET_POSITION_TO_REFERENCE
Definition:
ProtocolDefinitions.hpp:107
youbot::SGP
Definition:
ProtocolDefinitions.hpp:67
youbot::COMMAND_NOT_AVAILABLE
Definition:
ProtocolDefinitions.hpp:161
youbot::ROL
Definition:
ProtocolDefinitions.hpp:60
youbot::MOTOR_HALTED
Definition:
ProtocolDefinitions.hpp:137
youbot::REPLY_WRITE_PROTECTED
Definition:
ProtocolDefinitions.hpp:162
youbot::MAILBOX_SUCCESS
Definition:
ProtocolDefinitions.hpp:156
youbot::POSITION_REACHED
Definition:
ProtocolDefinitions.hpp:147
youbot::POSITION_CONTROL
Definition:
ProtocolDefinitions.hpp:104
youbot::TMCLCommandNumber
TMCLCommandNumber
Definition:
ProtocolDefinitions.hpp:58
youbot::MOTOR_CONTOLLER_PARAMETER
Definition:
ProtocolDefinitions.hpp:166
youbot::MOTOR_STOP
Definition:
ProtocolDefinitions.hpp:103
youbot
Definition:
FourSwedishWheelOmniBaseKinematic.hpp:60
youbot::CONFIGURATION_EEPROM_LOCKED
Definition:
ProtocolDefinitions.hpp:160
youbot::VELOCITY_CONTROL
Definition:
ProtocolDefinitions.hpp:105
youbot::CCO
Definition:
ProtocolDefinitions.hpp:76
youbot::GRIPPER_OVER_TEMPERATURE
Definition:
ProtocolDefinitions.hpp:172
youbot::UNDER_VOLTAGE
Definition:
ProtocolDefinitions.hpp:134
youbot::ParameterType
ParameterType
Definition:
ProtocolDefinitions.hpp:165
youbot::GGP
Definition:
ProtocolDefinitions.hpp:68
youbot::INITIALIZE
Definition:
ProtocolDefinitions.hpp:109
youbot::DRIVE
Definition:
ProtocolDefinitions.hpp:113
youbot::OVER_VOLTAGE
Definition:
ProtocolDefinitions.hpp:135
youbot::I2T_EXCEEDED
Definition:
ProtocolDefinitions.hpp:150
youbot::ROR
Definition:
ProtocolDefinitions.hpp:59
youbot::YouBotJointControllerMode
YouBotJointControllerMode
Definition:
ProtocolDefinitions.hpp:102
youbot::POSITION_MODE
Definition:
ProtocolDefinitions.hpp:143
youbot::TIMEOUT
Definition:
ProtocolDefinitions.hpp:149
youbot::STAP
Definition:
ProtocolDefinitions.hpp:65
youbot::RSAP
Definition:
ProtocolDefinitions.hpp:66
youbot::CURRENT_MODE
Definition:
ProtocolDefinitions.hpp:108
youbot::STALL_GUARD_STATUS
Definition:
ProtocolDefinitions.hpp:171
youbot::SHORT_TO_GROUND_A
Definition:
ProtocolDefinitions.hpp:174
youbot::OVER_CURRENT
Definition:
ProtocolDefinitions.hpp:133
youbot::API_PARAMETER
Definition:
ProtocolDefinitions.hpp:167
youbot::SCO
Definition:
ProtocolDefinitions.hpp:74
youbot::NO_MORE_ACTION
Definition:
ProtocolDefinitions.hpp:106
youbot::INVALID_VALUE
Definition:
ProtocolDefinitions.hpp:159
youbot::HALL_SENSOR_ERROR
Definition:
ProtocolDefinitions.hpp:138
youbot::FIRMWARE_VERSION
Definition:
ProtocolDefinitions.hpp:77
youbot::WRONG_TYPE
Definition:
ProtocolDefinitions.hpp:158
youbot::GCO
Definition:
ProtocolDefinitions.hpp:75
youbot::SAP
Definition:
ProtocolDefinitions.hpp:63
youbot::STGP
Definition:
ProtocolDefinitions.hpp:69
youbot::MVP
Definition:
ProtocolDefinitions.hpp:62
youbot::MST
Definition:
ProtocolDefinitions.hpp:61
youbot::INITIALIZED
Definition:
ProtocolDefinitions.hpp:148
youbot::OVER_TEMPERATURE
Definition:
ProtocolDefinitions.hpp:136
youbot::OPEN_LOAD_B
Definition:
ProtocolDefinitions.hpp:177
youbot::SIO
Definition:
ProtocolDefinitions.hpp:72
youbot::RFS
Definition:
ProtocolDefinitions.hpp:71
youbot::CommandNumber
enum youbot::TMCLCommandNumber CommandNumber
youbot::TMCLModuleAddress
TMCLModuleAddress
Definition:
ProtocolDefinitions.hpp:112
youbot::OPEN_LOAD_A
Definition:
ProtocolDefinitions.hpp:176
youbot::MailboxErrorFlags
MailboxErrorFlags
Definition:
ProtocolDefinitions.hpp:132
youbot::GRIPPER
Definition:
ProtocolDefinitions.hpp:114
youbot::TORQUE_MODE
Definition:
ProtocolDefinitions.hpp:144
youbot::VELOCITY_MODE
Definition:
ProtocolDefinitions.hpp:142
youbot::GripperErrorFlags
GripperErrorFlags
Definition:
ProtocolDefinitions.hpp:170
youbot::STAND_STILL
Definition:
ProtocolDefinitions.hpp:178
youbot::GAP
Definition:
ProtocolDefinitions.hpp:64
youbot::PRE_WARNING_OVER_TEMPERATURE
Definition:
ProtocolDefinitions.hpp:173
youbot::SHORT_TO_GROUND_B
Definition:
ProtocolDefinitions.hpp:175
youbot::RSGP
Definition:
ProtocolDefinitions.hpp:70
youbot::INVALID_COMMAND
Definition:
ProtocolDefinitions.hpp:157
youbot_driver
Author(s): Jan Paulus
autogenerated on Mon Jun 10 2019 15:46:25