block_setpoint_generator_3d.test.ctrl 4.81 KB
Newer Older
Jeroen Vreeken's avatar
Jeroen Vreeken committed
1

2
3
4
5
trigger {
	{ "immediate" }
}

Jeroen Vreeken's avatar
Jeroen Vreeken committed
6
blocks (10.0, 0.0) {
Jeroen Vreeken's avatar
Jeroen Vreeken committed
7
	{ "setpoint_generator_3d", "spg", "spg", "na" }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
8
9
10

	{ "test_input_bool",  "reset"   }
	{ "test_input_float", "reset_x" }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
11
	{ "test_input_float", "track_x" }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
12
13
	{ "test_input_float", "track_v" }
	{ "value_bool",       "false"   }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
14
15
16
17

	{ "test_output_float", "setpoint" }
	{ "test_output_float", "x"        }
	{ "test_output_float", "v"        }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
18
19
	{ "test_output_float", "a"        }
	{ "test_output_float", "j"        }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
20
	{ "test_output_uint32", "id"      }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
21
22
23
24
25
26
27

	{ "test_command", "command" }
}

links {
	{ "reset",   "value", "spg", "reset",   true }
	{ "reset_x", "value", "spg", "reset_x", true }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
28
	{ "track_x", "value", "spg", "track_x", true }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
29
30
31
	{ "track_v", "value", "spg", "track_v", true }
	{ "false", "value",   "spg", "track_x_cmd", true }
	{ "false", "value",   "spg", "track_v_cmd", true }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
32
33
34
	
	{ "spg", "x", "x", "value", true }
	{ "spg", "v", "v", "value", true }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
35
36
	{ "spg", "a", "a", "value", true }
	{ "spg", "j", "j", "value", true }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
37
	{ "spg", "setpoint", "setpoint", "value", true }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
38
	{ "spg", "id", "id", "value", true }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
39
40
}

Jeroen Vreeken's avatar
Jeroen Vreeken committed
41
# derived from command/command.h
Jeroen Vreeken's avatar
Jeroen Vreeken committed
42
43
44
set SETPOINT		4
set SPEED		5
set SETPOINT_TIME 	6
Jeroen Vreeken's avatar
Jeroen Vreeken committed
45
set SETPOINT_TRACK	7
Jeroen Vreeken's avatar
Jeroen Vreeken committed
46
47
48
49
50

params {
	{ "spg", "min_x", (float) -100.0 }
	{ "spg", "max_x", (float)  200.0 }
	{ "spg", "max_v", (float)  20.0  }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
51
52
	{ "spg", "max_a", (float)   2.0  }
	{ "spg", "max_j", (float)   0.5  }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
53
54
55
56
57
58
59
60

	{ "command", "command", "spg", $[SETPOINT_TIME], 123,   80.0, 0, 500000000 }
	{ "command", "command", "spg", $[SETPOINT],      124, -110.0 }
	{ "command", "command", "spg", $[SETPOINT],      125,  300.0 }
	{ "command", "command", "spg", $[SETPOINT],      126,   61.0 }
	{ "command", "command", "spg", $[SPEED],         200,   11.0 }
	{ "command", "command", "spg", $[SETPOINT_TIME], 127,  -95.0, 1, 100000000 }
	{ "command", "command", "spg", $[SPEED],         201,  -33.0 }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
61
62
63
64
65
66
67
68
69
	{ "command", "command", "spg", $[SPEED],         201,  -33.0 }
	{ "command", "command", "spg", $[SPEED],         201,  -33.0 }
	{ "command", "command", "spg", $[SPEED],         201,  -33.0 }
	{ "command", "command", "spg", $[SPEED],         201,  -33.0 }
	{ "command", "command", "spg", $[SPEED],         201,  -33.0 }
	{ "command", "command", "spg", $[SPEED],         201,  -33.0 }
	{ "command", "command", "spg", $[SPEED],         201,  -33.0 }
	{ "command", "command", "spg", $[SPEED],         201,  -33.0 }
	{ "command", "command", "spg", $[SETPOINT_TRACK], 301,  999.0 }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
70
71
72
73
74
75
76

	{ "reset",   "value", 12, 
		(int)   { true, false, false, false, false, false, false, false, false, false, 
		          true, false	} }
	{ "reset_x", "value", 11, 
		(float) { 50.0, 33.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
		         -94.0  } }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
77
78
79
80
81
82
	{ "track_x", "value", 22, 
		(float) { 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0,
		          42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0,
		          40.0, 1337.0 
			} 
	}
Jeroen Vreeken's avatar
Jeroen Vreeken committed
83
84
85
86
87
88
	{ "track_v", "value", 22, 
		(float) { 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0,
		          42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0,
		          40.0, 1337.0 
			} 
	}
Jeroen Vreeken's avatar
Jeroen Vreeken committed
89
	
Jeroen Vreeken's avatar
Jeroen Vreeken committed
90
91
92
93
94
95
96
97
98
	{ "setpoint", "value", 22,
		(float) { 50.0, 56.0, 62.0, 68.0, 74.0, 80.0, -100.0, 200.0, 61.0, 51.1395,
		          0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
			  40.0, 200.0
		},
		(float) { 0.0, 0.0, 0.0, 0.0, 0.0,  0.0, 0.0, 0.0, 0.0, 1e-7,
		          100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0,
			  0.0, 0.0
		}
Jeroen Vreeken's avatar
Jeroen Vreeken committed
99
100
	}
	{ "x", "value", 20,
Jeroen Vreeken's avatar
Jeroen Vreeken committed
101
102
103
104
105
		(float) { 50.0, 50.00008, 50.00007, 50.002255, 50.00533, 50.01042, 50.01783, 50.02742, 50.0395, 50.05458,
		         -94.0,         -9.400008e+01, -9.400066e+01, -9.400225e+01, -9.400533e+01,
			 -9.401041e+01, -9.401800e+01, -9.402858e+01, -9.404266e+01, -9.406075e+01 },
		(float) {  0.0,  1e-5, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3,
		           0.0,  1e-5, 1e-5, 1e-5, 1e-5, 1e-5, 1e-5, 1e-5, 1e-5, 1e-5  }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
106
107
	}
	{ "v", "value", 10,
Jeroen Vreeken's avatar
Jeroen Vreeken committed
108
109
110
111
112
113
114
115
116
		(float) {  0.0, 0.0025, 0.01, 0.0225, 0.04, 0.0625, 0.085, 0.1075, 0.135, 0.1675  },
		(float) {  0.0,  1e-7, 1e-7, 1e-7, 1e-7, 1e-7, 1e-7, 1e-7, 1e-7, 1e-7 }
	}

	{ "a", "value", 20,
		(float) {  0.0,  0.05, 0.1, 0.15, 0.2, 0.25, 0.20, 0.25, 0.3, 0.35,
		           0.0, -0.05,-0.1,-0.15,-0.2,-0.25,-0.30,-0.35,-0.4,-0.45},
		(float) {  0.0,  1e-7, 1e-7, 1e-7, 1e-7, 1e-7, 1e-7, 1e-7, 1e-7, 1e-7,
		           0.0,  1e-7, 1e-7, 1e-7, 1e-7, 1e-7, 1e-7, 1e-7, 1e-7, 1e-7 }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
117
118
	}

Jeroen Vreeken's avatar
Jeroen Vreeken committed
119
120
121
122
123
124
	{ "j", "value", 20,
		(float) {  0.0,  0.5, 0.5, 0.5, 0.5, 0.5, -0.5, 0.5, 0.5, 0.5,
		           0.0, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5},
		(float) {  0.0,  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ,
		           0.0,  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0   }
	}
Jeroen Vreeken's avatar
Jeroen Vreeken committed
125

Jeroen Vreeken's avatar
Jeroen Vreeken committed
126
	{ "id",   "value", 22, 
Jeroen Vreeken's avatar
Jeroen Vreeken committed
127
		(int)   { (int)0xffffffff, 123, 123, 123, 123, 123, 124, 125, 126, 200,
Jeroen Vreeken's avatar
Jeroen Vreeken committed
128
129
		          (int)0xffffffff, 201, 201, 201, 201, 201, 201, 201, 201, 201,
			  301, (int)0xffffffff }
Jeroen Vreeken's avatar
Jeroen Vreeken committed
130
	}
Jeroen Vreeken's avatar
Jeroen Vreeken committed
131
}
132
133

set trace_server false