action_file_define.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 /*
18  * action_module.h
19  *
20  * Created on: 2016. 2. 23.
21  * Author: Jay Song
22  */
23 
24 #ifndef THORMANG3_ACTION_MODULE_ACTION_FILE_DEFINE_H_
25 #define THORMANG3_ACTION_MODULE_ACTION_FILE_DEFINE_H_
26 
27 namespace thormang3
28 {
29 
30 namespace action_file_define
31 {
32 
33 const int MAXNUM_PAGE = 256;
34 const int MAXNUM_STEP = 7;
35 const int MAXNUM_NAME = 13;
36 const int MAXNUM_JOINTS = 38;
37 
38 const int SPEED_BASE_SCHEDULE = 0;
39 const int TIME_BASE_SCHEDULE = 0x0a;
40 
41 const int INVALID_BIT_MASK = 0x4000;
42 const int TORQUE_OFF_BIT_MASK = 0x2000;
43 
44 typedef struct // Header Structure (total 64unsigned char)
45 {
46  unsigned char name[MAXNUM_NAME+1]; // Name 0~13
47  unsigned char reserved1; // Reserved1 14
48  unsigned char repeat; // Repeat count 15
49  unsigned char schedule; // schedule 16
50  unsigned char reserved2[3]; // reserved2 17~19
51  unsigned char stepnum; // Number of step 20
52  unsigned char reserved3; // reserved3 21
53  unsigned char speed; // Speed 22
54  unsigned char reserved4; // reserved4 23
55  unsigned char accel; // Acceleration time 24
56  unsigned char next; // Link to next 25
57  unsigned char exit; // Link to exit 26
58  unsigned char reserved5[4]; // reserved5 27~30
59  unsigned char checksum; // checksum 31
60  unsigned char pgain[MAXNUM_JOINTS]; // pgain 32~69
61  unsigned char reserved6; // reserved6 70
62 } PageHeader;
63 
64 typedef struct // Step Structure (total 64unsigned char)
65 {
66  unsigned short position[MAXNUM_JOINTS]; // Joint position 0~75
67  unsigned char pause; // Pause time 76
68  unsigned char time; // Time 77
69 } Step;
70 
71 typedef struct // Page Structure (total 512unsigned char)
72 {
73  PageHeader header; // Page header 0~70
74  Step step[MAXNUM_STEP]; // Page step 71~609
75 } Page;
76 
77 }
78 
79 }
80 
81 #endif /* THORMANG3_ACTION_MODULE_ACTION_FILE_DEFINE_H_ */


thormang3_action_module
Author(s): Kayman , Jay Song
autogenerated on Mon Jun 10 2019 15:37:44