-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAvalonControl.hpp
More file actions
60 lines (51 loc) · 1.25 KB
/
AvalonControl.hpp
File metadata and controls
60 lines (51 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef AVALON_CONTROL_HPP
#define AVALON_CONTROL_HPP
#include "tasks/pidcontroller.h"
#include <base/time.h>
namespace avalon_control
{
enum MOTCON_CHANNELS
{
MIDDLE_HORIZONTAL = 5,
MIDDLE_VERTICAL = 1,
REAR_HORIZONTAL = 0,
REAR_VERTICAL = 4,
RIGHT = 2,
LEFT = 3
};
enum MOTCON_CHANNEL_DIRECTIONS
{
DIR_MIDDLE_HORIZONTAL = 1,
DIR_MIDDLE_VERTICAL = -1,
DIR_REAR_HORIZONTAL = -1,
DIR_REAR_VERTICAL = 1,
DIR_RIGHT = 1,
DIR_LEFT = -1
};
struct MotionControllerState
{
PIDControllerState z_pid;
PIDControllerState heading_pid;
PIDControllerState pitch_pid;
};
struct SpeedControllerState
{
PIDControllerState z_pid;
PIDControllerState heading_pid;
PIDControllerState pitch_pid;
};
struct SpeedCommand
{
base::Time time;
double linear_speeds[3]; //! x, y and z speeds in m/s
double rotation_speed; //! rotation around the yaw axis in radians/s
#ifndef __orogen
SpeedCommand()
: rotation_speed(0)
{
linear_speeds[0] = linear_speeds[1] = linear_speeds[2] = 0;
}
#endif
};
}
#endif