Cheetah Software
1.0
Main Page
Namespaces
Classes
Files
File List
File Members
ti_boardcontrol.h
Go to the documentation of this file.
1
#ifndef TI_BOARDCONTROL_H
2
#define TI_BOARDCONTROL_H
3
4
#include "
cTypes.h
"
5
6
// class for a simulated TI board
7
// replaces the old TI board control code, which required keeping track of the
8
// command/data state data.
9
struct
TiBoardCommand
{
10
float
position_des
[3];
11
float
velocity_des
[3];
12
float
kp
[3];
13
float
kd
[3];
14
float
force_ff
[3];
15
float
tau_ff
[3];
16
s32
enable
;
17
float
max_torque
;
18
};
19
20
struct
TiBoardData
{
21
float
position[3];
22
float
velocity[3];
23
float
force[3];
24
float
q[3];
25
float
dq[3];
26
float
tau[3];
27
float
tau_des[3];
28
u32
loop_count_ti
;
29
u32
ethercat_count_ti
;
30
u32
microtime_ti
;
31
};
32
33
class
TI_BoardControl
{
34
public
:
35
TI_BoardControl
() =
default
;
36
void
init(
float
side_sign);
37
void
run_ti_board_iteration();
38
void
reset_ti_board_data();
39
void
reset_ti_board_command();
40
void
set_link_lengths(
float
l1,
float
l2,
float
l3);
41
TiBoardCommand
command
;
42
TiBoardData
data_structure
;
43
44
// for Ben's TI board code that uses pointers
45
TiBoardData
*
data
;
46
47
private
:
48
void
kinematics(
const
float
side_sign,
const
float
q[3],
const
float
dq[3],
49
float
* p,
float
* v,
float
J[][3]);
50
void
impedanceControl(
const
float
side_sign,
const
float
q[3],
51
const
float
dq[3],
const
float
position_des
[3],
52
const
float
velocity_des
[3],
const
float
kp
[3],
53
const
float
kd
[3],
const
float
force_bias[3],
54
const
float
torque_bias[3],
float
* position,
55
float
* velocity,
float
* force,
float
* torque);
56
57
float
_side_sign
;
58
float
_l1, _l2,
_l3
;
59
bool
link_lengths_set =
false
;
60
};
61
62
#endif // TI_BOARDCONTROL_H
TiBoardCommand::max_torque
float max_torque
Definition:
ti_boardcontrol.h:17
cTypes.h
Common types that are only valid in C++.
TiBoardCommand::kd
float kd[3]
Definition:
ti_boardcontrol.h:13
TiBoardCommand::tau_ff
float tau_ff[3]
Definition:
ti_boardcontrol.h:15
TI_BoardControl::_side_sign
float _side_sign
Definition:
ti_boardcontrol.h:57
TiBoardCommand::kp
float kp[3]
Definition:
ti_boardcontrol.h:12
u32
uint32_t u32
Definition:
cTypes.h:18
TiBoardCommand::velocity_des
float velocity_des[3]
Definition:
ti_boardcontrol.h:11
TI_BoardControl::data
TiBoardData * data
Definition:
ti_boardcontrol.h:45
TiBoardCommand
Definition:
ti_boardcontrol.h:9
TI_BoardControl
Definition:
ti_boardcontrol.h:33
TI_BoardControl::data_structure
TiBoardData data_structure
Definition:
ti_boardcontrol.h:42
s32
int32_t s32
Definition:
cTypes.h:23
TiBoardData::ethercat_count_ti
u32 ethercat_count_ti
Definition:
ti_boardcontrol.h:29
TI_BoardControl::command
TiBoardCommand command
Definition:
ti_boardcontrol.h:41
TiBoardCommand::enable
s32 enable
Definition:
ti_boardcontrol.h:16
TiBoardData::microtime_ti
u32 microtime_ti
Definition:
ti_boardcontrol.h:30
TiBoardData
Definition:
ti_boardcontrol.h:20
TiBoardCommand::force_ff
float force_ff[3]
Definition:
ti_boardcontrol.h:14
TiBoardCommand::position_des
float position_des[3]
Definition:
ti_boardcontrol.h:10
TiBoardData::loop_count_ti
u32 loop_count_ti
Definition:
ti_boardcontrol.h:28
TI_BoardControl::_l3
float _l3
Definition:
ti_boardcontrol.h:58
home
dhkim
Public_Repository
Cheetah-Software
common
include
SimUtilities
ti_boardcontrol.h
Generated by
1.8.11