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


op3_action_module
Author(s): Kayman , Jay Song
autogenerated on Mon Jun 10 2019 14:41:06